File indexing completed on 2025-01-17 09:55:45
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033 #ifndef _LAPACKE_CONFIG_H_
0034 #define _LAPACKE_CONFIG_H_
0035
0036 #ifdef __cplusplus
0037 #if defined(LAPACK_COMPLEX_CPP)
0038 #include <complex>
0039 #endif
0040 extern "C" {
0041 #endif
0042
0043 #include <stdlib.h>
0044 #include <stdint.h>
0045 #include <inttypes.h>
0046
0047 #ifndef lapack_int
0048 #if defined(LAPACK_ILP64)
0049 #define lapack_int int64_t
0050 #else
0051 #define lapack_int int32_t
0052 #endif
0053 #endif
0054
0055
0056
0057
0058 #ifndef LAPACK_IFMT
0059 #if defined(LAPACK_ILP64)
0060 #define LAPACK_IFMT PRId64
0061 #else
0062 #define LAPACK_IFMT PRId32
0063 #endif
0064 #endif
0065
0066 #ifndef lapack_logical
0067 #define lapack_logical lapack_int
0068 #endif
0069
0070 #ifndef LAPACK_COMPLEX_CUSTOM
0071 #if defined(_MSC_VER)
0072 #define _CRT_USE_C_COMPLEX_H
0073 #include <complex.h>
0074 #define LAPACK_COMPLEX_CUSTOM
0075 #define lapack_complex_float _Fcomplex
0076 #define lapack_complex_double _Dcomplex
0077 #define lapack_complex_float_real(z) (creal(z))
0078 #define lapack_complex_float_imag(z) (cimag(z))
0079 #define lapack_complex_double_real(z) (creal(z))
0080 #define lapack_complex_double_imag(z) (cimag(z))
0081 #else
0082
0083 #if defined(LAPACK_COMPLEX_STRUCTURE)
0084
0085 typedef struct { float real, imag; } _lapack_complex_float;
0086 typedef struct { double real, imag; } _lapack_complex_double;
0087 #define lapack_complex_float _lapack_complex_float
0088 #define lapack_complex_double _lapack_complex_double
0089 #define lapack_complex_float_real(z) ((z).real)
0090 #define lapack_complex_float_imag(z) ((z).imag)
0091 #define lapack_complex_double_real(z) ((z).real)
0092 #define lapack_complex_double_imag(z) ((z).imag)
0093
0094 #elif defined(LAPACK_COMPLEX_C99)
0095
0096 #include <complex.h>
0097 #define lapack_complex_float float _Complex
0098 #define lapack_complex_double double _Complex
0099 #define lapack_complex_float_real(z) (creal(z))
0100 #define lapack_complex_float_imag(z) (cimag(z))
0101 #define lapack_complex_double_real(z) (creal(z))
0102 #define lapack_complex_double_imag(z) (cimag(z))
0103
0104 #elif defined(LAPACK_COMPLEX_CPP)
0105
0106 #define lapack_complex_float std::complex<float>
0107 #define lapack_complex_double std::complex<double>
0108 #define lapack_complex_float_real(z) ((z).real())
0109 #define lapack_complex_float_imag(z) ((z).imag())
0110 #define lapack_complex_double_real(z) ((z).real())
0111 #define lapack_complex_double_imag(z) ((z).imag())
0112
0113 #else
0114
0115 #include <complex.h>
0116 #define lapack_complex_float float _Complex
0117 #define lapack_complex_double double _Complex
0118 #define lapack_complex_float_real(z) (creal(z))
0119 #define lapack_complex_float_imag(z) (cimag(z))
0120 #define lapack_complex_double_real(z) (creal(z))
0121 #define lapack_complex_double_imag(z) (cimag(z))
0122
0123 #endif
0124 #endif
0125
0126 lapack_complex_float lapack_make_complex_float( float re, float im );
0127 lapack_complex_double lapack_make_complex_double( double re, double im );
0128
0129 #endif
0130
0131 #ifndef LAPACK_malloc
0132 #define LAPACK_malloc( size ) malloc( size )
0133 #endif
0134
0135 #ifndef LAPACK_free
0136 #define LAPACK_free( p ) free( p )
0137 #endif
0138
0139 #ifdef __cplusplus
0140 }
0141 #endif
0142
0143 #endif