LAPACK Archives

[Lapack] lapacke.h should be more C++ friendly.

Hi,

Apologies if this isn?t the correct mechanism to report a bug.  I can?t seem to 
find a proper bug-tracker.

I think lapacke.h should prefer to use C++ complex types via <complex> when 
compiling within C++ instead of using C99 <complex.h>.

On GCC, complex.h includes the C99 complex.h for C compatibility 
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59087).
To avoid whether or not this is a GCC issue, lapacke.h could add to the top of 
it?s file somewhere:

#ifdef __cplusplus
    #ifndef lapack_complex_float
        #include <complex>
        #define lapack_complex_float std::complex<float>
    #endif

    #ifndef lapack_complex_double
        #include <complex>
        #define lapack_complex_double std::complex<double>
    #endif
#endif

which would still retain all the current features (custom float/imaginary 
types) while maintaining better default compatibility with C++ out-of-the-box.

Thanks,
Vitali

<Prev in Thread] Current Thread [Next in Thread>
  • [Lapack] lapacke.h should be more C++ friendly., Vitali Lovich <=


For additional information you may use the LAPACK/ScaLAPACK Forum.
Or one of the mailing lists, or