summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/elementaryFunctions/float
diff options
context:
space:
mode:
authorSandeep Gupta2017-06-18 23:55:40 +0530
committerSandeep Gupta2017-06-18 23:55:40 +0530
commitb43eccd4cffed5bd1017c5821524fb6e49202f78 (patch)
tree4c53d798252cbeae9bcf7dc9604524b20bb10f27 /2.3-1/src/c/elementaryFunctions/float
downloadScilab2C-b43eccd4cffed5bd1017c5821524fb6e49202f78.tar.gz
Scilab2C-b43eccd4cffed5bd1017c5821524fb6e49202f78.tar.bz2
Scilab2C-b43eccd4cffed5bd1017c5821524fb6e49202f78.zip
First commit
Diffstat (limited to '2.3-1/src/c/elementaryFunctions/float')
-rw-r--r--2.3-1/src/c/elementaryFunctions/float/dfloata.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/float/dfloats.c16
-rw-r--r--2.3-1/src/c/elementaryFunctions/float/i16floata.c17
-rw-r--r--2.3-1/src/c/elementaryFunctions/float/i16floats.c16
-rw-r--r--2.3-1/src/c/elementaryFunctions/float/i8floata.c17
-rw-r--r--2.3-1/src/c/elementaryFunctions/float/i8floats.c16
-rw-r--r--2.3-1/src/c/elementaryFunctions/float/sfloata.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/float/sfloats.c16
-rw-r--r--2.3-1/src/c/elementaryFunctions/float/u16floata.c17
-rw-r--r--2.3-1/src/c/elementaryFunctions/float/u16floats.c16
-rw-r--r--2.3-1/src/c/elementaryFunctions/float/u8floata.c17
-rw-r--r--2.3-1/src/c/elementaryFunctions/float/u8floats.c16
12 files changed, 200 insertions, 0 deletions
diff --git a/2.3-1/src/c/elementaryFunctions/float/dfloata.c b/2.3-1/src/c/elementaryFunctions/float/dfloata.c
new file mode 100644
index 00000000..9705bd1a
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/float/dfloata.c
@@ -0,0 +1,18 @@
+/* Copyright (C) 2017 - 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
+ Organization: FOSSEE, IIT Bombay
+ Author: Shamik Guha
+ Email: toolbox@scilab.in
+*/
+#include "get_float.h"
+
+void dfloata(double* x, int size, float* out) {
+ int i = 0;
+ for (i=0;i<size;i++)
+ out[i] = dfloats(x[i]);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/float/dfloats.c b/2.3-1/src/c/elementaryFunctions/float/dfloats.c
new file mode 100644
index 00000000..ece554a8
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/float/dfloats.c
@@ -0,0 +1,16 @@
+/* Copyright (C) 2017 - 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
+ Organization: FOSSEE, IIT Bombay
+ Author: Shamik Guha
+ Email: toolbox@scilab.in
+*/
+#include "get_float.h"
+
+float dfloats(double x) {
+ return (float) x;
+}
diff --git a/2.3-1/src/c/elementaryFunctions/float/i16floata.c b/2.3-1/src/c/elementaryFunctions/float/i16floata.c
new file mode 100644
index 00000000..c8113af9
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/float/i16floata.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2017 - 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
+ Organization: FOSSEE, IIT Bombay
+ Author: Shamik Guha
+ Email: toolbox@scilab.in
+*/
+#include "get_float.h"
+
+void i16floata(int16* x, int size, float* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = i16floats(x[i]);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/float/i16floats.c b/2.3-1/src/c/elementaryFunctions/float/i16floats.c
new file mode 100644
index 00000000..9f3ee063
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/float/i16floats.c
@@ -0,0 +1,16 @@
+/* Copyright (C) 2017 - 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
+ Organization: FOSSEE, IIT Bombay
+ Author: Shamik Guha
+ Email: toolbox@scilab.in
+*/
+#include "get_float.h"
+
+float i16floats(int16 x) {
+ return (float) x;
+}
diff --git a/2.3-1/src/c/elementaryFunctions/float/i8floata.c b/2.3-1/src/c/elementaryFunctions/float/i8floata.c
new file mode 100644
index 00000000..52f9a6a6
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/float/i8floata.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2017 - 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
+ Organization: FOSSEE, IIT Bombay
+ Author: Shamik Guha
+ Email: toolbox@scilab.in
+*/
+#include "get_float.h"
+
+void i8floata(int8* x, int size, float* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = i8floats(x[i]);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/float/i8floats.c b/2.3-1/src/c/elementaryFunctions/float/i8floats.c
new file mode 100644
index 00000000..88127b3f
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/float/i8floats.c
@@ -0,0 +1,16 @@
+/* Copyright (C) 2017 - 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
+ Organization: FOSSEE, IIT Bombay
+ Author: Shamik Guha
+ Email: toolbox@scilab.in
+*/
+#include "get_float.h"
+
+float i8floats(int8 x) {
+ return (float) x;
+}
diff --git a/2.3-1/src/c/elementaryFunctions/float/sfloata.c b/2.3-1/src/c/elementaryFunctions/float/sfloata.c
new file mode 100644
index 00000000..34337068
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/float/sfloata.c
@@ -0,0 +1,18 @@
+/* Copyright (C) 2017 - 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
+ Organization: FOSSEE, IIT Bombay
+ Author: Shamik Guha
+ Email: toolbox@scilab.in
+*/
+#include "get_float.h"
+
+void sfloata(float* x, int size, float* out) {
+ int i = 0;
+ for (i=0;i<size;i++)
+ out[i] = sfloats(x[i]);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/float/sfloats.c b/2.3-1/src/c/elementaryFunctions/float/sfloats.c
new file mode 100644
index 00000000..3351fb03
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/float/sfloats.c
@@ -0,0 +1,16 @@
+/* Copyright (C) 2017 - 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
+ Organization: FOSSEE, IIT Bombay
+ Author: Shamik Guha
+ Email: toolbox@scilab.in
+*/
+#include "get_float.h"
+
+float sfloats(float x) {
+ return (float) x;
+}
diff --git a/2.3-1/src/c/elementaryFunctions/float/u16floata.c b/2.3-1/src/c/elementaryFunctions/float/u16floata.c
new file mode 100644
index 00000000..febe5e08
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/float/u16floata.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2017 - 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
+ Organization: FOSSEE, IIT Bombay
+ Author: Shamik Guha
+ Email: toolbox@scilab.in
+*/
+#include "get_float.h"
+
+void u16floata(uint16* x, int size, float* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = u16floats(x[i]);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/float/u16floats.c b/2.3-1/src/c/elementaryFunctions/float/u16floats.c
new file mode 100644
index 00000000..47e19aed
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/float/u16floats.c
@@ -0,0 +1,16 @@
+/* Copyright (C) 2017 - 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
+ Organization: FOSSEE, IIT Bombay
+ Author: Shamik Guha
+ Email: toolbox@scilab.in
+*/
+#include "get_float.h"
+
+float u16floats(uint16 x) {
+ return (float) x;
+}
diff --git a/2.3-1/src/c/elementaryFunctions/float/u8floata.c b/2.3-1/src/c/elementaryFunctions/float/u8floata.c
new file mode 100644
index 00000000..a4a1fec3
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/float/u8floata.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2017 - 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
+ Organization: FOSSEE, IIT Bombay
+ Author: Shamik Guha
+ Email: toolbox@scilab.in
+*/
+#include "get_float.h"
+
+void u8floata(uint8* x, int size, float* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = u8floats(x[i]);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/float/u8floats.c b/2.3-1/src/c/elementaryFunctions/float/u8floats.c
new file mode 100644
index 00000000..8b7dd8df
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/float/u8floats.c
@@ -0,0 +1,16 @@
+/* Copyright (C) 2017 - 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
+ Organization: FOSSEE, IIT Bombay
+ Author: Shamik Guha
+ Email: toolbox@scilab.in
+*/
+#include "get_float.h"
+
+float u8floats(uint8 x) {
+ return (float) x;
+}