summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/auxiliaryFunctions
diff options
context:
space:
mode:
Diffstat (limited to '2.3-1/src/c/auxiliaryFunctions')
-rw-r--r--2.3-1/src/c/auxiliaryFunctions/abs/i16absa.c20
-rw-r--r--2.3-1/src/c/auxiliaryFunctions/abs/i16abss.c20
-rw-r--r--2.3-1/src/c/auxiliaryFunctions/abs/i8absa.c20
-rw-r--r--2.3-1/src/c/auxiliaryFunctions/abs/i8abss.c20
-rw-r--r--2.3-1/src/c/auxiliaryFunctions/abs/u16absa.c20
-rw-r--r--2.3-1/src/c/auxiliaryFunctions/abs/u16abss.c20
-rw-r--r--2.3-1/src/c/auxiliaryFunctions/abs/u8absa.c20
-rw-r--r--2.3-1/src/c/auxiliaryFunctions/abs/u8abss.c20
-rw-r--r--2.3-1/src/c/auxiliaryFunctions/includes/abs.h67
-rw-r--r--2.3-1/src/c/auxiliaryFunctions/interfaces/int_abs.h16
-rw-r--r--2.3-1/src/c/auxiliaryFunctions/interfaces/int_conj.h16
11 files changed, 259 insertions, 0 deletions
diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/i16absa.c b/2.3-1/src/c/auxiliaryFunctions/abs/i16absa.c
new file mode 100644
index 00000000..ad37cee2
--- /dev/null
+++ b/2.3-1/src/c/auxiliaryFunctions/abs/i16absa.c
@@ -0,0 +1,20 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - 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
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#include "abs.h"
+
+void i16absa(int16 *in, int size, int16* out) {
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ out[i] = i16abss(in[i]);
+ }
+}
diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/i16abss.c b/2.3-1/src/c/auxiliaryFunctions/abs/i16abss.c
new file mode 100644
index 00000000..591ab8db
--- /dev/null
+++ b/2.3-1/src/c/auxiliaryFunctions/abs/i16abss.c
@@ -0,0 +1,20 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - 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
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#include "abs.h"
+
+int16 i16abss(int16 num) {
+ if (num >= 0) {
+ return num;
+ }
+ return -num;
+}
diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/i8absa.c b/2.3-1/src/c/auxiliaryFunctions/abs/i8absa.c
new file mode 100644
index 00000000..2f015f24
--- /dev/null
+++ b/2.3-1/src/c/auxiliaryFunctions/abs/i8absa.c
@@ -0,0 +1,20 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - 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
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#include "abs.h"
+
+void i8absa(int8 *in, int size, int8* out) {
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ out[i] = i8abss(in[i]);
+ }
+}
diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/i8abss.c b/2.3-1/src/c/auxiliaryFunctions/abs/i8abss.c
new file mode 100644
index 00000000..7c3d707f
--- /dev/null
+++ b/2.3-1/src/c/auxiliaryFunctions/abs/i8abss.c
@@ -0,0 +1,20 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - 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
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#include "abs.h"
+
+int8 i8abss(int8 num) {
+ if (num >= 0) {
+ return num;
+ }
+ return -num;
+}
diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/u16absa.c b/2.3-1/src/c/auxiliaryFunctions/abs/u16absa.c
new file mode 100644
index 00000000..5bc1d14a
--- /dev/null
+++ b/2.3-1/src/c/auxiliaryFunctions/abs/u16absa.c
@@ -0,0 +1,20 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - 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
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#include "abs.h"
+
+void u16absa(uint16 *in, int size, uint16* out) {
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ out[i] = u16abss(in[i]);
+ }
+}
diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/u16abss.c b/2.3-1/src/c/auxiliaryFunctions/abs/u16abss.c
new file mode 100644
index 00000000..056ca80f
--- /dev/null
+++ b/2.3-1/src/c/auxiliaryFunctions/abs/u16abss.c
@@ -0,0 +1,20 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - 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
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#include "abs.h"
+
+uint16 u16abss(uint16 num) {
+ if (num >= 0) {
+ return num;
+ }
+ return -num;
+}
diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/u8absa.c b/2.3-1/src/c/auxiliaryFunctions/abs/u8absa.c
new file mode 100644
index 00000000..cc649c83
--- /dev/null
+++ b/2.3-1/src/c/auxiliaryFunctions/abs/u8absa.c
@@ -0,0 +1,20 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - 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
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#include "abs.h"
+
+void u8absa(uint8 *in, int size, uint8* out) {
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ out[i] = u8abss(in[i]);
+ }
+}
diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/u8abss.c b/2.3-1/src/c/auxiliaryFunctions/abs/u8abss.c
new file mode 100644
index 00000000..45ea9a51
--- /dev/null
+++ b/2.3-1/src/c/auxiliaryFunctions/abs/u8abss.c
@@ -0,0 +1,20 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - 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
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#include "abs.h"
+
+uint8 u8abss(uint8 num) {
+ if (num >= 0) {
+ return num;
+ }
+ return -num;
+}
diff --git a/2.3-1/src/c/auxiliaryFunctions/includes/abs.h b/2.3-1/src/c/auxiliaryFunctions/includes/abs.h
index 00565e39..cd022905 100644
--- a/2.3-1/src/c/auxiliaryFunctions/includes/abs.h
+++ b/2.3-1/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/2.3-1/src/c/auxiliaryFunctions/interfaces/int_abs.h b/2.3-1/src/c/auxiliaryFunctions/interfaces/int_abs.h
index 4c353fee..70a428c2 100644
--- a/2.3-1/src/c/auxiliaryFunctions/interfaces/int_abs.h
+++ b/2.3-1/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/2.3-1/src/c/auxiliaryFunctions/interfaces/int_conj.h b/2.3-1/src/c/auxiliaryFunctions/interfaces/int_conj.h
index f54de243..fec555b2 100644
--- a/2.3-1/src/c/auxiliaryFunctions/interfaces/int_conj.h
+++ b/2.3-1/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__ */