summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsiddhu89902015-09-03 02:06:47 +0530
committersiddhu89902015-09-03 02:06:47 +0530
commit17892e4b25aa0488eb51a5896c58094d63b7c55c (patch)
tree9a10bc8924203a4cc219d5f4d4ecf77439889bcf /src
parent222a3e39441ad408dacdc39d46d687dee5a6bf3c (diff)
downloadScilab2C_fossee_old-17892e4b25aa0488eb51a5896c58094d63b7c55c.tar.gz
Scilab2C_fossee_old-17892e4b25aa0488eb51a5896c58094d63b7c55c.tar.bz2
Scilab2C_fossee_old-17892e4b25aa0488eb51a5896c58094d63b7c55c.zip
Intermediate commit. Not to be used
Diffstat (limited to 'src')
-rw-r--r--src/c/auxiliaryFunctions/includes/abs.h67
-rw-r--r--src/c/auxiliaryFunctions/interfaces/int_abs.h16
-rw-r--r--src/c/auxiliaryFunctions/interfaces/int_conj.h16
-rw-r--r--src/c/elementaryFunctions/cosh/i16cosha.c18
-rw-r--r--src/c/elementaryFunctions/cosh/i8cosha.c18
-rw-r--r--src/c/elementaryFunctions/cosh/u16cosha.c18
-rw-r--r--src/c/elementaryFunctions/cosh/u8cosha.c18
-rw-r--r--src/c/elementaryFunctions/includes/ceil.h17
-rw-r--r--src/c/elementaryFunctions/includes/cosh.h8
-rw-r--r--src/c/elementaryFunctions/includes/fix.h17
-rw-r--r--src/c/elementaryFunctions/includes/floor.h17
-rw-r--r--src/c/elementaryFunctions/includes/round.h17
-rw-r--r--src/c/elementaryFunctions/interfaces/int_ceil.h16
-rw-r--r--src/c/elementaryFunctions/interfaces/int_fix.h16
-rw-r--r--src/c/elementaryFunctions/interfaces/int_floor.h16
-rw-r--r--src/c/elementaryFunctions/interfaces/int_round.h16
-rw-r--r--src/c/matrixOperations/interfaces/int_ones.h2
-rw-r--r--src/c/matrixOperations/interfaces/int_zeros.h8
-rw-r--r--src/c/operations/interfaces/int_OpLogAnd.h57
-rw-r--r--src/c/operations/interfaces/int_OpLogEq.h44
-rw-r--r--src/c/operations/interfaces/int_OpLogGe.h60
-rw-r--r--src/c/operations/interfaces/int_OpLogGt.h53
-rw-r--r--src/c/operations/interfaces/int_OpLogLe.h54
-rw-r--r--src/c/operations/interfaces/int_OpLogLt.h54
-rw-r--r--src/c/operations/interfaces/int_OpLogNe.h38
-rw-r--r--src/c/operations/interfaces/int_OpLogOr.h55
-rw-r--r--src/c/type/int_imag.h16
-rw-r--r--src/c/type/int_real.h23
28 files changed, 715 insertions, 60 deletions
diff --git a/src/c/auxiliaryFunctions/includes/abs.h b/src/c/auxiliaryFunctions/includes/abs.h
index 00565e3..cd02290 100644
--- a/src/c/auxiliaryFunctions/includes/abs.h
+++ b/src/c/auxiliaryFunctions/includes/abs.h
@@ -17,6 +17,7 @@
#include "floatComplex.h"
#include "doubleComplex.h"
#include "sqrt.h"
+#include "types.h"
#ifdef __cplusplus
extern "C" {
@@ -55,6 +56,38 @@ EXTERN_AUXFUNCT float cabss(floatComplex in);
EXTERN_AUXFUNCT double zabss(doubleComplex in);
/**
+ ** \brief Uint8 Absolute Value function
+ ** Determine the absolute value of in.
+ ** \param in : the uint8 we must determine abs.
+ ** \return -in or in depending on the sign of in.
+ **/
+EXTERN_AUXFUNCT uint8 u8abss(uint8 in);
+
+/**
+ ** \brief Int8 Absolute Value function
+ ** Determine the absolute value of in.
+ ** \param in : the int8 we must determine abs.
+ ** \return -in or in depending on the sign of in.
+ **/
+EXTERN_AUXFUNCT int8 i8abss(int8 in);
+
+/**
+ ** \brief Uint16 Absolute Value function
+ ** Determine the absolute value of in.
+ ** \param in : the uint16 we must determine abs.
+ ** \return -in or in depending on the sign of in.
+ **/
+EXTERN_AUXFUNCT uint16 u16abss(uint16 in);
+
+/**
+ ** \brief Int16 Absolute Value function
+ ** Determine the absolute value of in.
+ ** \param in : the int16 we must determine abs.
+ ** \return -in or in depending on the sign of in.
+ **/
+EXTERN_AUXFUNCT int16 i16abss(int16 in);
+
+/**
** \brief Float Array Absolute Value function
** Determine the absolute value of in elements.
** \param in : the float array we must determine abs.
@@ -86,6 +119,40 @@ EXTERN_AUXFUNCT void cabsa(floatComplex *in, int size, float* out);
**/
EXTERN_AUXFUNCT void zabsa(doubleComplex *in, int size, double* out);
+
+/**
+ ** \brief Uint8 Array Absolute Value function
+ ** Determine the absolute value of in elements.
+ ** \param in : the uint8 array we must determine abs.
+ ** \param out : the uint8 array result.
+ **/
+EXTERN_AUXFUNCT void u8absa(uint8 *in, int size, uint8* out);
+
+/**
+ ** \brief Int8 Array Absolute Value function
+ ** Determine the absolute value of in elements.
+ ** \param in : the int8 array we must determine abs.
+ ** \param out : the int8 array result.
+ **/
+EXTERN_AUXFUNCT void i8absa(int8 *in, int size, int8* out);
+
+/**
+ ** \brief Uint16 Array Absolute Value function
+ ** Determine the absolute value of in elements.
+ ** \param in : the uint16 array we must determine abs.
+ ** \param out : the uint16 array result.
+ **/
+EXTERN_AUXFUNCT void u16absa(uint16 *in, int size, uint16* out);
+
+/**
+ ** \brief Int16 Array Absolute Value function
+ ** Determine the absolute value of in elements.
+ ** \param in : the int16 array we must determine abs.
+ ** \param out : the int16 array result.
+ **/
+EXTERN_AUXFUNCT void i16absa(int16 *in, int size, int16* out);
+
+
#ifdef __cplusplus
} /* extern "C" */
#endif
diff --git a/src/c/auxiliaryFunctions/interfaces/int_abs.h b/src/c/auxiliaryFunctions/interfaces/int_abs.h
index 4c353fe..70a428c 100644
--- a/src/c/auxiliaryFunctions/interfaces/int_abs.h
+++ b/src/c/auxiliaryFunctions/interfaces/int_abs.h
@@ -23,6 +23,14 @@
#define z0absd0(in) zabss(in)
+#define u80absu80(in) u8abss(in)
+
+#define i80absi80(in) i8abss(in)
+
+#define u160absu160(in) u16abss(in)
+
+#define i160absi160(in) i16abss(in)
+
#define s2abss2(in,size,out) sabsa(in, size[0]*size[1], out)
#define d2absd2(in,size,out) dabsa(in, size[0]*size[1], out)
@@ -31,4 +39,12 @@
#define z2absd2(in,size,out) zabsa(in, size[0]*size[1], out)
+#define u82absu82(in,size,out) u8absa(in, size[0]*size[1], out)
+
+#define i82absi82(in,size,out) i8absa(in, size[0]*size[1], out)
+
+#define u162absu162(in,size,out) u16absa(in, size[0]*size[1], out)
+
+#define i162absi162(in,size,out) i16absa(in, size[0]*size[1], out)
+
#endif /* !__INT_ABS_H__ */
diff --git a/src/c/auxiliaryFunctions/interfaces/int_conj.h b/src/c/auxiliaryFunctions/interfaces/int_conj.h
index f54de24..fec555b 100644
--- a/src/c/auxiliaryFunctions/interfaces/int_conj.h
+++ b/src/c/auxiliaryFunctions/interfaces/int_conj.h
@@ -25,6 +25,14 @@
#define z0conjz0(in) zconjs(in)
+#define u80conju80(in) in
+
+#define i80conji80(in) in
+
+#define u160conju160(in) in
+
+#define i160conji160(in) in
+
#define s2conjs2(in,size,out) copy(in,size,out)
#define d2conjd2(in,size,out) copy(in,size,out)
@@ -33,4 +41,12 @@
#define z2conjz2(in,size,out) zconja(in, size[0]*size[1], out)
+#define u82conju82(in,size,out) copy(in,size,out)
+
+#define i82conji82(in,size,out) copy(in,size,out)
+
+#define u162conju162(in,size,out) copy(in,size,out)
+
+#define i162conji162(in,size,out) copy(in,size,out)
+
#endif /* !__INT_CONJ_H__ */
diff --git a/src/c/elementaryFunctions/cosh/i16cosha.c b/src/c/elementaryFunctions/cosh/i16cosha.c
index 8515bc7..eb2e9f9 100644
--- a/src/c/elementaryFunctions/cosh/i16cosha.c
+++ b/src/c/elementaryFunctions/cosh/i16cosha.c
@@ -1,6 +1,6 @@
/*
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET
+ * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET
*
* This file must be used under the terms of the CeCILL.
* This source file is licensed as described in the file COPYING, which
@@ -10,17 +10,11 @@
*
*/
-/*
-// cosh(z) = 0.5 (exp(|z|) + exp(-|z|))
-// = 0.5 ( y + 1/y ) with y = exp(|z|)
-*/
-
-#include <math.h>
#include "cosh.h"
-#include "exp.h"
-#include "abs.h"
-float i16coshs(int16 x) {
- float y = i16exps(i16abss(x));
- return (0.5f * (y + 1.0f / y));
+void i16cosha(int16* x, int size, int16* y) {
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ y[i] = i16coshs(x[i]);
+ }
}
diff --git a/src/c/elementaryFunctions/cosh/i8cosha.c b/src/c/elementaryFunctions/cosh/i8cosha.c
index b30c14e..beed9b3 100644
--- a/src/c/elementaryFunctions/cosh/i8cosha.c
+++ b/src/c/elementaryFunctions/cosh/i8cosha.c
@@ -1,6 +1,6 @@
/*
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET
+ * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET
*
* This file must be used under the terms of the CeCILL.
* This source file is licensed as described in the file COPYING, which
@@ -10,17 +10,11 @@
*
*/
-/*
-// cosh(z) = 0.5 (exp(|z|) + exp(-|z|))
-// = 0.5 ( y + 1/y ) with y = exp(|z|)
-*/
-
-#include <math.h>
#include "cosh.h"
-#include "exp.h"
-#include "abs.h"
-float i8coshs(int8 x) {
- float y = i8exps(i8abss(x));
- return (0.5f * (y + 1.0f / y));
+void i8cosha(int8* x, int size, int8* y) {
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ y[i] = i8coshs(x[i]);
+ }
}
diff --git a/src/c/elementaryFunctions/cosh/u16cosha.c b/src/c/elementaryFunctions/cosh/u16cosha.c
index 775f710..e0c4183 100644
--- a/src/c/elementaryFunctions/cosh/u16cosha.c
+++ b/src/c/elementaryFunctions/cosh/u16cosha.c
@@ -1,6 +1,6 @@
/*
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET
+ * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET
*
* This file must be used under the terms of the CeCILL.
* This source file is licensed as described in the file COPYING, which
@@ -10,17 +10,11 @@
*
*/
-/*
-// cosh(z) = 0.5 (exp(|z|) + exp(-|z|))
-// = 0.5 ( y + 1/y ) with y = exp(|z|)
-*/
-
-#include <math.h>
#include "cosh.h"
-#include "exp.h"
-#include "abs.h"
-float u16coshs(uint16 x) {
- float y = u16exps(u16abss(x));
- return (0.5f * (y + 1.0f / y));
+void u16cosha(uint16* x, int size, uint16* y) {
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ y[i] = u16coshs(x[i]);
+ }
}
diff --git a/src/c/elementaryFunctions/cosh/u8cosha.c b/src/c/elementaryFunctions/cosh/u8cosha.c
index b6d614f..9584b3e 100644
--- a/src/c/elementaryFunctions/cosh/u8cosha.c
+++ b/src/c/elementaryFunctions/cosh/u8cosha.c
@@ -1,6 +1,6 @@
/*
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET
+ * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET
*
* This file must be used under the terms of the CeCILL.
* This source file is licensed as described in the file COPYING, which
@@ -10,17 +10,11 @@
*
*/
-/*
-// cosh(z) = 0.5 (exp(|z|) + exp(-|z|))
-// = 0.5 ( y + 1/y ) with y = exp(|z|)
-*/
-
-#include <math.h>
#include "cosh.h"
-#include "exp.h"
-#include "abs.h"
-float u8coshs(uint8 x) {
- float y = u8exps(u8abss(x));
- return (0.5f * (y + 1.0f / y));
+void u8cosha(uint8* x, int size, uint8* y) {
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ y[i] = u8coshs(x[i]);
+ }
}
diff --git a/src/c/elementaryFunctions/includes/ceil.h b/src/c/elementaryFunctions/includes/ceil.h
index 960b8b3..57df72d 100644
--- a/src/c/elementaryFunctions/includes/ceil.h
+++ b/src/c/elementaryFunctions/includes/ceil.h
@@ -16,6 +16,7 @@
#include "dynlib_elementaryfunctions.h"
#include "floatComplex.h"
#include "doubleComplex.h"
+#include "types.h"
#ifdef __cplusplus
@@ -33,6 +34,14 @@ EXTERN_ELEMFUNCT floatComplex cceils(floatComplex in);
EXTERN_ELEMFUNCT doubleComplex zceils(doubleComplex in);
+EXTERN_ELEMFUNCT uint8 u8ceils(uint8 in);
+
+EXTERN_ELEMFUNCT int8 i8ceils(int8 in);
+
+EXTERN_ELEMFUNCT uint16 u16ceils(uint16 in);
+
+EXTERN_ELEMFUNCT int16 i16ceils(int16 in);
+
EXTERN_ELEMFUNCT void sceila(float* in, int size, float* out);
EXTERN_ELEMFUNCT void dceila(double* in, int size, double* out);
@@ -41,6 +50,14 @@ EXTERN_ELEMFUNCT void cceila(floatComplex* in, int size, floatComplex* out);
EXTERN_ELEMFUNCT void zceila(doubleComplex* in, int size, doubleComplex* out);
+EXTERN_ELEMFUNCT void u8ceila(uint8* in, int size, uint8* out);
+
+EXTERN_ELEMFUNCT void i8ceila(int8* in, int size, int8* out);
+
+EXTERN_ELEMFUNCT void u16ceila(uint16* in, int size, uint16* out);
+
+EXTERN_ELEMFUNCT void i16ceila(int16* in, int size, int16* out);
+
#ifdef __cplusplus
} /* extern "C" */
#endif
diff --git a/src/c/elementaryFunctions/includes/cosh.h b/src/c/elementaryFunctions/includes/cosh.h
index e084e42..5c7c8b7 100644
--- a/src/c/elementaryFunctions/includes/cosh.h
+++ b/src/c/elementaryFunctions/includes/cosh.h
@@ -112,7 +112,7 @@ EXTERN_ELEMFUNCT void zcosha(doubleComplex* in, int size, doubleComplex* out);
** \param out : output array value.
** \param size : the size of in and out arrays.
*/
-EXTERN_ELEMFUNCT void u8cosha(uint8* in, int size, float* out);
+EXTERN_ELEMFUNCT void u8cosha(uint8* in, int size, uint8* out);
/*
** \brief Int8 Matrix Cosine function
@@ -120,7 +120,7 @@ EXTERN_ELEMFUNCT void u8cosha(uint8* in, int size, float* out);
** \param out : output array value.
** \param size : the size of in and out arrays.
*/
-EXTERN_ELEMFUNCT void i8cosha(int8* in, int size, float* out);
+EXTERN_ELEMFUNCT void i8cosha(int8* in, int size, int8* out);
/*
** \brief Uint16 Matrix Cosine function
@@ -128,7 +128,7 @@ EXTERN_ELEMFUNCT void i8cosha(int8* in, int size, float* out);
** \param out : output array value.
** \param size : the size of in and out arrays.
*/
-EXTERN_ELEMFUNCT void u16cosha(uint16* in, int size, float* out);
+EXTERN_ELEMFUNCT void u16cosha(uint16* in, int size, uint16* out);
/*
** \brief Int16 Matrix Cosine function
@@ -136,7 +136,7 @@ EXTERN_ELEMFUNCT void u16cosha(uint16* in, int size, float* out);
** \param out : output array value.
** \param size : the size of in and out arrays.
*/
-EXTERN_ELEMFUNCT void i16cosha(int16* in, int size, float* out);
+EXTERN_ELEMFUNCT void i16cosha(int16* in, int size, int16* out);
#ifdef __cplusplus
diff --git a/src/c/elementaryFunctions/includes/fix.h b/src/c/elementaryFunctions/includes/fix.h
index 504a63c..d3e7f88 100644
--- a/src/c/elementaryFunctions/includes/fix.h
+++ b/src/c/elementaryFunctions/includes/fix.h
@@ -16,6 +16,7 @@
#include "dynlib_elementaryfunctions.h"
#include "floatComplex.h"
#include "doubleComplex.h"
+#include "types.h"
#ifdef __cplusplus
extern "C" {
@@ -35,6 +36,14 @@ EXTERN_ELEMFUNCT floatComplex cfixs(floatComplex in);
EXTERN_ELEMFUNCT doubleComplex zfixs(doubleComplex in);
+EXTERN_ELEMFUNCT uint8 u8fixs(uint8 in);
+
+EXTERN_ELEMFUNCT int8 i8fixs(int8 in);
+
+EXTERN_ELEMFUNCT uint16 u16fixs(uint16 in);
+
+EXTERN_ELEMFUNCT int16 i16fixs(int16 in);
+
EXTERN_ELEMFUNCT void sfixa(float* in, int size, float* out);
EXTERN_ELEMFUNCT void dfixa(double* in, int size, double* out);
@@ -43,6 +52,14 @@ EXTERN_ELEMFUNCT void cfixa(floatComplex* in, int size, floatComplex* out);
EXTERN_ELEMFUNCT void zfixa(doubleComplex* in, int size, doubleComplex* out);
+EXTERN_ELEMFUNCT void u8fixa(uint8* in, int size, uint8* out);
+
+EXTERN_ELEMFUNCT void i8fixa(int8* in, int size, int8* out);
+
+EXTERN_ELEMFUNCT void u16fixa(uint16* in, int size, uint16* out);
+
+EXTERN_ELEMFUNCT void i16fixa(int16* in, int size, int16* out);
+
#ifdef __cplusplus
} /* extern "C" */
#endif
diff --git a/src/c/elementaryFunctions/includes/floor.h b/src/c/elementaryFunctions/includes/floor.h
index 971cdf6..cd56641 100644
--- a/src/c/elementaryFunctions/includes/floor.h
+++ b/src/c/elementaryFunctions/includes/floor.h
@@ -16,6 +16,7 @@
#include "dynlib_elementaryfunctions.h"
#include "floatComplex.h"
#include "doubleComplex.h"
+#include "types.h"
#ifdef __cplusplus
extern "C" {
@@ -32,6 +33,14 @@ EXTERN_ELEMFUNCT floatComplex cfloors(floatComplex in);
EXTERN_ELEMFUNCT doubleComplex zfloors(doubleComplex in);
+EXTERN_ELEMFUNCT uint8 u8floors(uint8 in);
+
+EXTERN_ELEMFUNCT int8 i8floors(int8 in);
+
+EXTERN_ELEMFUNCT uint16 u16floors(uint16 in);
+
+EXTERN_ELEMFUNCT int16 i16floors(int16 in);
+
EXTERN_ELEMFUNCT void sfloora(float* in, int size, float* out);
EXTERN_ELEMFUNCT void dfloora(double* in, int size, double* out);
@@ -40,6 +49,14 @@ EXTERN_ELEMFUNCT void cfloora(floatComplex* in, int size, floatComplex* out);
EXTERN_ELEMFUNCT void zfloora(doubleComplex* in, int size, doubleComplex* out);
+EXTERN_ELEMFUNCT void u8floora(uint8* in, int size, uint8* out);
+
+EXTERN_ELEMFUNCT void i8floora(int8* in, int size, int8* out);
+
+EXTERN_ELEMFUNCT void u16floora(uint16* in, int size, uint16* out);
+
+EXTERN_ELEMFUNCT void i16floora(int16* in, int size, int16* out);
+
#ifdef __cplusplus
} /* extern "C" */
#endif
diff --git a/src/c/elementaryFunctions/includes/round.h b/src/c/elementaryFunctions/includes/round.h
index 1c3c0ce..6894265 100644
--- a/src/c/elementaryFunctions/includes/round.h
+++ b/src/c/elementaryFunctions/includes/round.h
@@ -16,6 +16,7 @@
#include "dynlib_elementaryfunctions.h"
#include "floatComplex.h"
#include "doubleComplex.h"
+#include "types.h"
#ifdef __cplusplus
extern "C" {
@@ -32,6 +33,14 @@ EXTERN_ELEMFUNCT floatComplex crounds(floatComplex in);
EXTERN_ELEMFUNCT doubleComplex zrounds(doubleComplex in);
+EXTERN_ELEMFUNCT uint8 u8rounds(uint8 in);
+
+EXTERN_ELEMFUNCT int8 i8rounds(int8 in);
+
+EXTERN_ELEMFUNCT uint16 u16rounds(uint16 in);
+
+EXTERN_ELEMFUNCT int16 i16rounds(int16 in);
+
EXTERN_ELEMFUNCT void srounda(float* in, int size, float* out);
EXTERN_ELEMFUNCT void drounda(double* in, int size, double* out);
@@ -40,6 +49,14 @@ EXTERN_ELEMFUNCT void crounda(floatComplex* in, int size, floatComplex* out);
EXTERN_ELEMFUNCT void zrounda(doubleComplex* in, int size, doubleComplex* out);
+EXTERN_ELEMFUNCT void u8rounda(uint8* in, int size, uint8* out);
+
+EXTERN_ELEMFUNCT void i8rounda(int8* in, int size, int8* out);
+
+EXTERN_ELEMFUNCT void u16rounda(uint16* in, int size, uint16* out);
+
+EXTERN_ELEMFUNCT void i16rounda(int16* in, int size, int16* out);
+
#ifdef __cplusplus
} /* extern "C" */
#endif
diff --git a/src/c/elementaryFunctions/interfaces/int_ceil.h b/src/c/elementaryFunctions/interfaces/int_ceil.h
index 918dd5a..33c0176 100644
--- a/src/c/elementaryFunctions/interfaces/int_ceil.h
+++ b/src/c/elementaryFunctions/interfaces/int_ceil.h
@@ -23,6 +23,14 @@
#define z0ceilz0(in) zceils(in)
+#define u80ceilu80(in) u8ceils(in)
+
+#define i80ceili80(in) i8ceils(in)
+
+#define u160ceilu160(in) u16ceils(in)
+
+#define i160ceili160(in) i16ceils(in)
+
#define s2ceils2(in,size,out) sceila(in, size[0]*size[1], out)
#define d2ceild2(in,size,out) dceila(in, size[0]*size[1], out)
@@ -31,4 +39,12 @@
#define z2ceilz2(in,size,out) zceila(in, size[0]*size[1], out)
+#define u82ceilu82(in,size,out) u8ceila(in, size[0]*size[1], out)
+
+#define i82ceili82(in,size,out) i8ceila(in, size[0]*size[1], out)
+
+#define u162ceilu162(in,size,out) u16ceila(in, size[0]*size[1], out)
+
+#define i162ceili162(in,size,out) i16ceila(in, size[0]*size[1], out)
+
#endif /* !__INT_CEIL_H__ */
diff --git a/src/c/elementaryFunctions/interfaces/int_fix.h b/src/c/elementaryFunctions/interfaces/int_fix.h
index ac483c9..2a00e2c 100644
--- a/src/c/elementaryFunctions/interfaces/int_fix.h
+++ b/src/c/elementaryFunctions/interfaces/int_fix.h
@@ -23,6 +23,14 @@
#define z0fixz0(in) zfixs(in)
+#define u80fixu80(in) u8fixs(in)
+
+#define i80fixi80(in) i8fixs(in)
+
+#define u160fixu160(in) u16fixs(in)
+
+#define i160fixi160(in) i16fixs(in)
+
#define s2fixs2(in,size,out) sfixa(in, size[0]*size[1], out)
#define d2fixd2(in,size,out) dfixa(in, size[0]*size[1], out)
@@ -31,4 +39,12 @@
#define z2fixz2(in,size,out) zfixa(in, size[0]*size[1], out)
+#define u82fixu82(in,size,out) u8fixa(in, size[0]*size[1], out)
+
+#define i82fixi82(in,size,out) i8fixa(in, size[0]*size[1], out)
+
+#define u162fixu162(in,size,out) u16fixa(in, size[0]*size[1], out)
+
+#define i162fixi162(in,size,out) i16fixa(in, size[0]*size[1], out)
+
#endif /* !__INT_FIX_H__ */
diff --git a/src/c/elementaryFunctions/interfaces/int_floor.h b/src/c/elementaryFunctions/interfaces/int_floor.h
index 548c5e2..639819a 100644
--- a/src/c/elementaryFunctions/interfaces/int_floor.h
+++ b/src/c/elementaryFunctions/interfaces/int_floor.h
@@ -23,6 +23,14 @@
#define z0floorz0(in) zfloors(in)
+#define u80flooru80(in) u8floors(in)
+
+#define i80floori80(in) i8floors(in)
+
+#define u160flooru160(in) u16floors(in)
+
+#define i160floori160(in) i16floors(in)
+
#define s2floors2(in,size,out) sfloora(in, size[0]*size[1], out)
#define d2floord2(in,size,out) dfloora(in, size[0]*size[1], out)
@@ -31,4 +39,12 @@
#define z2floorz2(in,size,out) zfloora(in, size[0]*size[1], out)
+#define u82flooru82(in,size,out) u8floora(in, size[0]*size[1], out)
+
+#define i82floori82(in,size,out) i8floora(in, size[0]*size[1], out)
+
+#define u162flooru162(in,size,out) u16floora(in, size[0]*size[1], out)
+
+#define i162floori162(in,size,out) i16floora(in, size[0]*size[1], out)
+
#endif /* !__INT_FLOOR_H__ */
diff --git a/src/c/elementaryFunctions/interfaces/int_round.h b/src/c/elementaryFunctions/interfaces/int_round.h
index a5da230..7d013c1 100644
--- a/src/c/elementaryFunctions/interfaces/int_round.h
+++ b/src/c/elementaryFunctions/interfaces/int_round.h
@@ -23,6 +23,14 @@
#define z0roundz0(in) zrounds(in)
+#define u80roundu80(in) u8rounds(in)
+
+#define i80roundi80(in) i8rounds(in)
+
+#define u160roundu160(in) u16rounds(in)
+
+#define i160roundi160(in) i16rounds(in)
+
#define s2rounds2(in,size,out) srounda(in, size[0]*size[1], out)
#define d2roundd2(in,size,out) drounda(in, size[0]*size[1], out)
@@ -31,4 +39,12 @@
#define z2roundz2(in,size,out) zrounda(in, size[0]*size[1], out)
+#define u82roundu82(in,size,out) u8rounda(in, size[0]*size[1], out)
+
+#define i82roundi82(in,size,out) i8rounda(in, size[0]*size[1], out)
+
+#define u162roundu162(in,size,out) u16rounda(in, size[0]*size[1], out)
+
+#define i162roundi162(in,size,out) i16rounda(in, size[0]*size[1], out)
+
#endif /* !__INT_ROUND_H__ */
diff --git a/src/c/matrixOperations/interfaces/int_ones.h b/src/c/matrixOperations/interfaces/int_ones.h
index 3946a48..e266ee5 100644
--- a/src/c/matrixOperations/interfaces/int_ones.h
+++ b/src/c/matrixOperations/interfaces/int_ones.h
@@ -64,7 +64,7 @@
#define i80i80onesi82(in1,in2,out) i8onesa(out, in1, in2)
-#define u160u160onesu82(in1,in2,out) u16onesa(out, in1, in2)
+#define u160u160onesu162(in1,in2,out) u16onesa(out, in1, in2)
#define i160i160onesi162(in1,in2,out) i16onesa(out, in1, in2)
diff --git a/src/c/matrixOperations/interfaces/int_zeros.h b/src/c/matrixOperations/interfaces/int_zeros.h
index 0f97af0..ac7e020 100644
--- a/src/c/matrixOperations/interfaces/int_zeros.h
+++ b/src/c/matrixOperations/interfaces/int_zeros.h
@@ -61,13 +61,13 @@
#define d0d0zerosd2(in1,in2,out) dzerosa(out, in1, in2)
-#define u80u80zeross2(in1,in2,out) u80zerosa(out, in1, in2)
+#define u80u80zerosu82(in1,in2,out) u8zerosa(out, in1, in2)
-#define i80i80zeross2(in1,in2,out) i80zerosa(out, in1, in2)
+#define i80i80zerosi82(in1,in2,out) i8zerosa(out, in1, in2)
-#define u160u160zeross2(in1,in2,out) u160zerosa(out, in1, in2)
+#define u160u160zerosu162(in1,in2,out) u16zerosa(out, in1, in2)
-#define i160i160zeross2(in1,in2,out) i160zerosa(out, in1, in2)
+#define i160i160zerosi162(in1,in2,out) i16zerosa(out, in1, in2)
#define s2zeross2(in,size,out) szerosa(out, size[0], size[1])
diff --git a/src/c/operations/interfaces/int_OpLogAnd.h b/src/c/operations/interfaces/int_OpLogAnd.h
index 460c81c..50a3189 100644
--- a/src/c/operations/interfaces/int_OpLogAnd.h
+++ b/src/c/operations/interfaces/int_OpLogAnd.h
@@ -19,6 +19,14 @@
#define Bool2Double(in) ((in) ? 1.0 : 0.0)
+#define Bool2Uint8(in) ((in) ? (uint8)1 : (uint8)0)
+
+#define Bool2Int8(in) ((in) ? (int8)1 : (int8)0)
+
+#define Bool2Uint16(in) ((in) ? (uint16)1 : (uint16)0)
+
+#define Bool2Int16(in) ((in) ? (int16)1 : (int16)0)
+
/*scalar and scalar*/
#define s0s0OpLogAnds0(in1, in2) Bool2Float(in1 != 0.0 && in2 != 0.0)
@@ -38,6 +46,15 @@
#define z0d0OpLogAndd0(in1, in2) Bool2Double((zreals(in1) != 0.0 || zimags(in1) != 0.0) && in2 != 0.0)
+#define u80u80OpLogAndu80(in1, in2) Bool2Uint8(in1 != 0 && in2 != 0)
+
+#define i80i80OpLogAndi80(in1, in2) Bool2Int8(in1 != 0 && in2 != 0)
+
+#define u160u160OpLogAndu160(in1, in2) Bool2Uint16(in1 != 0 && in2 != 0)
+
+#define i160i160OpLogAndi160(in1, in2) Bool2Int16(in1 != 0 && in2 != 0)
+
+
/*matrix and scalar*/
#define s2s0OpLogAnds2(in1, size1, in2, out) {int i = 0 ;\
@@ -65,6 +82,21 @@
#define z2d0OpLogAndd2(in1, size1, in2, out) {int i = 0 ;\
for (i = 0 ; i < size1[0]*size1[1] ; i++ ) out[i] = Bool2Double((zreals(in1[i]) != 0.0 || zimags(in1[i]) != 0.0) && in2 != 0.0);}
+#define u82u80OpLogAndu82(in1, size1, in2, out) {int i = 0 ;\
+ for (i = 0 ; i < size1[0]*size1[1] ; i++ ) out[i] = Bool2Uint8(in1[i] != 0 && in2 != 0);}
+
+#define i82i80OpLogAndi82(in1, size1, in2, out) {int i = 0 ;\
+ for (i = 0 ; i < size1[0]*size1[1] ; i++ ) out[i] = Bool2Int8(in1[i] != 0 && in2 != 0);}
+
+#define u82u80OpLogAndu82(in1, size1, in2, out) {int i = 0 ;\
+ for (i = 0 ; i < size1[0]*size1[1] ; i++ ) out[i] = Bool2Uint8(in1[i] != 0 && in2 != 0);}
+
+#define u162u160OpLogAndu162(in1, size1, in2, out) {int i = 0 ;\
+ for (i = 0 ; i < size1[0]*size1[1] ; i++ ) out[i] = Bool2Uint16(in1[i] != 0 && in2 != 0);}
+
+#define i162i160OpLogAndi162(in1, size1, in2, out) {int i = 0 ;\
+ for (i = 0 ; i < size1[0]*size1[1] ; i++ ) out[i] = Bool2Int16(in1[i] != 0 && in2 != 0);}
+
/*scalar and matrix*/
#define s0s2OpLogAnds2(in1, in2, size2, out) {int i = 0 ;\
@@ -92,6 +124,18 @@
#define z0d2OpLogAndd2(in1, in2, size2, out) {int i = 0 ;\
for (i = 0 ; i < size2[0]*size2[1] ; i++ ) out[i] = Bool2Double((zreals(in1) != 0.0 || zimags(in1) != 0.0) && in2[i] != 0.0);}
+#define u80u82OpLogAndu82(in1, in2, size2, out) {int i = 0 ;\
+ for (i = 0 ; i < size2[0]*size2[1] ; i++ ) out[i] = Bool2Uint8(in1 != 0 && in2[i] != 0);}
+
+#define i80i82OpLogAndi82(in1, in2, size2, out) {int i = 0 ;\
+ for (i = 0 ; i < size2[0]*size2[1] ; i++ ) out[i] = Bool2Int8(in1 != 0 && in2[i] != 0);}
+
+#define u160u162OpLogAndu162(in1, in2, size2, out) {int i = 0 ;\
+ for (i = 0 ; i < size2[0]*size2[1] ; i++ ) out[i] = Bool2Uint16(in1 != 0 && in2[i] != 0);}
+
+#define i160i162OpLogAndi162(in1, in2, size2, out) {int i = 0 ;\
+ for (i = 0 ; i < size2[0]*size2[1] ; i++ ) out[i] = Bool2Int16(in1 != 0 && in2[i] != 0);}
+
/*TODO matrix and matrix*/
#define s2s2OpLogAnds2(in1, size1, in2, size2, out) {int i = 0 ;\
@@ -119,4 +163,17 @@
#define z2d2OpLogAndd2(in1, size1, in2, size2, out) {int i = 0 ;\
for (i = 0 ; i < size2[0]*size2[1] ; i++ ) out[i] = Bool2Double((zreals(in1[i]) != 0.0 || zimags(in1[i]) != 0.0) && in2[i] != 0.0;)}
+
+#define u82u82OpLogAndu82(in1, size1, in2, size2, out) {int i = 0 ;\
+ for (i = 0 ; i < size2[0]*size2[1] ; i++ ) out[i] = Bool2Uint8(in1[i] != 0 && in2[i] != 0);}
+
+#define i82i82OpLogAndi82(in1, size1, in2, size2, out) {int i = 0 ;\
+ for (i = 0 ; i < size2[0]*size2[1] ; i++ ) out[i] = Bool2Int8(in1[i] != 0 && in2[i] != 0);}
+
+#define u162u162OpLogAndu162(in1, size1, in2, size2, out) {int i = 0 ;\
+ for (i = 0 ; i < size2[0]*size2[1] ; i++ ) out[i] = Bool2Uint16(in1[i] != 0 && in2[i] != 0);}
+
+#define i162i162OpLogAndi162(in1, size1, in2, size2, out) {int i = 0 ;\
+ for (i = 0 ; i < size2[0]*size2[1] ; i++ ) out[i] = Bool2Int16(in1[i] != 0 && in2[i] != 0);}
+
#endif /* !__INT_OPLOGAND_H__ */
diff --git a/src/c/operations/interfaces/int_OpLogEq.h b/src/c/operations/interfaces/int_OpLogEq.h
index b15a8b6..446b11c 100644
--- a/src/c/operations/interfaces/int_OpLogEq.h
+++ b/src/c/operations/interfaces/int_OpLogEq.h
@@ -14,11 +14,17 @@
#include "floatComplex.h"
#include "doubleComplex.h"
+#include "types.h"
#define s0s0OpLogEqs0(in1,in2) (float) (in1 == in2)
#define d0d0OpLogEqd0(in1,in2) (double) (in1 == in2)
#define c0c0OpLogEqs0(in1,in2) (float) ((creals(in1) == creals(in2)) && (cimags(in1) == cimags(in2)))
#define z0z0OpLogEqd0(in1,in2) (double) ((zreals(in1) == zreals(in2)) && (zimags(in1) == zimags(in2)))
+#define u80u80OpLogEqu80(in1,in2) (uint8) (in1 == in2)
+#define i80i80OpLogEqi80(in1,in2) (int8) (in1 == in2)
+#define u160u160OpLogEqu160(in1,in2) (uint16) (in1 == in2)
+#define i160i160OpLogEqi160(in1,in2) (int16) (in1 == in2)
+
#define s0c0OpLogEqs0(in1,in2) (float) ((in1==creals(in2)) && (0==cimags(in2)))
#define d0z0OpLogEqd0(in1,in2) (double) ((in1==zreals(in2)) && (0==zimags(in2)))
@@ -51,8 +57,21 @@
#define d2z0OpLogEqd2(in1,size,in2,out) {int i;\
for (i=0;i<size[0]*size[1];i++) out[i]=(double)((in1[i]==zreals(in2))&&(zimags(in2)==0));\
}
+#define u82u80OpLogEqu82(in1,size,in2,out) {int i;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=(uint8)(in1[i]==in2);\
+ }
+#define i82i80OpLogEqi82(in1,size,in2,out) {int i;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=(int8)(in1[i]==in2);\
+ }
+#define u162u160OpLogEqu162(in1,size,in2,out) {int i;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=(uint16)(in1[i]==in2);\
+ }
+
+#define i162i160OpLogEqi162(in1,size,in2,out) {int i;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=(int16)(in1[i]==in2);\
+ }
#define s0s2OpLogEqs2(in1,in2,inSize,out) s2s0OpLogEqs2(in2,inSize,in1,out)
#define c0s2OpLogEqs2(in1,in2,inSize,out) s2c0OpLogEqs2(in2,inSize,in1,out)
@@ -62,6 +81,11 @@
#define c0c2OpLogEqs2(in1,in2,inSize,out) c2c0OpLogEqs2(in2,inSize,in1,out)
#define d0z2OpLogEqd2(in1,in2,inSize,out) z2d0OpLogEqd2(in2,inSize,in1,out)
#define z0z2OpLogEqd2(in1,in2,inSize,out) z2z0OpLogEqd2(in2,inSize,in1,out)
+#define u80u82OpLogEqu82(in1,in2,inSize,out) u82u80OpLogEqu82(in2,inSize,in1,out)
+#define i80i82OpLogEqi82(in1,in2,inSize,out) i82i80OpLogEqi82(in2,inSize,in1,out)
+#define u160u162OpLogEqu162(in1,in2,inSize,out) u162u160OpLogEq162(in2,inSize,in1,out)
+#define i160i162OpLogEqi162(in1,in2,inSize,out) i162i160OpLogEqi162(in2,inSize,in1,out)
+
/* we must have size1=size2 */
@@ -91,4 +115,22 @@
#define c2s2OpLogEqs2(in1,size1,in2,size2,out) s2c2OpLogEqs2(in2,size2,in1,size1,out)
#define z2d2OpLogEqd2(in1,size1,in2,size2,out) d2z2OpLogEqd2(in2,size2,in1,size1,out)
-#endif /* !__OPLOGGT_H__ */
+
+#define u82u82OpLogEqu82(in1,size1,in2,size2,out) {int i;\
+ for (i=0;i<size1[0]*size2[1];i++) out[i]=(uint8)(in1[i]==in2[i]);\
+ }
+
+#define i82i82OpLogEqi82(in1,size1,in2,size2,out) {int i;\
+ for (i=0;i<size1[0]*size2[1];i++) out[i]=(int8)(in1[i]==in2[i]);\
+ }
+
+#define u162u162OpLogEqu162(in1,size1,in2,size2,out) {int i;\
+ for (i=0;i<size1[0]*size2[1];i++) out[i]=(uint16)(in1[i]==in2[i]);\
+ }
+
+#define i162i162OpLogEqi162(in1,size1,in2,size2,out) {int i;\
+ for (i=0;i<size1[0]*size2[1];i++) out[i]=(int16)(in1[i]==in2[i]);\
+ }
+
+
+#endif /* !__OPLOGEQ_H__ */
diff --git a/src/c/operations/interfaces/int_OpLogGe.h b/src/c/operations/interfaces/int_OpLogGe.h
index 0ce1ad8..edbdc07 100644
--- a/src/c/operations/interfaces/int_OpLogGe.h
+++ b/src/c/operations/interfaces/int_OpLogGe.h
@@ -21,15 +21,57 @@
#define s0s0OpLogGes0(in1,in2) (float) (in1 >= in2)
#define d0d0OpLogGed0(in1,in2) (double) (in1 >= in2)
+#define u80u80OpLogGeu80(in1,in2) (uint8) (in1 >= in2)
+
+#define i80i80OpLogGei80(in1,in2) (int8) (in1 >= in2)
+
+#define u160u160OpLogGeu160(in1,in2) (uint16) (in1 >= in2)
+
+#define i160i160OpLogGei160(in1,in2) (int16) (in1 >= in2)
+
#define s2s0OpLogGes2(in1, size1, in2, out) {int i;\
for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = s0s0OpLogGes0(in1[i],in2);\
}
+
+#define u82u80OpLogGeu82(in1, size1, in2, out) {int i;\
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = u80u80OpLogGeu80(in1[i],in2);\
+ }
+
+#define i82i80OpLogGei82(in1, size1, in2, out) {int i;\
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = i80i80OpLogGei80(in1[i],in2);\
+ }
+
+#define u82u80OpLogGeu82(in1, size1, in2, out) {int i;\
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = u80u80OpLogGeu80(in1[i],in2);\
+ }
+
+#define u162u160OpLogGeu162(in1, size1, in2, out) {int i;\
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = u160u160OpLogGeu160(in1[i],in2);\
+ }
+
+#define i162i160OpLogGei162(in1, size1, in2, out) {int i;\
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = i160i160OpLogGei160(in1[i],in2);\
+ }
+
#define s0s2OpLogGes2(in1, in2, size2, out) {int i; \
for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = s0s0OpLogGes0(in1,in2[i]);\
}
+#define u80u82OpLogGeu82(in1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = u80u80OpLogGeu80(in1,in2[i]);\
+ }
+
+#define u160u162OpLogGeu162(in1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = u160u160OpLogGeu160(in1,in2[i]);\
+ }
+
+
+#define i160i162OpLogGei162(in1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = i160i160OpLogGei160(in1,in2[i]);\
+ }
+
/* we must have size1=size2 */
#define s2s2OpLogGes2(in1, size1, in2, size2, out) {int i; \
for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = s0s0OpLogGes0(in1[i],in2[i]);\
@@ -47,4 +89,22 @@
#define d2d2OpLogGed2(in1, size1, in2, size2, out) {int i; \
for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = d0d0OpLogGed0(in1[i],in2[i]);\
}
+
+#define u82u82OpLogGeu82(in1, size1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = u80u80OpLogGeu80(in1[i],in2[i]);\
+ }
+
+#define i82i82OpLogGei82(in1, size1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = i80i80OpLogGei80(in1[i],in2[i]);\
+ }
+
+#define u162u162OpLogGeu162(in1, size1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = u160u160OpLogGeu160(in1[i],in2[i]);\
+ }
+
+#define i162i162OpLogGei162(in1, size1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = i160i160OpLogGei160(in1[i],in2[i]);\
+ }
+
+
#endif /* !__OPLOGGE_H__ */
diff --git a/src/c/operations/interfaces/int_OpLogGt.h b/src/c/operations/interfaces/int_OpLogGt.h
index 161b654..38c76cf 100644
--- a/src/c/operations/interfaces/int_OpLogGt.h
+++ b/src/c/operations/interfaces/int_OpLogGt.h
@@ -21,15 +21,51 @@
#define s0s0OpLogGts0(in1,in2) (float) (in1 > in2)
#define d0d0OpLogGtd0(in1,in2) (double) (in1 > in2)
+#define u80u80OpLogGtu80(in1,in2) (uint8) (in1 > in2)
+#define i80i80OpLogGti80(in1,in2) (int8) (in1 > in2)
+#define u160u160OpLogGtu160(in1,in2) (uint16) (in1 > in2)
+#define i160i160OpLogGti160(in1,in2) (int16) (in1 > in2)
#define s2s0OpLogGts2(in1, size1, in2, out) {int i;\
for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = s0s0OpLogGts0(in1[i],in2);\
}
+#define u82u80OpLogGtu82(in1, size1, in2, out) {int i;\
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = u80u80OpLogGtu80(in1[i],in2);\
+ }
+
+#define i82i80OpLogGti82(in1, size1, in2, out) {int i;\
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = i80i80OpLogGti80(in1[i],in2);\
+ }
+
+#define u162u160OpLogGtu162(in1, size1, in2, out) {int i;\
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = u160u160OpLogGtu160(in1[i],in2);\
+ }
+
+#define i162i160OpLogGti162(in1, size1, in2, out) {int i;\
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = i160i160OpLogGti160(in1[i],in2);\
+ }
+
#define s0s2OpLogGts2(in1, in2, size2, out) {int i; \
for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = s0s0OpLogGts0(in1,in2[i]);\
}
+#define u80u82OpLogGtu82(in1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = u80u80OpLogGtu80(in1,in2[i]);\
+ }
+
+#define i80i82OpLogGti82(in1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = i80i80OpLogGti80(in1,in2[i]);\
+ }
+
+#define u160u162OpLogGtu162(in1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = u160u160OpLogGtu160(in1,in2[i]);\
+ }
+
+#define i160i162OpLogGti162(in1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = i160i160OpLogGti160(in1,in2[i]);\
+ }
+
/* we must have size1=size2 */
#define s2s2OpLogGts2(in1, size1, in2, size2, out) {int i; \
for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = s0s0OpLogGts0(in1[i],in2[i]);\
@@ -47,4 +83,21 @@
#define d2d2OpLogGtd2(in1, size1, in2, size2, out) {int i; \
for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = d0d0OpLogGtd0(in1[i],in2[i]);\
}
+
+#define u82u82OpLogGtu82(in1, size1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = u80u80OpLogGtu80(in1[i],in2[i]);\
+ }
+
+#define i82i82OpLogGti82(in1, size1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = i80i80OpLogGti80(in1[i],in2[i]);\
+ }
+
+#define u162u162OpLogGtu162(in1, size1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = u160u160OpLogGt160(in1[i],in2[i]);\
+ }
+
+#define i162i162OpLogGti162(in1, size1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = i160i160OpLogGti160(in1[i],in2[i]);\
+ }
+
#endif /* !__OPLOGGT_H__ */
diff --git a/src/c/operations/interfaces/int_OpLogLe.h b/src/c/operations/interfaces/int_OpLogLe.h
index ebb09c7..8dbd1aa 100644
--- a/src/c/operations/interfaces/int_OpLogLe.h
+++ b/src/c/operations/interfaces/int_OpLogLe.h
@@ -20,16 +20,51 @@
#define s0s0OpLogLes0(in1,in2) (float) (in1 <= in2)
#define d0d0OpLogLed0(in1,in2) (double) (in1 <= in2)
-
+#define u80u80OpLogLeu80(in1,in2) (uint8) (in1 <= in2)
+#define i80i80OpLogLei80(in1,in2) (int8) (in1 <= in2)
+#define u160u160OpLogLeu160(in1,in2) (uint16) (in1 <= in2)
+#define i160i160OpLogLei160(in1,in2) (int16) (in1 <= in2)
#define s2s0OpLogLes2(in1, size1, in2, out) {int i;\
for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = s0s0OpLogLes0(in1[i],in2);\
}
+#define u82u80OpLogLeu82(in1, size1, in2, out) {int i;\
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = u80u80OpLogLeu80(in1[i],in2);\
+ }
+
+#define i82i80OpLogLei82(in1, size1, in2, out) {int i;\
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = i80i80OpLogLei80(in1[i],in2);\
+ }
+
+#define u162u160OpLogLeu162(in1, size1, in2, out) {int i;\
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = u160u160OpLogLeu160(in1[i],in2);\
+ }
+
+#define i162i160OpLogLei162(in1, size1, in2, out) {int i;\
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = i160i160OpLogLei160(in1[i],in2);\
+ }
+
#define s0s2OpLogLes2(in1, in2, size2, out) {int i; \
for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = s0s0OpLogLes0(in1,in2[i]);\
}
+#define u80u82OpLogLeu82(in1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = u80u80OpLogLeu80(in1,in2[i]);\
+ }
+
+#define i80i82OpLogLei82(in1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = i80i80OpLogLei80(in1,in2[i]);\
+ }
+
+#define u160u162OpLogLeu162(in1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = u160u160OpLogLeu160(in1,in2[i]);\
+ }
+
+#define i160i162OpLogLei162(in1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = i160i160OpLogLei160(in1,in2[i]);\
+ }
+
/* we must have size1=size2 */
#define s2s2OpLogLes2(in1, size1, in2, size2, out) {int i; \
for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = s0s0OpLogLes0(in1[i],in2[i]);\
@@ -47,4 +82,21 @@
#define d2d2OpLogLed2(in1, size1, in2, size2, out) {int i; \
for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = d0d0OpLogLed0(in1[i],in2[i]);\
}
+
+#define u82u82OpLogLeu82(in1, size1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = u80u80OpLogLeu80(in1[i],in2[i]);\
+ }
+
+#define i82i82OpLogLei82(in1, size1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = i80i80OpLogLei80(in1[i],in2[i]);\
+ }
+
+#define u162u162OpLogLeu162(in1, size1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = u160u160OpLogLeu160(in1[i],in2[i]);\
+ }
+
+#define i162i162OpLogLei162(in1, size1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = i160i160OpLogLei160(in1[i],in2[i]);\
+ }
+
#endif /* !__OPLOGLE_H__ */
diff --git a/src/c/operations/interfaces/int_OpLogLt.h b/src/c/operations/interfaces/int_OpLogLt.h
index 2c5d863..8974b15 100644
--- a/src/c/operations/interfaces/int_OpLogLt.h
+++ b/src/c/operations/interfaces/int_OpLogLt.h
@@ -20,16 +20,51 @@
#define s0s0OpLogLts0(in1,in2) (float) (in1 < in2)
#define d0d0OpLogLtd0(in1,in2) (double) (in1 < in2)
-
+#define u80u80OpLogLtu80(in1,in2) (uint8) (in1 < in2)
+#define i80i80OpLogLti80(in1,in2) (int8) (in1 < in2)
+#define u160u160OpLogLtu160(in1,in2) (uint16) (in1 < in2)
+#define i160i160OpLogLti160(in1,in2) (int16) (in1 < in2)
#define s2s0OpLogLts2(in1, size1, in2, out) {int i;\
for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = s0s0OpLogLts0(in1[i],in2);\
}
+#define u82u80OpLogLtu82(in1, size1, in2, out) {int i;\
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = u80u80OpLogLtu80(in1[i],in2);\
+ }
+
+#define i82i80OpLogLti82(in1, size1, in2, out) {int i;\
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = i80i80OpLogLti80(in1[i],in2);\
+ }
+
+#define u162u160OpLogLtu162(in1, size1, in2, out) {int i;\
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = u160u160OpLogLtu160(in1[i],in2);\
+ }
+
+#define i162i160OpLogLti162(in1, size1, in2, out) {int i;\
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = i160i160OpLogLti160(in1[i],in2);\
+ }
+
#define s0s2OpLogLts2(in1, in2, size2, out) {int i; \
for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = s0s0OpLogLts0(in1,in2[i]);\
}
+#define u80u82OpLogLtu82(in1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = u80u80OpLogLtu80(in1,in2[i]);\
+ }
+
+#define i80i82OpLogLti82(in1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = i80i80OpLogLti80(in1,in2[i]);\
+ }
+
+#define u160u162OpLogLtu162(in1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = u160u160OpLogLtu160(in1,in2[i]);\
+ }
+
+#define i160i162OpLogLti162(in1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = i160i160OpLogLti160(in1,in2[i]);\
+ }
+
/* we must have size1=size2 */
#define s2s2OpLogLts2(in1, size1, in2, size2, out) {int i; \
for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = s0s0OpLogLts0(in1[i],in2[i]);\
@@ -47,4 +82,21 @@
#define d2d2OpLogLtd2(in1, size1, in2, size2, out) {int i; \
for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = d0d0OpLogLtd0(in1[i],in2[i]);\
}
+
+#define u82u82OpLogLtu82(in1, size1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = u80u80OpLogLtu80(in1[i],in2[i]);\
+ }
+
+#define i82i82OpLogLti82(in1, size1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = i80i80OpLogLti80(in1[i],in2[i]);\
+ }
+
+#define u162u162OpLogLtu162(in1, size1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = u160u160OpLogLtu160(in1[i],in2[i]);\
+ }
+
+#define i162i162OpLogLti162(in1, size1, in2, size2, out) {int i; \
+ for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = i160i160OpLogLti160(in1[i],in2[i]);\
+ }
+
#endif /* !__OPLOGLT_H__ */
diff --git a/src/c/operations/interfaces/int_OpLogNe.h b/src/c/operations/interfaces/int_OpLogNe.h
index 238ef48..56cafef 100644
--- a/src/c/operations/interfaces/int_OpLogNe.h
+++ b/src/c/operations/interfaces/int_OpLogNe.h
@@ -22,6 +22,10 @@
#define d0d0OpLogNed0(in1,in2) (double) !(in1 == in2)
#define c0c0OpLogNes0(in1,in2) (float) !((creals(in1) == creals(in2)) && (cimags(in1) == cimags(in2)))
#define z0z0OpLogNed0(in1,in2) (double) !((zreals(in1) == zreals(in2)) && (zimags(in1) == zimags(in2)))
+#define u80u80OpLogNeu80(in1,in2) (uint8) !(in1 == in2)
+#define i80i80OpLogNei80(in1,in2) (int8) !(in1 == in2)
+#define u160u160OpLogNeu160(in1,in2) (uint16) !(in1 == in2)
+#define i160i160OpLogNei160(in1,in2) (int16) !(in1 == in2)
#define s0c0OpLogNes0(in1,in2) (float) !((in1==creals(in2)) && (0==cimags(in2)))
#define d0z0OpLogNed0(in1,in2) (double) !((in1==zreals(in2)) && (0==zimags(in2)))
@@ -55,7 +59,21 @@
for (i=0;i<size[0]*size[1];i++) out[i]=(double)!((in1[i]==zreals(in2))&&(zimags(in2)==0));\
}
+#define u82u80OpLogNeu82(in1,size,in2,out) {int i;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=(uint8)!(in1[i]==in2);\
+ }
+
+#define i82i80OpLogNei82(in1,size,in2,out) {int i;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=(int8)!(in1[i]==in2);\
+ }
+#define u162u160OpLogNeu162(in1,size,in2,out) {int i;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=(uint16)!(in1[i]==in2);\
+ }
+
+#define i162i160OpLogNei162(in1,size,in2,out) {int i;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=(int16)!(in1[i]==in2);\
+ }
#define s0s2OpLogNes2(in1,in2,inSize,out) s2s0OpLogNes2(in2,inSize,in1,out)
#define c0s2OpLogNes2(in1,in2,inSize,out) s2c0OpLogNes2(in2,inSize,in1,out)
@@ -65,6 +83,10 @@
#define c0c2OpLogNes2(in1,in2,inSize,out) c2c0OpLogNes2(in2,inSize,in1,out)
#define d0z2OpLogNed2(in1,in2,inSize,out) z2d0OpLogNed2(in2,inSize,in1,out)
#define z0z2OpLogNed2(in1,in2,inSize,out) z2z0OpLogNed2(in2,inSize,in1,out)
+#define u80u82OpLogNeu82(in1,in2,inSize,out) u82u80OpLogNeu82(in2,inSize,in1,out)
+#define i80i82OpLogNei82(in1,in2,inSize,out) i82i80OpLogNei82(in2,inSize,in1,out)
+#define u160u162OpLogNeu162(in1,in2,inSize,out) u162u160OpLogNeu162(in2,inSize,in1,out)
+#define i160i162OpLogNei162(in1,in2,inSize,out) i162i160OpLogNei162(in2,inSize,in1,out)
/* we must have size1=size2 */
@@ -95,4 +117,20 @@
#define c2s2OpLogNes2(in1,size1,in2,size2,out) s2c2OpLogNes2(in2,size2,in1,size1,out)
#define z2d2OpLogNed2(in1,size1,in2,size2,out) d2z2OpLogNed2(in2,size2,in1,size1,out)
+#define u82u82OpLogNeu82(in1,size1,in2,size2,out) {int i;\
+ for (i=0;i<size1[0]*size2[1];i++) out[i]=(uint8)!(in1[i]==in2[i]);\
+ }
+
+#define i82i82OpLogNei82(in1,size1,in2,size2,out) {int i;\
+ for (i=0;i<size1[0]*size2[1];i++) out[i]=(int8)!(in1[i]==in2[i]);\
+ }
+
+#define u162u162OpLogNeu162(in1,size1,in2,size2,out) {int i;\
+ for (i=0;i<size1[0]*size2[1];i++) out[i]=(uint16)!(in1[i]==in2[i]);\
+ }
+
+#define i162i162OpLogNei162(in1,size1,in2,size2,out) {int i;\
+ for (i=0;i<size1[0]*size2[1];i++) out[i]=(int16)!(in1[i]==in2[i]);\
+ }
+
#endif /* !__OPLOGNE_H__ */
diff --git a/src/c/operations/interfaces/int_OpLogOr.h b/src/c/operations/interfaces/int_OpLogOr.h
index b5d55fb..07039d1 100644
--- a/src/c/operations/interfaces/int_OpLogOr.h
+++ b/src/c/operations/interfaces/int_OpLogOr.h
@@ -19,6 +19,14 @@
#define Bool2Double(in) ((in) ? 1.0 : 0.0)
+#define Bool2Uint8(in) ((in) ? (uint8)1 : (uint8)0)
+
+#define Bool2Int8(in) ((in) ? (int8)1 : (int8)0)
+
+#define Bool2Uint16(in) ((in) ? (uint16)1 : (uint16)0)
+
+#define Bool2Int16(in) ((in) ? (int16)1 : (int16)0)
+
/*scalar or scalar */
#define s0s0OpLogOrs0(in1, in2) Bool2Float(in1 != 0.0f || in2 != 0.0f)
@@ -37,6 +45,14 @@
#define z0d0OpLogOrd0(in1, in2) Bool2Double((zreals(in1) != 0.0 || zimags(in1) != 0.0) && in2 != 0.0)
+#define u80u80OpLogAndu80(in1, in2) Bool2Uint8(in1 != 0 || in2 != 0)
+
+#define i80i80OpLogAndi80(in1, in2) Bool2Int8(in1 != 0 || in2 != 0)
+
+#define u160u160OpLogAndu160(in1, in2) Bool2Uint16(in1 != 0 || in2 != 0)
+
+#define i160i160OpLogAndi160(in1, in2) Bool2Int16(in1 != 0 || in2 != 0)
+
/*matrix or scalar */
#define s2s0OpLogOrs2(in1, size1, in2, out) {int i = 0 ;\
@@ -63,6 +79,19 @@
#define z2d0OpLogOrd2(in1, size1, in2, out) {int i = 0 ;\
for (i = 0 ; i < size1[0]*size1[1] ; i++ ) out[i] = Bool2Double((zreals(in1[i]) != 0.0 || zimags(in1[i]) != 0.0) && in2 != 0.0);}
+#define i82i80OpLogAndi82(in1, size1, in2, out) {int i = 0 ;\
+ for (i = 0 ; i < size1[0]*size1[1] ; i++ ) out[i] = Bool2Int8(in1[i] != 0 || in2 != 0);}
+
+#define u82u80OpLogAndu82(in1, size1, in2, out) {int i = 0 ;\
+ for (i = 0 ; i < size1[0]*size1[1] ; i++ ) out[i] = Bool2Uint8(in1[i] != 0 || in2 != 0);}
+
+#define u162u160OpLogAndu162(in1, size1, in2, out) {int i = 0 ;\
+ for (i = 0 ; i < size1[0]*size1[1] ; i++ ) out[i] = Bool2Uint16(in1[i] != 0 || in2 != 0);}
+
+#define i162i160OpLogAndi162(in1, size1, in2, out) {int i = 0 ;\
+ for (i = 0 ; i < size1[0]*size1[1] ; i++ ) out[i] = Bool2Int16(in1[i] != 0 || in2 != 0);}
+
+
/*scalar or matrix */
#define s0s2OpLogOrs2(in1, in2, size2, out) {int i = 0 ;\
@@ -88,6 +117,19 @@
#define z0d2OpLogOrd2(in1, in2, size2, out) {int i = 0 ;\
for (i = 0 ; i < size2[0]*size2[1] ; i++ ) out[i] = Bool2Double((zreals(in1) != 0.2 || zimags(in1) != 0.2) && in2[i] != 0.2);}
+
+#define u80u82OpLogAndu82(in1, in2, size2, out) {int i = 0 ;\
+ for (i = 0 ; i < size2[0]*size2[1] ; i++ ) out[i] = Bool2Uint8(in1 != 0 || in2[i] != 0);}
+
+#define i80i82OpLogAndi82(in1, in2, size2, out) {int i = 0 ;\
+ for (i = 0 ; i < size2[0]*size2[1] ; i++ ) out[i] = Bool2Int8(in1 != 0 || in2[i] != 0);}
+
+#define u160u162OpLogAndu162(in1, in2, size2, out) {int i = 0 ;\
+ for (i = 0 ; i < size2[0]*size2[1] ; i++ ) out[i] = Bool2Uint16(in1 != 0 || in2[i] != 0);}
+
+#define i160i162OpLogAndi162(in1, in2, size2, out) {int i = 0 ;\
+ for (i = 0 ; i < size2[0]*size2[1] ; i++ ) out[i] = Bool2Int16(in1 != 0 || in2[i] != 0);}
+
/*matrix or matrix */
#define s2s2OpLogOrs2(in1, size1, in2, size2, out) {int i = 0 ;\
@@ -113,4 +155,17 @@
#define z2d2OpLogOrd2(in1, size1, in2, size2, out) {int i = 0 ;\
for (i = 0 ; i < size2[0]*size2[1] ; i++ ) out[i] = Bool2Double((zreals(in1[i]) != 0.2 || zimags(in1[i]) != 0.2) && in2[i] != 0.2);}
+
+#define u82u82OpLogAndu82(in1, size1, in2, size2, out) {int i = 0 ;\
+ for (i = 0 ; i < size2[0]*size2[1] ; i++ ) out[i] = Bool2Uint8(in1[i] != 0 || in2[i] != 0);}
+
+#define i82i82OpLogAndi82(in1, size1, in2, size2, out) {int i = 0 ;\
+ for (i = 0 ; i < size2[0]*size2[1] ; i++ ) out[i] = Bool2Int8(in1[i] != 0 || in2[i] != 0);}
+
+#define u162u162OpLogAndu162(in1, size1, in2, size2, out) {int i = 0 ;\
+ for (i = 0 ; i < size2[0]*size2[1] ; i++ ) out[i] = Bool2Uint16(in1[i] != 0 || in2[i] != 0);}
+
+#define i162i162OpLogAndi162(in1, size1, in2, size2, out) {int i = 0 ;\
+ for (i = 0 ; i < size2[0]*size2[1] ; i++ ) out[i] = Bool2Int16(in1[i] != 0 || in2[i] != 0);}
+
#endif /* !__INT_OPLOGOR_H__ */
diff --git a/src/c/type/int_imag.h b/src/c/type/int_imag.h
index 9647f6a..6e6b736 100644
--- a/src/c/type/int_imag.h
+++ b/src/c/type/int_imag.h
@@ -23,6 +23,14 @@
#define z0imagd0(in) zimags(in)
+#define u80imagu80(in) 0
+
+#define i80imagi80(in) 0
+
+#define u160imagu160(in) 0
+
+#define i160imagi160(in) 0
+
#define s2imags2(in,size,out) szerosa(out,size[0],size[1])
#define d2imagd2(in,size,out) dzerosa(out,size[0],size[1])
@@ -31,4 +39,12 @@
#define z2imagd2(in,size,out) zimaga(in, size[0]*size[1], out)
+#define u82imagu82(in,size,out) u8zerosa(out,size[0],size[1])
+
+#define i82imagi82(in,size,out) i8zerosa(out,size[0],size[1])
+
+#define u162imagu162(in,size,out) u16zerosa(out,size[0],size[1])
+
+#define i162imagi162(in,size,out) i16zerosa(out,size[0],size[1])
+
#endif /* !__INT_IMAG_H__ */
diff --git a/src/c/type/int_real.h b/src/c/type/int_real.h
index 4949b88..ce097ec 100644
--- a/src/c/type/int_real.h
+++ b/src/c/type/int_real.h
@@ -23,6 +23,14 @@
#define z0reald0(in) zreals(in)
+#define u80realu80(in) in
+
+#define i80reali80(in) in
+
+#define u160realu160(in) in
+
+#define i160reali160(in) in
+
#define s2reals2(in,size,out) {int i;\
for (i=0;i<size[0]*size[1];i++) out[i]=in[i];\
}
@@ -35,4 +43,19 @@
#define z2reald2(in,size,out) zreala(in, size[0]*size[1],out)
+#define u82realu82(in,size,out) {int i;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=in[i];\
+ }
+
+#define i82reali82(in,size,out) {int i;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=in[i];\
+ }
+#define u162realu162(in,size,out) {int i;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=in[i];\
+ }
+
+#define i162reali162(in,size,out) {int i;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=in[i];\
+ }
+
#endif /* !__INT_REAL_H__ */