summaryrefslogtreecommitdiff
path: root/src/c/operations
diff options
context:
space:
mode:
Diffstat (limited to 'src/c/operations')
-rw-r--r--src/c/operations/addition/i16adda.c20
-rw-r--r--src/c/operations/addition/i16adds.c18
-rw-r--r--src/c/operations/addition/i8adds.c18
-rw-r--r--src/c/operations/addition/u16adda.c20
-rw-r--r--src/c/operations/addition/u16adds.c18
-rw-r--r--src/c/operations/addition/u8adda.c20
-rw-r--r--src/c/operations/addition/u8adds.c18
-rw-r--r--src/c/operations/includes/addition.h81
-rw-r--r--src/c/operations/includes/subtraction.h83
-rw-r--r--src/c/operations/interfaces/int_OpMinus.h69
-rw-r--r--src/c/operations/interfaces/int_OpPlus.h41
-rw-r--r--src/c/operations/subtraction/i16diffa.c20
-rw-r--r--src/c/operations/subtraction/i16diffs.c18
-rw-r--r--src/c/operations/subtraction/i8diffa.c20
-rw-r--r--src/c/operations/subtraction/i8diffs.c18
-rw-r--r--src/c/operations/subtraction/u16diffa.c20
-rw-r--r--src/c/operations/subtraction/u16diffs.c18
-rw-r--r--src/c/operations/subtraction/u8diffa.c20
-rw-r--r--src/c/operations/subtraction/u8diffs.c18
19 files changed, 558 insertions, 0 deletions
diff --git a/src/c/operations/addition/i16adda.c b/src/c/operations/addition/i16adda.c
new file mode 100644
index 00000000..8c28a989
--- /dev/null
+++ b/src/c/operations/addition/i16adda.c
@@ -0,0 +1,20 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-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
+ * 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 "addition.h"
+
+void i16adda(int16* in1, int size1, int16* in2, int size2, int16* out) {
+ int i = 0;
+ for (i = 0; i < size1 && i < size2; ++i) {
+ out[i] = i16adds(in1[i], in2[i]);
+ }
+}
diff --git a/src/c/operations/addition/i16adds.c b/src/c/operations/addition/i16adds.c
new file mode 100644
index 00000000..ea36a911
--- /dev/null
+++ b/src/c/operations/addition/i16adds.c
@@ -0,0 +1,18 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-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
+ * 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 "addition.h"
+
+int16 i16adds(int16 in1, int16 in2)
+{
+ return (in1 + in2);
+}
diff --git a/src/c/operations/addition/i8adds.c b/src/c/operations/addition/i8adds.c
new file mode 100644
index 00000000..aee40458
--- /dev/null
+++ b/src/c/operations/addition/i8adds.c
@@ -0,0 +1,18 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-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
+ * 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 "addition.h"
+
+int8 i8adds(int8 in1, int8 in2)
+{
+ return (in1 + in2);
+}
diff --git a/src/c/operations/addition/u16adda.c b/src/c/operations/addition/u16adda.c
new file mode 100644
index 00000000..884e0994
--- /dev/null
+++ b/src/c/operations/addition/u16adda.c
@@ -0,0 +1,20 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-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
+ * 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 "addition.h"
+
+void u16adda(uint16* in1, int size1, uint16* in2, int size2, uint16* out) {
+ int i = 0;
+ for (i = 0; i < size1 && i < size2; ++i) {
+ out[i] = u16adds(in1[i], in2[i]);
+ }
+}
diff --git a/src/c/operations/addition/u16adds.c b/src/c/operations/addition/u16adds.c
new file mode 100644
index 00000000..f52dd055
--- /dev/null
+++ b/src/c/operations/addition/u16adds.c
@@ -0,0 +1,18 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-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
+ * 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 "addition.h"
+
+uint16 u16adds(uint16 in1, uint16 in2)
+{
+ return (in1 + in2);
+}
diff --git a/src/c/operations/addition/u8adda.c b/src/c/operations/addition/u8adda.c
new file mode 100644
index 00000000..4c195b07
--- /dev/null
+++ b/src/c/operations/addition/u8adda.c
@@ -0,0 +1,20 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-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
+ * 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 "addition.h"
+
+void u8adda(uint8* in1, int size1, uint8* in2, int size2, uint8* out) {
+ int i = 0;
+ for (i = 0; i < size1 && i < size2; ++i) {
+ out[i] = u8adds(in1[i], in2[i]);
+ }
+}
diff --git a/src/c/operations/addition/u8adds.c b/src/c/operations/addition/u8adds.c
new file mode 100644
index 00000000..b729c3bd
--- /dev/null
+++ b/src/c/operations/addition/u8adds.c
@@ -0,0 +1,18 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-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
+ * 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 "addition.h"
+
+uint8 u8adds(uint8 in1, uint8 in2)
+{
+ return (in1 + in2);
+}
diff --git a/src/c/operations/includes/addition.h b/src/c/operations/includes/addition.h
index d6f03381..fbf0177b 100644
--- a/src/c/operations/includes/addition.h
+++ b/src/c/operations/includes/addition.h
@@ -16,6 +16,7 @@
#include "dynlib_operations.h"
#include "floatComplex.h"
#include "doubleComplex.h"
+#include "types.h"
#ifdef __cplusplus
extern "C" {
@@ -108,6 +109,86 @@ EXTERN_OPERATIONS void zadda(doubleComplex *in1, int size1,
doubleComplex *in2, int size2,
doubleComplex *out);
+/*
+** \brief Compute an addition with uint8.
+** \param in1 : input uint8.
+** \param in2 : input uint8.
+** \return : in1 + in2
+*/
+EXTERN_OPERATIONS uint8 u8adds(uint8 in1, uint8 in2);
+
+/*
+** \brief Compute an addition element wise for uint8.
+** \param in1 : input array.
+** \param size1 : size of in1 array.
+** \param in2 : input arry.
+** \param size2 : size of in2 array.
+** \param out : array that contains the addition in1 + in2.
+*/
+EXTERN_OPERATIONS void u8adda(uint8 *in1, int size1,
+ uint8 *in2, int size2,
+ uint8 *out);
+
+/*
+** \brief Compute an addition with int8.
+** \param in1 : input int8.
+** \param in2 : input int8.
+** \return : in1 + in2
+*/
+EXTERN_OPERATIONS int8 i8adds(int8 in1, int8 in2);
+
+/*
+** \brief Compute an addition element wise for int8.
+** \param in1 : input array.
+** \param size1 : size of in1 array.
+** \param in2 : input arry.
+** \param size2 : size of in2 array.
+** \param out : array that contains the addition in1 + in2.
+*/
+EXTERN_OPERATIONS void i8adda(int8 *in1, int size1,
+ int8 *in2, int size2,
+ int8 *out);
+
+/*
+** \brief Compute an addition with uint16.
+** \param in1 : input uint16.
+** \param in2 : input uint16.
+** \return : in1 + in2
+*/
+EXTERN_OPERATIONS uint16 u16adds(uint16 in1, uint16 in2);
+
+/*
+** \brief Compute an addition element wise for uint16.
+** \param in1 : input array.
+** \param size1 : size of in1 array.
+** \param in2 : input arry.
+** \param size2 : size of in2 array.
+** \param out : array that contains the addition in1 + in2.
+*/
+EXTERN_OPERATIONS void u16adda(uint16 *in1, int size1,
+ uint16 *in2, int size2,
+ uint16 *out);
+
+/*
+** \brief Compute an addition with int16.
+** \param in1 : input int16.
+** \param in2 : input int16.
+** \return : in1 + in2
+*/
+EXTERN_OPERATIONS int16 i16adds(int16 in1, int16 in2);
+
+/*
+** \brief Compute an addition element wise for int16.
+** \param in1 : input array.
+** \param size1 : size of in1 array.
+** \param in2 : input arry.
+** \param size2 : size of in2 array.
+** \param out : array that contains the addition in1 + in2.
+*/
+EXTERN_OPERATIONS void i16adda(int16 *in1, int size1,
+ int16 *in2, int size2,
+ int16 *out);
+
#ifdef __cplusplus
} /* extern "C" */
#endif
diff --git a/src/c/operations/includes/subtraction.h b/src/c/operations/includes/subtraction.h
index 8571a5de..798df2bf 100644
--- a/src/c/operations/includes/subtraction.h
+++ b/src/c/operations/includes/subtraction.h
@@ -16,6 +16,7 @@
#include "dynlib_operations.h"
#include "floatComplex.h"
#include "doubleComplex.h"
+#include "types.h"
#ifdef __cplusplus
extern "C" {
@@ -107,6 +108,88 @@ EXTERN_OPERATIONS void zdiffa(doubleComplex *in1, int size1,
doubleComplex *in2, int size2,
doubleComplex *out);
+
+/*
+** \brief Compute a subtraction with uint8.
+** \param in1 : input uint8.
+** \param in2 : input uint8.
+** \return : in1 + in2
+*/
+EXTERN_OPERATIONS uint8 u8diffs(uint8 in1, uint8 in2);
+
+/*
+** \brief Compute a subtraction element wise for uint8.
+** \param in1 : input array.
+** \param size1 : size of in1 array.
+** \param in2 : input arry.
+** \param size2 : size of in2 array.
+** \param out : array that contains the subtraction in1 + in2.
+*/
+EXTERN_OPERATIONS void u8diffa(uint8 *in1, int size1,
+ uint8 *in2, int size2,
+ uint8 *out);
+
+/*
+** \brief Compute a subtraction with int8.
+** \param in1 : input int8.
+** \param in2 : input int8.
+** \return : in1 + in2
+*/
+EXTERN_OPERATIONS int8 i8diffs(int8 in1, int8 in2);
+
+/*
+** \brief Compute a subtraction element wise for int8.
+** \param in1 : input array.
+** \param size1 : size of in1 array.
+** \param in2 : input arry.
+** \param size2 : size of in2 array.
+** \param out : array that contains the subtraction in1 + in2.
+*/
+EXTERN_OPERATIONS void i8diffa(int8 *in1, int size1,
+ int8 *in2, int size2,
+ int8 *out);
+
+
+/*
+** \brief Compute a subtraction with uint16.
+** \param in1 : input uint16.
+** \param in2 : input uint16.
+** \return : in1 + in2
+*/
+EXTERN_OPERATIONS uint16 u16diffs(uint16 in1, uint16 in2);
+
+/*
+** \brief Compute a subtraction element wise for uint16.
+** \param in1 : input array.
+** \param size1 : size of in1 array.
+** \param in2 : input arry.
+** \param size2 : size of in2 array.
+** \param out : array that contains the subtraction in1 + in2.
+*/
+EXTERN_OPERATIONS void u16diffa(uint16 *in1, int size1,
+ uint16 *in2, int size2,
+ uint16 *out);
+
+/*
+** \brief Compute a subtraction with int16.
+** \param in1 : input int16.
+** \param in2 : input int16.
+** \return : in1 + in2
+*/
+EXTERN_OPERATIONS int16 i16diffs(int16 in1, int16 in2);
+
+/*
+** \brief Compute a subtraction element wise for int16.
+** \param in1 : input array.
+** \param size1 : size of in1 array.
+** \param in2 : input arry.
+** \param size2 : size of in2 array.
+** \param out : array that contains the subtraction in1 + in2.
+*/
+EXTERN_OPERATIONS void i16diffa(int16 *in1, int size1,
+ int16 *in2, int size2,
+ int16 *out);
+
#ifdef __cplusplus
} /* extern "C" */
#endif
diff --git a/src/c/operations/interfaces/int_OpMinus.h b/src/c/operations/interfaces/int_OpMinus.h
index ac27ddb6..b96328ed 100644
--- a/src/c/operations/interfaces/int_OpMinus.h
+++ b/src/c/operations/interfaces/int_OpMinus.h
@@ -25,6 +25,14 @@
#define z0OpMinusz0(in) DoubleComplex(-zreals(in), -zimags(in))
+#define u80OpMinusu80(in) -(int8)in
+
+#define i80OpMinusi80(in) -in
+
+#define u160OpMinusu160(in) -(int16)in
+
+#define i160OpMinusi160(in) -in
+
/* - Matrix */
#define s2OpMinuss2(in, size, out) {int i=0; \
@@ -43,6 +51,19 @@
for (i=0;i<size[0]*size[1];i++) out[i] = DoubleComplex(-zreals(in[i]), -zimags(in[i])); \
}
+#define u82OpMinusu82(in, size, out) {int i=0; \
+ for (i=0;i<size[0]*size[1];i++) out[i] = -(int8)in[i]; \
+ }
+
+
+#define u82OpMinusu82(in, size, out) {int i=0; \
+ for (i=0;i<size[0]*size[1];i++) out[i] = -in[i]; \
+ }
+
+
+#define u162OpMinusu162(in, size, out) {int i=0; \
+ for (i=0;i<size[0]*size[1];i++) out[i] = -(int16)in[i]; \
+ }
/* Scalar - Scalar */
@@ -62,6 +83,14 @@
#define z0d0OpMinusz0(in1,in2) zdiffs(in1,DoubleComplex(in2,0))
+#define u80u80OpMinusu80(in1,in2) u8diffs(in1,in2)
+
+#define i80i80OpMinusi80(in1,in2) i8diffs(in1,in2)
+
+#define u160u160OpMinusu160(in1,in2) u16diffs(in1,in2)
+
+#define i160i160OpMinusi160(in1,in2) i16diffs(in1,in2)
+
/* Matrix - Scalar */
@@ -99,6 +128,25 @@
}
+#define u82u80OpMinusu82(in1,size,in2,out) {int i=0; \
+ for (i=0;i<size[0]*size[1];i++) out[i]=in1[i]-in2; \
+ }
+
+
+#define i82i80OpMinusi82(in1,size,in2,out) {int i=0; \
+ for (i=0;i<size[0]*size[1];i++) out[i]=in1[i]-in2; \
+ }
+
+
+#define u162u160OpMinusu162(in1,size,in2,out) {int i=0; \
+ for (i=0;i<size[0]*size[1];i++) out[i]=in1[i]-in2; \
+ }
+
+
+#define i162i160OpMinusi162(in1,size,in2,out) {int i=0; \
+ for (i=0;i<size[0]*size[1];i++) out[i]=in1[i]-in2; \
+ }
+
/* Scalar - Matrix */
@@ -136,6 +184,22 @@
}
+#define u80u82OpMinusu82(in1,in2,size,out) {int i=0; \
+ for (i=0;i<size[0]*size[1];i++) out[i]=in1-in2[i]; \
+ }
+
+
+#define i80i82OpMinusi82(in1,in2,size,out) {int i=0; \
+ for (i=0;i<size[0]*size[1];i++) out[i]=in1-in2[i]; \
+ }
+
+#define u160u162OpMinusu162(in1,in2,size,out) {int i=0; \
+ for (i=0;i<size[0]*size[1];i++) out[i]=in1-in2[i]; \
+ }
+
+#define i160i162OpMinusi162(in1,in2,size,out) {int i=0; \
+ for (i=0;i<size[0]*size[1];i++) out[i]=in1-in2[i]; \
+ }
/* Matrix - Matrix */
@@ -167,7 +231,12 @@
for (i=0;i<size1[0]*size2[1];i++) out[i]=zdiffs(in1[i],DoubleComplex(in2[i],0)); \
}
+#define u82u82OpMinusu82(in1,size1,in2,size2,out) u8diffa(in1, size1[0]*size1[1], in2, size2[0]*size2[1], out)
+
+#define i82i82OpMinusi82(in1,size1,in2,size2,out) i8diffa(in1, size1[0]*size1[1], in2, size2[0]*size2[1], out)
+#define u162u162OpMinusu162(in1,size1,in2,size2,out) u16diffa(in1, size1[0]*size1[1], in2, size2[0]*size2[1], out)
+#define i162i162OpMinusu162(in1,size1,in2,size2,out) i16diffa(in1, size1[0]*size1[1], in2, size2[0]*size2[1], out)
#endif /* !__INT_OPMINUS_H__ */
diff --git a/src/c/operations/interfaces/int_OpPlus.h b/src/c/operations/interfaces/int_OpPlus.h
index cb86d815..9684d250 100644
--- a/src/c/operations/interfaces/int_OpPlus.h
+++ b/src/c/operations/interfaces/int_OpPlus.h
@@ -34,7 +34,13 @@
#define z0d0OpPlusz0(in1,in2) zadds(in1,DoubleComplex(in2,0))
+#define u80u80OpPlusu80(in1,in2) u8adds(in1,in2)
+#define i80i80OpPlusi80(in1,in2) i8adds(in1,in2)
+
+#define u160u160OpPlusu160(in1,in2) u16adds(in1,in2)
+
+#define i160i160OpPlusi160(in1,in2) i16adds(in1,in2)
/* Matrix + Scalar */
@@ -68,6 +74,21 @@
for (i=0;i<size[0]*size[1];i++) out[i]=zadds(DoubleComplex(in1[i],0),in2);\
}
+#define u82u80OpPlusu82(in1,size,in2,out) {int i=0;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=in1[i]+in2;\
+ }
+
+#define i82i80OpPlusi82(in1,size,in2,out) {int i=0;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=in1[i]+in2;\
+ }
+
+#define u162u160OpPlusu162(in1,size,in2,out) {int i=0;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=in1[i]+in2;\
+ }
+
+#define i162i160OpPlusi162(in1,size,in2,out) {int i=0;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=in1[i]+in2;\
+ }
/* Scalar + Matrix */
@@ -101,7 +122,21 @@
for (i=0;i<size[0]*size[1];i++) out[i]=zadds(in1,DoubleComplex(in2[i],0));\
}
+#define u80u82OpPlusu82(in1,in2,size,out) {int i=0;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=in1+in2[i];\
+ }
+
+#define i80i82OpPlusi82(in1,in2,size,out) {int i=0;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=in1+in2[i];\
+ }
+
+#define u160u162OpPlusu162(in1,in2,size,out) {int i=0;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=in1+in2[i];\
+ }
+#define i160i162OpPlusi162(in1,in2,size,out) {int i=0;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=in1+in2[i];\
+ }
/* Matrix + Matrix */
@@ -132,7 +167,13 @@
for (i=0;i<size1[0]*size2[1];i++) out[i]=zadds(in1[i],DoubleComplex(in2[i],0));\
}
+#define u82u82OpPlusu82(in1,size1,in2,size2,out) u8adda(in1, size1[0]*size1[1], in2, size2[0]*size2[1], out)
+
+#define i82i82OpPlusi82(in1,size1,in2,size2,out) i8adda(in1, size1[0]*size1[1], in2, size2[0]*size2[1], out)
+
+#define u162u162OpPlusu162(in1,size1,in2,size2,out) u16adda(in1, size1[0]*size1[1], in2, size2[0]*size2[1], out)
+#define i162i162OpPlusu162(in1,size1,in2,size2,out) i16adda(in1, size1[0]*size1[1], in2, size2[0]*size2[1], out)
/* Strings */
/* RNU: size1[1]-1 -> "-1" because '\0' of the first string must be removed. */
#define g2g2OpPlusg2(in1,size1,in2,size2,out) {int i = 0, j = 0; \
diff --git a/src/c/operations/subtraction/i16diffa.c b/src/c/operations/subtraction/i16diffa.c
new file mode 100644
index 00000000..ca722af0
--- /dev/null
+++ b/src/c/operations/subtraction/i16diffa.c
@@ -0,0 +1,20 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-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
+ * 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 "subtraction.h"
+
+void i16diffa(int16* in1, int size1, int16* in2, int size2, int16* out) {
+ int i = 0;
+ for (i = 0; i < size1 && i < size2; ++i) {
+ out[i] = i16diffs(in1[i], in2[i]);
+ }
+}
diff --git a/src/c/operations/subtraction/i16diffs.c b/src/c/operations/subtraction/i16diffs.c
new file mode 100644
index 00000000..6ca2e52c
--- /dev/null
+++ b/src/c/operations/subtraction/i16diffs.c
@@ -0,0 +1,18 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-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
+ * 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 "subtraction.h"
+
+int16 i16diffs(int16 in1, int16 in2)
+{
+ return (in1 - in2);
+}
diff --git a/src/c/operations/subtraction/i8diffa.c b/src/c/operations/subtraction/i8diffa.c
new file mode 100644
index 00000000..ec966bf5
--- /dev/null
+++ b/src/c/operations/subtraction/i8diffa.c
@@ -0,0 +1,20 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-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
+ * 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 "subtraction.h"
+
+void i8diffa(int8* in1, int size1, int8* in2, int size2, int8* out) {
+ int i = 0;
+ for (i = 0; i < size1 && i < size2; ++i) {
+ out[i] = i8diffs(in1[i], in2[i]);
+ }
+}
diff --git a/src/c/operations/subtraction/i8diffs.c b/src/c/operations/subtraction/i8diffs.c
new file mode 100644
index 00000000..bbc9a1a4
--- /dev/null
+++ b/src/c/operations/subtraction/i8diffs.c
@@ -0,0 +1,18 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-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
+ * 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 "subtraction.h"
+
+int8 i8diffs(int8 in1, int8 in2)
+{
+ return (in1 - in2);
+}
diff --git a/src/c/operations/subtraction/u16diffa.c b/src/c/operations/subtraction/u16diffa.c
new file mode 100644
index 00000000..7c216bb8
--- /dev/null
+++ b/src/c/operations/subtraction/u16diffa.c
@@ -0,0 +1,20 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-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
+ * 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 "subtraction.h"
+
+void u16diffa(uint16* in1, int size1, uint16* in2, int size2, uint16* out) {
+ int i = 0;
+ for (i = 0; i < size1 && i < size2; ++i) {
+ out[i] = u16diffs(in1[i], in2[i]);
+ }
+}
diff --git a/src/c/operations/subtraction/u16diffs.c b/src/c/operations/subtraction/u16diffs.c
new file mode 100644
index 00000000..bd52d66a
--- /dev/null
+++ b/src/c/operations/subtraction/u16diffs.c
@@ -0,0 +1,18 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-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
+ * 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 "subtraction.h"
+
+uint16 u16diffs(uint16 in1, uint16 in2)
+{
+ return (in1 - in2);
+}
diff --git a/src/c/operations/subtraction/u8diffa.c b/src/c/operations/subtraction/u8diffa.c
new file mode 100644
index 00000000..42c06f7d
--- /dev/null
+++ b/src/c/operations/subtraction/u8diffa.c
@@ -0,0 +1,20 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-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
+ * 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 "subtraction.h"
+
+void u8diffa(uint8* in1, int size1, uint8* in2, int size2, uint8* out) {
+ int i = 0;
+ for (i = 0; i < size1 && i < size2; ++i) {
+ out[i] = u8diffs(in1[i], in2[i]);
+ }
+}
diff --git a/src/c/operations/subtraction/u8diffs.c b/src/c/operations/subtraction/u8diffs.c
new file mode 100644
index 00000000..bc9beacb
--- /dev/null
+++ b/src/c/operations/subtraction/u8diffs.c
@@ -0,0 +1,18 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-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
+ * 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 "subtraction.h"
+
+uint8 u8diffs(uint8 in1, uint8 in2)
+{
+ return (in1 - in2);
+}