00001
00002
00003 #if TYPE == FLOAT
00004 #define CTYPE float
00005 #define RTYPE float
00006 #define CONJ
00007 #define SQR(x) (x)*(x)
00008 #define REAL(x) (x)
00009 #define IMAG(x) (0.0f)
00010 #elif TYPE == DOUBLE
00011 #define CTYPE double
00012 #define RTYPE double
00013 #define CONJ
00014 #define SQR(x) (x)*(x)
00015 #define REAL(x) (x)
00016 #define IMAG(x) (0.0)
00017 #elif TYPE == COMPLEXFLOAT
00018 #define CTYPE _Complex float
00019 #define RTYPE float
00020 #define CONJ conjf
00021 #define SQR(x) (crealf(x)*crealf(x)+cimagf(x)*cimagf(x))
00022 #define REAL(x) (crealf(x))
00023 #define IMAG(x) (cimagf(x))
00024 #elif TYPE == COMPLEXDOUBLE
00025 #define CTYPE _Complex double
00026 #define RTYPE double
00027 #define CONJ conj
00028 #define SQR(x) (creal(x)*creal(x)+cimag(x)*cimag(x))
00029 #define REAL(x) (creal(x))
00030 #define IMAG(x) (cimag(x))
00031 #endif
00032
00033 #define RZERO ((RTYPE) 0)
00034 #define CZERO ((CTYPE) 0)
00035 #define RONE ((RTYPE) 1)
00036 #define CONE ((CTYPE) 1)
00037
00038 #define COMPLEX(a,b) ((CTYPE) ((a) + _Complex_I*(b)))
00039
00040 #include "cblas_def.h"
00041