summaryrefslogtreecommitdiff
path: root/src/c/auxiliaryFunctions
diff options
context:
space:
mode:
authorsiddhu89902015-09-03 02:06:47 +0530
committersiddhu89902015-09-03 02:06:47 +0530
commit17892e4b25aa0488eb51a5896c58094d63b7c55c (patch)
tree9a10bc8924203a4cc219d5f4d4ecf77439889bcf /src/c/auxiliaryFunctions
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/c/auxiliaryFunctions')
-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
3 files changed, 99 insertions, 0 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__ */