From 69d1fc1588532b48a946c1501f92ed56600baf4d Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Thu, 15 May 2014 18:51:03 +0200 Subject: moved complex mapVal and zip --- packages/base/src/C/vector-aux.c | 104 +++++++++++++++------------------------ 1 file changed, 40 insertions(+), 64 deletions(-) (limited to 'packages/base') diff --git a/packages/base/src/C/vector-aux.c b/packages/base/src/C/vector-aux.c index be2dc3a..7cdc750 100644 --- a/packages/base/src/C/vector-aux.c +++ b/packages/base/src/C/vector-aux.c @@ -29,19 +29,6 @@ typedef float complex TCF; #define CHECK(RES,CODE) MACRO(if(RES) return CODE;) -#ifdef DBG -#define DEBUGMAT(MSG,X) printf(MSG" = \n"); gsl_matrix_fprintf(stdout,X,"%f"); printf("\n"); -#else -#define DEBUGMAT(MSG,X) -#endif - -#ifdef DBG -#define DEBUGVEC(MSG,X) printf(MSG" = \n"); gsl_vector_fprintf(stdout,X,"%f"); printf("\n"); -#else -#define DEBUGVEC(MSG,X) -#endif - - #define BAD_SIZE 2000 #define BAD_CODE 2001 #define MEM 2002 @@ -358,7 +345,7 @@ int mapR(int code, KDVEC(x), DVEC(r)) { OP(3,fabs) OP(4,asin) OP(5,acos) - OP(6,atan) /* atan2 using vectorZip */ + OP(6,atan) OP(7,sinh) OP(8,cosh) OP(9,tanh) @@ -384,7 +371,7 @@ int mapF(int code, KFVEC(x), FVEC(r)) { OP(3,fabs) OP(4,asin) OP(5,acos) - OP(6,atan) /* atan2 using vectorZip */ + OP(6,atan) OP(7,sinh) OP(8,cosh) OP(9,tanh) @@ -474,29 +461,8 @@ inline complex complex_f_math_fun(doublecomplex (*cf)(doublecomplex), complex a) return float_r; } -inline complex complex_f_math_op(doublecomplex (*cf)(doublecomplex,doublecomplex), - complex a,complex b) -{ - doublecomplex c1,c2,r; - - complex float_r; - - c1.r = a.r; - c1.i = a.i; - - c2.r = b.r; - c2.i = b.i; - - r = (*cf)(c1,c2); - - float_r.r = r.r; - float_r.i = r.i; - - return float_r; -} #define OPC(C,F) case C: { for(k=0;k