34#ifndef _LAPACKE_CONFIG_H_
35#define _LAPACKE_CONFIG_H_
38#define LAPACK_COMPLEX_CPP
40#if defined(LAPACK_COMPLEX_CPP)
49#if defined(LAPACK_ILP64)
50#define lapack_int long
57#define lapack_logical lapack_int
60#ifndef LAPACK_COMPLEX_CUSTOM
62#if defined(LAPACK_COMPLEX_STRUCTURE)
66} _lapack_complex_float;
69} _lapack_complex_double;
70#define lapack_complex_float _lapack_complex_float
71#define lapack_complex_double _lapack_complex_double
72#define lapack_complex_float_real(z) ((z).real)
73#define lapack_complex_float_imag(z) ((z).imag)
74#define lapack_complex_double_real(z) ((z).real)
75#define lapack_complex_double_imag(z) ((z).imag)
77#elif defined(LAPACK_COMPLEX_C99)
80#define lapack_complex_float float _Complex
81#define lapack_complex_double double _Complex
82#define lapack_complex_float_real(z) (creal(z))
83#define lapack_complex_float_imag(z) (cimag(z))
84#define lapack_complex_double_real(z) (creal(z))
85#define lapack_complex_double_imag(z) (cimag(z))
87#elif defined(LAPACK_COMPLEX_CPP)
89#define lapack_complex_float std::complex<float>
90#define lapack_complex_double std::complex<double>
91#define lapack_complex_float_real(z) ((z).real())
92#define lapack_complex_float_imag(z) ((z).imag())
93#define lapack_complex_double_real(z) ((z).real())
94#define lapack_complex_double_imag(z) ((z).imag())
99#define lapack_complex_float float _Complex
100#define lapack_complex_double double _Complex
101#define lapack_complex_float_real(z) (creal(z))
102#define lapack_complex_float_imag(z) (cimag(z))
103#define lapack_complex_double_real(z) (creal(z))
104#define lapack_complex_double_imag(z) (cimag(z))
109#pragma clang diagnostic push
110#pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
113lapack_complex_float lapack_make_complex_float(
float re,
float im);
114lapack_complex_double lapack_make_complex_double(
double re,
double im);
117#pragma clang diagnostic pop
123#define LAPACK_malloc(size) malloc(size)
127#define LAPACK_free(p) free(p)
auto real(T t)
Get the real part of a scalar.
auto imag(A &&a)
Lazy, coefficient-wise imag function for nda::Array types.