summaryrefslogtreecommitdiff
path: root/2.3-1/src/c
diff options
context:
space:
mode:
Diffstat (limited to '2.3-1/src/c')
-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
-rw-r--r--2.3-1/src/c/elementaryFunctions/ceil/i16ceila.c19
-rw-r--r--2.3-1/src/c/elementaryFunctions/ceil/i16ceils.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/ceil/i8ceila.c19
-rw-r--r--2.3-1/src/c/elementaryFunctions/ceil/i8ceils.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/ceil/u16ceila.c19
-rw-r--r--2.3-1/src/c/elementaryFunctions/ceil/u16ceils.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/ceil/u8ceila.c19
-rw-r--r--2.3-1/src/c/elementaryFunctions/ceil/u8ceils.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/cosh/i16cosha.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/cosh/i8cosha.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/cosh/u16cosha.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/cosh/u8cosha.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/fix/i16fixa.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/fix/i16fixs.c19
-rw-r--r--2.3-1/src/c/elementaryFunctions/fix/i8fixa.c19
-rw-r--r--2.3-1/src/c/elementaryFunctions/fix/i8fixs.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/fix/u16fixa.c19
-rw-r--r--2.3-1/src/c/elementaryFunctions/fix/u16fixs.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/fix/u8fixa.c19
-rw-r--r--2.3-1/src/c/elementaryFunctions/fix/u8fixs.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/floor/i16floora.c19
-rw-r--r--2.3-1/src/c/elementaryFunctions/floor/i16floors.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/floor/i8floora.c19
-rw-r--r--2.3-1/src/c/elementaryFunctions/floor/i8floors.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/floor/u16floora.c19
-rw-r--r--2.3-1/src/c/elementaryFunctions/floor/u16floors.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/floor/u8floora.c19
-rw-r--r--2.3-1/src/c/elementaryFunctions/floor/u8floors.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/ceil.h17
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/cosh.h8
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/fix.h17
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/floor.h17
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/round.h17
-rw-r--r--2.3-1/src/c/elementaryFunctions/interfaces/int_ceil.h16
-rw-r--r--2.3-1/src/c/elementaryFunctions/interfaces/int_fix.h16
-rw-r--r--2.3-1/src/c/elementaryFunctions/interfaces/int_floor.h16
-rw-r--r--2.3-1/src/c/elementaryFunctions/interfaces/int_round.h16
-rw-r--r--2.3-1/src/c/elementaryFunctions/round/i16rounda.c20
-rw-r--r--2.3-1/src/c/elementaryFunctions/round/i16rounds.c23
-rw-r--r--2.3-1/src/c/elementaryFunctions/round/i8rounda.c20
-rw-r--r--2.3-1/src/c/elementaryFunctions/round/i8rounds.c23
-rw-r--r--2.3-1/src/c/elementaryFunctions/round/u16rounda.c20
-rw-r--r--2.3-1/src/c/elementaryFunctions/round/u16rounds.c23
-rw-r--r--2.3-1/src/c/elementaryFunctions/round/u8rounda.c20
-rw-r--r--2.3-1/src/c/elementaryFunctions/round/u8rounds.c23
-rw-r--r--2.3-1/src/c/matrixOperations/interfaces/int_ones.h2
-rw-r--r--2.3-1/src/c/matrixOperations/interfaces/int_zeros.h8
-rw-r--r--2.3-1/src/c/operations/interfaces/int_OpLogAnd.h57
-rw-r--r--2.3-1/src/c/operations/interfaces/int_OpLogEq.h44
-rw-r--r--2.3-1/src/c/operations/interfaces/int_OpLogGe.h60
-rw-r--r--2.3-1/src/c/operations/interfaces/int_OpLogGt.h53
-rw-r--r--2.3-1/src/c/operations/interfaces/int_OpLogLe.h54
-rw-r--r--2.3-1/src/c/operations/interfaces/int_OpLogLt.h54
-rw-r--r--2.3-1/src/c/operations/interfaces/int_OpLogNe.h38
-rw-r--r--2.3-1/src/c/operations/interfaces/int_OpLogOr.h55
-rw-r--r--2.3-1/src/c/scilab-arduino/cmd_analog_in/u8cmd_analog_ins.c19
-rw-r--r--2.3-1/src/c/scilab-arduino/cmd_analog_out/u8cmd_analog_outs.c20
-rw-r--r--2.3-1/src/c/scilab-arduino/cmd_digital_in/u8cmd_digital_ins.c19
-rw-r--r--2.3-1/src/c/scilab-arduino/cmd_digital_out/u8cmd_digital_outs.c20
-rw-r--r--2.3-1/src/c/scilab-arduino/includes/cmd_analog_in.h29
-rw-r--r--2.3-1/src/c/scilab-arduino/includes/cmd_analog_out.h29
-rw-r--r--2.3-1/src/c/scilab-arduino/includes/cmd_digital_in.h29
-rw-r--r--2.3-1/src/c/scilab-arduino/includes/cmd_digital_out.h29
-rw-r--r--2.3-1/src/c/scilab-arduino/includes/sleep.h29
-rw-r--r--2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_in.h30
-rw-r--r--2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_out.h30
-rw-r--r--2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_in.h30
-rw-r--r--2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h30
-rw-r--r--2.3-1/src/c/scilab-arduino/interfaces/int_sleep.h29
-rw-r--r--2.3-1/src/c/scilab-arduino/sleep/u16sleeps.c20
-rw-r--r--2.3-1/src/c/type/int_imag.h16
-rw-r--r--2.3-1/src/c/type/int_real.h23
83 files changed, 1895 insertions, 60 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__ */
diff --git a/2.3-1/src/c/elementaryFunctions/ceil/i16ceila.c b/2.3-1/src/c/elementaryFunctions/ceil/i16ceila.c
new file mode 100644
index 00000000..a960fa82
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/ceil/i16ceila.c
@@ -0,0 +1,19 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 <math.h>
+#include "ceil.h"
+
+void i16ceila(int16* x, int size, int16* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = i16ceils(x[i]);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/ceil/i16ceils.c b/2.3-1/src/c/elementaryFunctions/ceil/i16ceils.c
new file mode 100644
index 00000000..2dee9838
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/ceil/i16ceils.c
@@ -0,0 +1,18 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 <math.h>
+#include "ceil.h"
+
+int16 i16ceils(int16 x) {
+ return (int16)(ceilf(x));
+}
diff --git a/2.3-1/src/c/elementaryFunctions/ceil/i8ceila.c b/2.3-1/src/c/elementaryFunctions/ceil/i8ceila.c
new file mode 100644
index 00000000..33081748
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/ceil/i8ceila.c
@@ -0,0 +1,19 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 <math.h>
+#include "ceil.h"
+
+void i8ceila(int8* x, int size, int8* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = i8ceils(x[i]);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/ceil/i8ceils.c b/2.3-1/src/c/elementaryFunctions/ceil/i8ceils.c
new file mode 100644
index 00000000..e87bd61a
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/ceil/i8ceils.c
@@ -0,0 +1,18 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 <math.h>
+#include "ceil.h"
+
+int8 i8ceils(int8 x) {
+ return (int8)(ceilf(x));
+}
diff --git a/2.3-1/src/c/elementaryFunctions/ceil/u16ceila.c b/2.3-1/src/c/elementaryFunctions/ceil/u16ceila.c
new file mode 100644
index 00000000..c7e83df6
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/ceil/u16ceila.c
@@ -0,0 +1,19 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 <math.h>
+#include "ceil.h"
+
+void u16ceila(uint16* x, int size, uint16* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = u16ceils(x[i]);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/ceil/u16ceils.c b/2.3-1/src/c/elementaryFunctions/ceil/u16ceils.c
new file mode 100644
index 00000000..4632eec7
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/ceil/u16ceils.c
@@ -0,0 +1,18 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 <math.h>
+#include "ceil.h"
+
+uint16 u16ceils(uint16 x) {
+ return (uint16)(ceilf(x));
+}
diff --git a/2.3-1/src/c/elementaryFunctions/ceil/u8ceila.c b/2.3-1/src/c/elementaryFunctions/ceil/u8ceila.c
new file mode 100644
index 00000000..3bb4ca91
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/ceil/u8ceila.c
@@ -0,0 +1,19 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 <math.h>
+#include "ceil.h"
+
+void u8ceila(uint8* x, int size, uint8* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = u8ceils(x[i]);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/ceil/u8ceils.c b/2.3-1/src/c/elementaryFunctions/ceil/u8ceils.c
new file mode 100644
index 00000000..7f28bba2
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/ceil/u8ceils.c
@@ -0,0 +1,18 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 <math.h>
+#include "ceil.h"
+
+uint8 u8ceils(uint8 x) {
+ return (uint8)(ceilf(x));
+}
diff --git a/2.3-1/src/c/elementaryFunctions/cosh/i16cosha.c b/2.3-1/src/c/elementaryFunctions/cosh/i16cosha.c
index 8515bc7d..eb2e9f93 100644
--- a/2.3-1/src/c/elementaryFunctions/cosh/i16cosha.c
+++ b/2.3-1/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/2.3-1/src/c/elementaryFunctions/cosh/i8cosha.c b/2.3-1/src/c/elementaryFunctions/cosh/i8cosha.c
index b30c14e2..beed9b30 100644
--- a/2.3-1/src/c/elementaryFunctions/cosh/i8cosha.c
+++ b/2.3-1/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/2.3-1/src/c/elementaryFunctions/cosh/u16cosha.c b/2.3-1/src/c/elementaryFunctions/cosh/u16cosha.c
index 775f710e..e0c41836 100644
--- a/2.3-1/src/c/elementaryFunctions/cosh/u16cosha.c
+++ b/2.3-1/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/2.3-1/src/c/elementaryFunctions/cosh/u8cosha.c b/2.3-1/src/c/elementaryFunctions/cosh/u8cosha.c
index b6d614fa..9584b3e0 100644
--- a/2.3-1/src/c/elementaryFunctions/cosh/u8cosha.c
+++ b/2.3-1/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/2.3-1/src/c/elementaryFunctions/fix/i16fixa.c b/2.3-1/src/c/elementaryFunctions/fix/i16fixa.c
new file mode 100644
index 00000000..2ccb9338
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/fix/i16fixa.c
@@ -0,0 +1,21 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 <math.h>
+#include "fix.h"
+#include "floor.h"
+#include "ceil.h"
+
+void i16fixa(int16* x, int size, int16* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = i16fixs(x[i]);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/fix/i16fixs.c b/2.3-1/src/c/elementaryFunctions/fix/i16fixs.c
new file mode 100644
index 00000000..5a13ca04
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/fix/i16fixs.c
@@ -0,0 +1,19 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 <math.h>
+#include "fix.h"
+
+int16 i16fixs(int16 x) {
+ if (x>=0) return i16floors(x);
+ else return i16ceils(x);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/fix/i8fixa.c b/2.3-1/src/c/elementaryFunctions/fix/i8fixa.c
new file mode 100644
index 00000000..4e913a3b
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/fix/i8fixa.c
@@ -0,0 +1,19 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 <math.h>
+#include "fix.h"
+
+void i8fixa(int8* x, int size, int8* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = i8fixs(x[i]);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/fix/i8fixs.c b/2.3-1/src/c/elementaryFunctions/fix/i8fixs.c
new file mode 100644
index 00000000..ae331ffb
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/fix/i8fixs.c
@@ -0,0 +1,21 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 <math.h>
+#include "fix.h"
+#include "floor.h"
+#include "ceil.h"
+
+int8 i8fixs(int8 x) {
+ if (x>=0) return i8floors(x);
+ else return i8ceils(x);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/fix/u16fixa.c b/2.3-1/src/c/elementaryFunctions/fix/u16fixa.c
new file mode 100644
index 00000000..57983002
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/fix/u16fixa.c
@@ -0,0 +1,19 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 <math.h>
+#include "fix.h"
+
+void u16fixa(uint16* x, int size, uint16* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = u16fixs(x[i]);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/fix/u16fixs.c b/2.3-1/src/c/elementaryFunctions/fix/u16fixs.c
new file mode 100644
index 00000000..cf178479
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/fix/u16fixs.c
@@ -0,0 +1,21 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 <math.h>
+#include "fix.h"
+#include "floor.h"
+#include "ceil.h"
+
+uint16 u16fixs(uint16 x) {
+ if (x>=0) return u16floors(x);
+ else return u16ceils(x);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/fix/u8fixa.c b/2.3-1/src/c/elementaryFunctions/fix/u8fixa.c
new file mode 100644
index 00000000..2a3bd3b2
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/fix/u8fixa.c
@@ -0,0 +1,19 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 <math.h>
+#include "fix.h"
+
+void u8fixa(uint8* x, int size, uint8* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = u8fixs(x[i]);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/fix/u8fixs.c b/2.3-1/src/c/elementaryFunctions/fix/u8fixs.c
new file mode 100644
index 00000000..563bfe9a
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/fix/u8fixs.c
@@ -0,0 +1,21 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 <math.h>
+#include "fix.h"
+#include "floor.h"
+#include "ceil.h"
+
+uint8 u8fixs(uint8 x) {
+ if (x>=0) return u8floors(x);
+ else return u8ceils(x);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/floor/i16floora.c b/2.3-1/src/c/elementaryFunctions/floor/i16floora.c
new file mode 100644
index 00000000..69140b02
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/floor/i16floora.c
@@ -0,0 +1,19 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 <math.h>
+#include "floor.h"
+
+void i16floora(int16* x, int size, int16* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = i16floors(x[i]);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/floor/i16floors.c b/2.3-1/src/c/elementaryFunctions/floor/i16floors.c
new file mode 100644
index 00000000..428a745a
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/floor/i16floors.c
@@ -0,0 +1,18 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 <math.h>
+#include "floor.h"
+
+int16 i16floors(int16 x) {
+ return (int16)(floorf(x));
+}
diff --git a/2.3-1/src/c/elementaryFunctions/floor/i8floora.c b/2.3-1/src/c/elementaryFunctions/floor/i8floora.c
new file mode 100644
index 00000000..0554f1e0
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/floor/i8floora.c
@@ -0,0 +1,19 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 <math.h>
+#include "floor.h"
+
+void i8floora(int8* x, int size, int8* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = i8floors(x[i]);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/floor/i8floors.c b/2.3-1/src/c/elementaryFunctions/floor/i8floors.c
new file mode 100644
index 00000000..e78dfa13
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/floor/i8floors.c
@@ -0,0 +1,18 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 <math.h>
+#include "floor.h"
+
+int8 i8floors(int8 x) {
+ return (int8)(floorf(x));
+}
diff --git a/2.3-1/src/c/elementaryFunctions/floor/u16floora.c b/2.3-1/src/c/elementaryFunctions/floor/u16floora.c
new file mode 100644
index 00000000..56e35ca8
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/floor/u16floora.c
@@ -0,0 +1,19 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 <math.h>
+#include "floor.h"
+
+void u16floora(uint16* x, int size, uint16* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = u16floors(x[i]);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/floor/u16floors.c b/2.3-1/src/c/elementaryFunctions/floor/u16floors.c
new file mode 100644
index 00000000..65455c18
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/floor/u16floors.c
@@ -0,0 +1,18 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 <math.h>
+#include "floor.h"
+
+uint16 u16floors(uint16 x) {
+ return (uint16)(floorf(x));
+}
diff --git a/2.3-1/src/c/elementaryFunctions/floor/u8floora.c b/2.3-1/src/c/elementaryFunctions/floor/u8floora.c
new file mode 100644
index 00000000..ace7ff78
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/floor/u8floora.c
@@ -0,0 +1,19 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 <math.h>
+#include "floor.h"
+
+void u8floora(uint8* x, int size, uint8* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = u8floors(x[i]);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/floor/u8floors.c b/2.3-1/src/c/elementaryFunctions/floor/u8floors.c
new file mode 100644
index 00000000..efb2e8c0
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/floor/u8floors.c
@@ -0,0 +1,18 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 <math.h>
+#include "floor.h"
+
+uint8 u8floors(uint8 x) {
+ return (uint8)(floorf(x));
+}
diff --git a/2.3-1/src/c/elementaryFunctions/includes/ceil.h b/2.3-1/src/c/elementaryFunctions/includes/ceil.h
index 960b8b3b..57df72d5 100644
--- a/2.3-1/src/c/elementaryFunctions/includes/ceil.h
+++ b/2.3-1/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/2.3-1/src/c/elementaryFunctions/includes/cosh.h b/2.3-1/src/c/elementaryFunctions/includes/cosh.h
index e084e427..5c7c8b71 100644
--- a/2.3-1/src/c/elementaryFunctions/includes/cosh.h
+++ b/2.3-1/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/2.3-1/src/c/elementaryFunctions/includes/fix.h b/2.3-1/src/c/elementaryFunctions/includes/fix.h
index 504a63c1..d3e7f88b 100644
--- a/2.3-1/src/c/elementaryFunctions/includes/fix.h
+++ b/2.3-1/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/2.3-1/src/c/elementaryFunctions/includes/floor.h b/2.3-1/src/c/elementaryFunctions/includes/floor.h
index 971cdf65..cd566416 100644
--- a/2.3-1/src/c/elementaryFunctions/includes/floor.h
+++ b/2.3-1/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/2.3-1/src/c/elementaryFunctions/includes/round.h b/2.3-1/src/c/elementaryFunctions/includes/round.h
index 1c3c0cea..6894265a 100644
--- a/2.3-1/src/c/elementaryFunctions/includes/round.h
+++ b/2.3-1/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/2.3-1/src/c/elementaryFunctions/interfaces/int_ceil.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_ceil.h
index 918dd5a0..33c01769 100644
--- a/2.3-1/src/c/elementaryFunctions/interfaces/int_ceil.h
+++ b/2.3-1/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/2.3-1/src/c/elementaryFunctions/interfaces/int_fix.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_fix.h
index ac483c92..2a00e2cf 100644
--- a/2.3-1/src/c/elementaryFunctions/interfaces/int_fix.h
+++ b/2.3-1/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/2.3-1/src/c/elementaryFunctions/interfaces/int_floor.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_floor.h
index 548c5e2a..639819a7 100644
--- a/2.3-1/src/c/elementaryFunctions/interfaces/int_floor.h
+++ b/2.3-1/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/2.3-1/src/c/elementaryFunctions/interfaces/int_round.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_round.h
index a5da230c..7d013c1e 100644
--- a/2.3-1/src/c/elementaryFunctions/interfaces/int_round.h
+++ b/2.3-1/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/2.3-1/src/c/elementaryFunctions/round/i16rounda.c b/2.3-1/src/c/elementaryFunctions/round/i16rounda.c
new file mode 100644
index 00000000..5cacafae
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/round/i16rounda.c
@@ -0,0 +1,20 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 "round.h"
+
+void i16rounda(int16* x, int size, int16* out) {
+ int i=0;
+
+ for (i=0;i<size;i++) out[i]=i16rounds(x[i]);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/round/i16rounds.c b/2.3-1/src/c/elementaryFunctions/round/i16rounds.c
new file mode 100644
index 00000000..95bd6098
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/round/i16rounds.c
@@ -0,0 +1,23 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 "round.h"
+
+int16 i16rounds(int16 x) {
+ int result;
+
+ if(x>=0) result = (int16)((float)x+0.5);
+ else result = (int16)((float)x-0.5);
+
+ return (int16)result;
+}
diff --git a/2.3-1/src/c/elementaryFunctions/round/i8rounda.c b/2.3-1/src/c/elementaryFunctions/round/i8rounda.c
new file mode 100644
index 00000000..c47be512
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/round/i8rounda.c
@@ -0,0 +1,20 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 "round.h"
+
+void i8rounda(int8* x, int size, int8* out) {
+ int i=0;
+
+ for (i=0;i<size;i++) out[i]=i8rounds(x[i]);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/round/i8rounds.c b/2.3-1/src/c/elementaryFunctions/round/i8rounds.c
new file mode 100644
index 00000000..f37d53c6
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/round/i8rounds.c
@@ -0,0 +1,23 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 "round.h"
+
+int8 i8rounds(int8 x) {
+ int result;
+
+ if(x>=0) result = (int8)((float)x+0.5);
+ else result = (int8)((float)x-0.5);
+
+ return (int8)result;
+}
diff --git a/2.3-1/src/c/elementaryFunctions/round/u16rounda.c b/2.3-1/src/c/elementaryFunctions/round/u16rounda.c
new file mode 100644
index 00000000..38c4b282
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/round/u16rounda.c
@@ -0,0 +1,20 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 "round.h"
+
+void u16rounda(uint16* x, int size, uint16* out) {
+ int i=0;
+
+ for (i=0;i<size;i++) out[i]=u16rounds(x[i]);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/round/u16rounds.c b/2.3-1/src/c/elementaryFunctions/round/u16rounds.c
new file mode 100644
index 00000000..babda6db
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/round/u16rounds.c
@@ -0,0 +1,23 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 "round.h"
+
+uint16 u16rounds(uint16 x) {
+ int result;
+
+ if(x>=0) result = (uint16)((float)x+0.5);
+ else result = (uint16)((float)x-0.5);
+
+ return (uint16)result;
+}
diff --git a/2.3-1/src/c/elementaryFunctions/round/u8rounda.c b/2.3-1/src/c/elementaryFunctions/round/u8rounda.c
new file mode 100644
index 00000000..e8f828dd
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/round/u8rounda.c
@@ -0,0 +1,20 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 "round.h"
+
+void u8rounda(uint8* x, int size, uint8* out) {
+ int i=0;
+
+ for (i=0;i<size;i++) out[i]=u8rounds(x[i]);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/round/u8rounds.c b/2.3-1/src/c/elementaryFunctions/round/u8rounds.c
new file mode 100644
index 00000000..7e3da179
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/round/u8rounds.c
@@ -0,0 +1,23 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud Torset
+ *
+ * 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 "round.h"
+
+uint8 u8rounds(uint8 x) {
+ int result;
+
+ if(x>=0) result = (uint8)((float)x+0.5);
+ else result = (uint8)((float)x-0.5);
+
+ return (uint8)result;
+}
diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_ones.h b/2.3-1/src/c/matrixOperations/interfaces/int_ones.h
index 3946a487..e266ee52 100644
--- a/2.3-1/src/c/matrixOperations/interfaces/int_ones.h
+++ b/2.3-1/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/2.3-1/src/c/matrixOperations/interfaces/int_zeros.h b/2.3-1/src/c/matrixOperations/interfaces/int_zeros.h
index 0f97af04..ac7e020e 100644
--- a/2.3-1/src/c/matrixOperations/interfaces/int_zeros.h
+++ b/2.3-1/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/2.3-1/src/c/operations/interfaces/int_OpLogAnd.h b/2.3-1/src/c/operations/interfaces/int_OpLogAnd.h
index 460c81ca..50a31894 100644
--- a/2.3-1/src/c/operations/interfaces/int_OpLogAnd.h
+++ b/2.3-1/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/2.3-1/src/c/operations/interfaces/int_OpLogEq.h b/2.3-1/src/c/operations/interfaces/int_OpLogEq.h
index b15a8b6a..446b11cd 100644
--- a/2.3-1/src/c/operations/interfaces/int_OpLogEq.h
+++ b/2.3-1/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/2.3-1/src/c/operations/interfaces/int_OpLogGe.h b/2.3-1/src/c/operations/interfaces/int_OpLogGe.h
index 0ce1ad81..edbdc071 100644
--- a/2.3-1/src/c/operations/interfaces/int_OpLogGe.h
+++ b/2.3-1/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/2.3-1/src/c/operations/interfaces/int_OpLogGt.h b/2.3-1/src/c/operations/interfaces/int_OpLogGt.h
index 161b654f..38c76cfb 100644
--- a/2.3-1/src/c/operations/interfaces/int_OpLogGt.h
+++ b/2.3-1/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/2.3-1/src/c/operations/interfaces/int_OpLogLe.h b/2.3-1/src/c/operations/interfaces/int_OpLogLe.h
index ebb09c7b..8dbd1aac 100644
--- a/2.3-1/src/c/operations/interfaces/int_OpLogLe.h
+++ b/2.3-1/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/2.3-1/src/c/operations/interfaces/int_OpLogLt.h b/2.3-1/src/c/operations/interfaces/int_OpLogLt.h
index 2c5d8639..8974b156 100644
--- a/2.3-1/src/c/operations/interfaces/int_OpLogLt.h
+++ b/2.3-1/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/2.3-1/src/c/operations/interfaces/int_OpLogNe.h b/2.3-1/src/c/operations/interfaces/int_OpLogNe.h
index 238ef483..56cafefa 100644
--- a/2.3-1/src/c/operations/interfaces/int_OpLogNe.h
+++ b/2.3-1/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/2.3-1/src/c/operations/interfaces/int_OpLogOr.h b/2.3-1/src/c/operations/interfaces/int_OpLogOr.h
index b5d55fba..5618ff63 100644
--- a/2.3-1/src/c/operations/interfaces/int_OpLogOr.h
+++ b/2.3-1/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 u80u80OpLogOru80(in1, in2) Bool2Uint8(in1 != 0 || in2 != 0)
+
+#define i80i80OpLogOri80(in1, in2) Bool2Int8(in1 != 0 || in2 != 0)
+
+#define u160u160OpLogOru160(in1, in2) Bool2Uint16(in1 != 0 || in2 != 0)
+
+#define i160i160OpLogOri160(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 i82i80OpLogOri82(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 u82u80OpLogOru82(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 u162u160OpLogOru162(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 i162i160OpLogOri162(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 u80u82OpLogOru82(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 i80i82OpLogOri82(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 u160u162OpLogOru162(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 i160i162OpLogOri162(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 u82u82OpLogOru82(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 i82i82OpLogOri82(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 u162u162OpLogOru162(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 i162i162OpLogOri162(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/2.3-1/src/c/scilab-arduino/cmd_analog_in/u8cmd_analog_ins.c b/2.3-1/src/c/scilab-arduino/cmd_analog_in/u8cmd_analog_ins.c
new file mode 100644
index 00000000..ebfad618
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/cmd_analog_in/u8cmd_analog_ins.c
@@ -0,0 +1,19 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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 "cmd_analog_in.h"
+
+uint16 u8cmd_analog_ins(uint8 board_no, uint8 pin)
+{
+ return((uint16)analogRead(pin));
+}
+
diff --git a/2.3-1/src/c/scilab-arduino/cmd_analog_out/u8cmd_analog_outs.c b/2.3-1/src/c/scilab-arduino/cmd_analog_out/u8cmd_analog_outs.c
new file mode 100644
index 00000000..94d51f6f
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/cmd_analog_out/u8cmd_analog_outs.c
@@ -0,0 +1,20 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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 "cmd_analog_out.h"
+
+uint8 u8cmd_analog_outs(uint8 board_no, uint8 pin, uint8 value)
+{
+ analogWrite(pin,value);
+ return 0;
+}
+
diff --git a/2.3-1/src/c/scilab-arduino/cmd_digital_in/u8cmd_digital_ins.c b/2.3-1/src/c/scilab-arduino/cmd_digital_in/u8cmd_digital_ins.c
new file mode 100644
index 00000000..1d0036a4
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/cmd_digital_in/u8cmd_digital_ins.c
@@ -0,0 +1,19 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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 "cmd_digital_in.h"
+
+uint8 u8cmd_digital_ins(uint8 board_no, uint8 pin)
+{
+ return((uint8)digitalRead(pin));
+}
+
diff --git a/2.3-1/src/c/scilab-arduino/cmd_digital_out/u8cmd_digital_outs.c b/2.3-1/src/c/scilab-arduino/cmd_digital_out/u8cmd_digital_outs.c
new file mode 100644
index 00000000..09dffd62
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/cmd_digital_out/u8cmd_digital_outs.c
@@ -0,0 +1,20 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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 "cmd_digital_out.h"
+
+uint8 u8cmd_digital_outs(uint8 board_no, uint8 pin, uint8 value)
+{
+ digitalWrite(pin,value);
+ return 0;
+}
+
diff --git a/2.3-1/src/c/scilab-arduino/includes/cmd_analog_in.h b/2.3-1/src/c/scilab-arduino/includes/cmd_analog_in.h
new file mode 100644
index 00000000..5361fe80
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/includes/cmd_analog_in.h
@@ -0,0 +1,29 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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
+ *
+ */
+
+
+#ifndef __CMD_ANALOG_IN_H__
+#define __CMD_ANALOG_IN_H__
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+uint16 u8cmd_analog_ins(uint8 board_no, uint8 pin);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __CMD_DIGITAL_IN_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/includes/cmd_analog_out.h b/2.3-1/src/c/scilab-arduino/includes/cmd_analog_out.h
new file mode 100644
index 00000000..d7fca535
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/includes/cmd_analog_out.h
@@ -0,0 +1,29 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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
+ *
+ */
+
+
+#ifndef __CMD_ANALOG_OUT_H__
+#define __CMD_ANALOG_OUT_H__
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+uint8 u8cmd_analog_outs(uint8 board_no, uint8 pin, uint8 value);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __CMD_ANALOG_OUT_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/includes/cmd_digital_in.h b/2.3-1/src/c/scilab-arduino/includes/cmd_digital_in.h
new file mode 100644
index 00000000..96fd24bb
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/includes/cmd_digital_in.h
@@ -0,0 +1,29 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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
+ *
+ */
+
+
+#ifndef __CMD_DIGITAL_IN_H__
+#define __CMD_DIGITAL_IN_H__
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+uint8 u8cmd_digital_ins(uint8 board_no, uint8 pin);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __CMD_DIGITAL_IN_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/includes/cmd_digital_out.h b/2.3-1/src/c/scilab-arduino/includes/cmd_digital_out.h
new file mode 100644
index 00000000..ee459d18
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/includes/cmd_digital_out.h
@@ -0,0 +1,29 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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
+ *
+ */
+
+
+#ifndef __CMD_DIGITAL_OUT_H__
+#define __CMD_DIGITAL_OUT_H__
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+uint8 u8cmd_digital_outs(uint8 board_no, uint8 pin, uint8 value);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __CMD_DIGITAL_OUT_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/includes/sleep.h b/2.3-1/src/c/scilab-arduino/includes/sleep.h
new file mode 100644
index 00000000..2e2940a3
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/includes/sleep.h
@@ -0,0 +1,29 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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
+ *
+ */
+
+
+#ifndef __SLEEP_H__
+#define __SLEEP_H__
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+uint8 u16sleeps(uint16 delay_ms);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __CMD_DIGITAL_OUT_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_in.h b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_in.h
new file mode 100644
index 00000000..0df8fcbf
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_in.h
@@ -0,0 +1,30 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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
+ *
+ */
+
+
+#ifndef __INT_CMD_ANALOG_IN_H__
+#define __INT_CMD_ANALOG_IN_H__
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0d0cmd_analog_inu160(in1,in2) u8cmd_analog_ins((uint8)in1,\
+ (uint8)in2)
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __INT_CMD_ANALOG_IN_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_out.h b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_out.h
new file mode 100644
index 00000000..d6b16f81
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_out.h
@@ -0,0 +1,30 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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
+ *
+ */
+
+
+#ifndef __INT_CMD_ANALOG_OUT_H__
+#define __INT_CMD_ANALOG_OUT_H__
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0d0d0cmd_digital_outu80(in1,in2,in3) u8cmd_analog_outs((uint8)in1,\
+ (uint8)in2,(uint8)in3)
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __INT_CMD_DIGITAL_OUT_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_in.h b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_in.h
new file mode 100644
index 00000000..04b773c6
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_in.h
@@ -0,0 +1,30 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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
+ *
+ */
+
+
+#ifndef __INT_CMD_DIGITAL_IN_H__
+#define __INT_CMD_DIGITAL_IN_H__
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0d0cmd_digital_inu80(in1,in2) u8cmd_digital_ins((uint8)in1,\
+ (uint8)in2)
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __INT_CMD_DIGITAL_IN_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h
new file mode 100644
index 00000000..a3d1eabd
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h
@@ -0,0 +1,30 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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
+ *
+ */
+
+
+#ifndef __INT_CMD_DIGITAL_OUT_H__
+#define __INT_CMD_DIGITAL_OUT_H__
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0d0d0cmd_digital_outu80(in1,in2,in3) u8cmd_digital_outs((uint8)in1,\
+ (uint8)in2,(uint8)in3)
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __INT_CMD_DIGITAL_OUT_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/interfaces/int_sleep.h b/2.3-1/src/c/scilab-arduino/interfaces/int_sleep.h
new file mode 100644
index 00000000..8e2d0824
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/interfaces/int_sleep.h
@@ -0,0 +1,29 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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
+ *
+ */
+
+
+#ifndef __INT_SLEEP_H__
+#define __INT_sLEEP_H__
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0sleepu80(in1) u16sleeps((uint16)in1)
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __INT_SLEEP_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/sleep/u16sleeps.c b/2.3-1/src/c/scilab-arduino/sleep/u16sleeps.c
new file mode 100644
index 00000000..14da0ba9
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/sleep/u16sleeps.c
@@ -0,0 +1,20 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA - Arnaud TORSET
+ *
+ * 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 "sleep.h"
+
+uint8 u16sleeps(uint16 delay_ms)
+{
+ delay(delay_ms);
+ return 0;
+}
+
diff --git a/2.3-1/src/c/type/int_imag.h b/2.3-1/src/c/type/int_imag.h
index 9647f6ad..6e6b7367 100644
--- a/2.3-1/src/c/type/int_imag.h
+++ b/2.3-1/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/2.3-1/src/c/type/int_real.h b/2.3-1/src/c/type/int_real.h
index 4949b883..ce097ec5 100644
--- a/2.3-1/src/c/type/int_real.h
+++ b/2.3-1/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__ */