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