summaryrefslogtreecommitdiff
path: root/src/c/elementaryFunctions/uint8
diff options
context:
space:
mode:
Diffstat (limited to 'src/c/elementaryFunctions/uint8')
-rw-r--r--src/c/elementaryFunctions/uint8/duint8a.c18
-rw-r--r--src/c/elementaryFunctions/uint8/duint8s.c18
-rw-r--r--src/c/elementaryFunctions/uint8/i16uint8a.c18
-rw-r--r--src/c/elementaryFunctions/uint8/i16uint8s.c18
-rw-r--r--src/c/elementaryFunctions/uint8/i8uint8a.c18
-rw-r--r--src/c/elementaryFunctions/uint8/i8uint8s.c18
-rw-r--r--src/c/elementaryFunctions/uint8/suint8a.c18
-rw-r--r--src/c/elementaryFunctions/uint8/suint8s.c18
-rw-r--r--src/c/elementaryFunctions/uint8/u16uint8a.c18
-rw-r--r--src/c/elementaryFunctions/uint8/u16uint8s.c18
10 files changed, 180 insertions, 0 deletions
diff --git a/src/c/elementaryFunctions/uint8/duint8a.c b/src/c/elementaryFunctions/uint8/duint8a.c
new file mode 100644
index 00000000..02d63058
--- /dev/null
+++ b/src/c/elementaryFunctions/uint8/duint8a.c
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - IIT Bombay - FOSSEE
+
+ 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
+ Author: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "uint8.h"
+
+void duint8a(double* x, int size, uint8* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = duint8s(x[i]);
+}
diff --git a/src/c/elementaryFunctions/uint8/duint8s.c b/src/c/elementaryFunctions/uint8/duint8s.c
new file mode 100644
index 00000000..d7a7524f
--- /dev/null
+++ b/src/c/elementaryFunctions/uint8/duint8s.c
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - IIT Bombay - FOSSEE
+
+ 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
+ Author: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#include "uint8.h"
+
+uint8 duint8s(double x) {
+ return (uint8) x;
+}
diff --git a/src/c/elementaryFunctions/uint8/i16uint8a.c b/src/c/elementaryFunctions/uint8/i16uint8a.c
new file mode 100644
index 00000000..49e31d12
--- /dev/null
+++ b/src/c/elementaryFunctions/uint8/i16uint8a.c
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - IIT Bombay - FOSSEE
+
+ 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
+ Author: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "uint8.h"
+
+void i16uint8a(int16* x, int size, uint8* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = i16uint8s(x[i]);
+}
diff --git a/src/c/elementaryFunctions/uint8/i16uint8s.c b/src/c/elementaryFunctions/uint8/i16uint8s.c
new file mode 100644
index 00000000..695d7882
--- /dev/null
+++ b/src/c/elementaryFunctions/uint8/i16uint8s.c
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - IIT Bombay - FOSSEE
+
+ 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
+ Author: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#include "uint8.h"
+
+uint8 i16uint8s(int16 x) {
+ return (uint8) x;
+}
diff --git a/src/c/elementaryFunctions/uint8/i8uint8a.c b/src/c/elementaryFunctions/uint8/i8uint8a.c
new file mode 100644
index 00000000..89574e83
--- /dev/null
+++ b/src/c/elementaryFunctions/uint8/i8uint8a.c
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - IIT Bombay - FOSSEE
+
+ 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
+ Author: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "uint8.h"
+
+void i8uint8a(int8* x, int size, uint8* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = i8uint8s(x[i]);
+}
diff --git a/src/c/elementaryFunctions/uint8/i8uint8s.c b/src/c/elementaryFunctions/uint8/i8uint8s.c
new file mode 100644
index 00000000..4c83c4e4
--- /dev/null
+++ b/src/c/elementaryFunctions/uint8/i8uint8s.c
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - IIT Bombay - FOSSEE
+
+ 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
+ Author: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#include "uint8.h"
+
+uint8 i8uint8s(int8 x) {
+ return (uint8) x;
+}
diff --git a/src/c/elementaryFunctions/uint8/suint8a.c b/src/c/elementaryFunctions/uint8/suint8a.c
new file mode 100644
index 00000000..2e1a5ac8
--- /dev/null
+++ b/src/c/elementaryFunctions/uint8/suint8a.c
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - IIT Bombay - FOSSEE
+
+ 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
+ Author: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "uint8.h"
+
+void suint8a(float* x, int size, uint8* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = suint8s(x[i]);
+}
diff --git a/src/c/elementaryFunctions/uint8/suint8s.c b/src/c/elementaryFunctions/uint8/suint8s.c
new file mode 100644
index 00000000..ce38c1d0
--- /dev/null
+++ b/src/c/elementaryFunctions/uint8/suint8s.c
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - IIT Bombay - FOSSEE
+
+ 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
+ Author: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#include "uint8.h"
+
+uint8 suint8s(float x) {
+ return (uint8) x;
+}
diff --git a/src/c/elementaryFunctions/uint8/u16uint8a.c b/src/c/elementaryFunctions/uint8/u16uint8a.c
new file mode 100644
index 00000000..0c4246ec
--- /dev/null
+++ b/src/c/elementaryFunctions/uint8/u16uint8a.c
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - IIT Bombay - FOSSEE
+
+ 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
+ Author: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "uint8.h"
+
+void u16uint8a(uint16* x, int size, uint8* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = u16uint8s(x[i]);
+}
diff --git a/src/c/elementaryFunctions/uint8/u16uint8s.c b/src/c/elementaryFunctions/uint8/u16uint8s.c
new file mode 100644
index 00000000..32d5b718
--- /dev/null
+++ b/src/c/elementaryFunctions/uint8/u16uint8s.c
@@ -0,0 +1,18 @@
+/* Copyright (C) 2016 - IIT Bombay - FOSSEE
+
+ 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
+ Author: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#include "uint8.h"
+
+uint8 u16uint8s(uint16 x) {
+ return (uint8) x;
+}