File indexing completed on 2025-09-16 09:13:50
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 #if defined(_MSC_VER) && defined(__INTEL_CLANG_COMPILER)
0071 #define LAPACK_COMPLEX_STRUCTURE
0072 #define LAPACK_GLOBAL(lcname,UCNAME) lcname
0073 #define NOCHANGE
0074 #endif
0075
0076 #ifndef LAPACK_COMPLEX_CUSTOM
0077 #if defined(_MSC_VER) && !defined(__INTEL_CLANG_COMPILER)
0078 #define _CRT_USE_C_COMPLEX_H
0079 #include <complex.h>
0080 #define LAPACK_COMPLEX_CUSTOM
0081 #define lapack_complex_float _Fcomplex
0082 #define lapack_complex_double _Dcomplex
0083 #define lapack_complex_float_real(z) (creal(z))
0084 #define lapack_complex_float_imag(z) (cimag(z))
0085 #define lapack_complex_double_real(z) (creal(z))
0086 #define lapack_complex_double_imag(z) (cimag(z))
0087 #else
0088
0089 #if defined(LAPACK_COMPLEX_STRUCTURE)
0090
0091 typedef struct { float real, imag; } _lapack_complex_float;
0092 typedef struct { double real, imag; } _lapack_complex_double;
0093 #define lapack_complex_float _lapack_complex_float
0094 #define lapack_complex_double _lapack_complex_double
0095 #define lapack_complex_float_real(z) ((z).real)
0096 #define lapack_complex_float_imag(z) ((z).imag)
0097 #define lapack_complex_double_real(z) ((z).real)
0098 #define lapack_complex_double_imag(z) ((z).imag)
0099
0100 #elif defined(LAPACK_COMPLEX_C99)
0101
0102 #include <complex.h>
0103 #define lapack_complex_float float _Complex
0104 #define lapack_complex_double double _Complex
0105 #define lapack_complex_float_real(z) (creal(z))
0106 #define lapack_complex_float_imag(z) (cimag(z))
0107 #define lapack_complex_double_real(z) (creal(z))
0108 #define lapack_complex_double_imag(z) (cimag(z))
0109
0110 #elif defined(LAPACK_COMPLEX_CPP)
0111
0112 #define lapack_complex_float std::complex<float>
0113 #define lapack_complex_double std::complex<double>
0114 #define lapack_complex_float_real(z) ((z).real())
0115 #define lapack_complex_float_imag(z) ((z).imag())
0116 #define lapack_complex_double_real(z) ((z).real())
0117 #define lapack_complex_double_imag(z) ((z).imag())
0118
0119 #else
0120
0121 #include <complex.h>
0122 #define lapack_complex_float float _Complex
0123 #define lapack_complex_double double _Complex
0124 #define lapack_complex_float_real(z) (creal(z))
0125 #define lapack_complex_float_imag(z) (cimag(z))
0126 #define lapack_complex_double_real(z) (creal(z))
0127 #define lapack_complex_double_imag(z) (cimag(z))
0128
0129 #endif
0130 #endif
0131
0132 lapack_complex_float lapack_make_complex_float( float re, float im );
0133 lapack_complex_double lapack_make_complex_double( double re, double im );
0134
0135 #endif
0136
0137 #ifndef LAPACK_malloc
0138 #define LAPACK_malloc( size ) malloc( size )
0139 #endif
0140
0141 #ifndef LAPACK_free
0142 #define LAPACK_free( p ) free( p )
0143 #endif
0144
0145 #ifdef __cplusplus
0146 }
0147 #endif
0148
0149 #endif