diff options
author | simon | 2009-08-24 11:04:41 +0000 |
---|---|---|
committer | simon | 2009-08-24 11:04:41 +0000 |
commit | 5814413d010ab5d43cfef5391f2444e3842ba004 (patch) | |
tree | 81f9b3d29881e4036c2cb4c038bb2d965c3b76c0 /src | |
parent | 1480d3bdd424ea9f3af3702573fd5d6d60f0bb16 (diff) | |
download | scilab2c-5814413d010ab5d43cfef5391f2444e3842ba004.tar.gz scilab2c-5814413d010ab5d43cfef5391f2444e3842ba004.tar.bz2 scilab2c-5814413d010ab5d43cfef5391f2444e3842ba004.zip |
corrected OpCc interface
added convenience mixed types functions in matrixDivision header
Diffstat (limited to 'src')
-rw-r--r-- | src/c/matrixOperations/includes/matrixDivision.h | 33 | ||||
-rw-r--r-- | src/c/matrixOperations/interfaces/int_OpCc.h | 1 |
2 files changed, 34 insertions, 0 deletions
diff --git a/src/c/matrixOperations/includes/matrixDivision.h b/src/c/matrixOperations/includes/matrixDivision.h index 9ea86d96..7702313b 100644 --- a/src/c/matrixOperations/includes/matrixDivision.h +++ b/src/c/matrixOperations/includes/matrixDivision.h @@ -62,6 +62,39 @@ EXTERN_MATOPS void cldivma( floatComplex* in1, int lines1, int columns1 , floatComplex* in2, int lines2, int columns2 , floatComplex* out ); +/*special case row vector /row vector => scalar */ +/* +** \brief Compute a division for double. +** \param in1 : input array. +** \param in2 : input array. +** \param size : size of in2 array. +** \return : scalar that contains the right division of the two vectors = in1 .* in2. +*/ +EXTERN_MATOPS double drdivv(double *in1, double *in2, int size2); + +EXTERN_MATOPS doubleComplex zrdivv(doubleComplex *in1, doubleComplex *in2, int size2); + +EXTERN_MATOPS doubleComplex zrdivzdv(doubleComplex *in1, double *in2, int size2); + +EXTERN_MATOPS doubleComplex zrdivdzv(double *in1, doubleComplex *in2, int size2); + +/* +** \brief Compute a division for float. +** \param in1 : input array. +** \param in2 : input array. +** \param size : size of in2 array. +** \return : scalar that contains the division of the two vectors = in1 .* in2. +*/ +EXTERN_MATOPS float srdivv(float *in1, float *in2, int size2); + +EXTERN_MATOPS floatComplex crdivv(floatComplex *in1, floatComplex *in2, int size2); + +EXTERN_MATOPS floatComplex crdivcsv(floatComplex *in1, float *in2, int size2); + +EXTERN_MATOPS floatComplex crdivscv(float *in1, floatComplex *in2, int size2); + + + #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/src/c/matrixOperations/interfaces/int_OpCc.h b/src/c/matrixOperations/interfaces/int_OpCc.h index 44d30d70..2cd3d558 100644 --- a/src/c/matrixOperations/interfaces/int_OpCc.h +++ b/src/c/matrixOperations/interfaces/int_OpCc.h @@ -78,6 +78,7 @@ #define c2c0OpCcc2(in1,size,in2,out) { floatComplex temp = in2; \ crowcata(in1, size[0], size[1],&temp, 1, 1, out);\ + } #define z2z0OpCcz2(in1,size,in2,out) { doubleComplex temp =in2; \ zrowcata(in1, size[0], size[1],&temp, 1, 1, out);\ |