summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/elementaryFunctions/bitand
diff options
context:
space:
mode:
authorimushir2016-01-22 16:01:46 +0530
committerimushir2016-01-22 16:01:46 +0530
commit0296cf3166e7250191f0e08907b65dad9e665e46 (patch)
treeadaf5a67239b9db13a469b3a5921c0efb234257e /2.3-1/src/c/elementaryFunctions/bitand
parent2803a0bccff2ca4f4b5b81d3ef7f7cf3c75e0ec9 (diff)
downloadScilab2C-0296cf3166e7250191f0e08907b65dad9e665e46.tar.gz
Scilab2C-0296cf3166e7250191f0e08907b65dad9e665e46.tar.bz2
Scilab2C-0296cf3166e7250191f0e08907b65dad9e665e46.zip
added support of uint8,uint16 for bitwise operators
Diffstat (limited to '2.3-1/src/c/elementaryFunctions/bitand')
-rw-r--r--2.3-1/src/c/elementaryFunctions/bitand/u16bitanda.c14
-rw-r--r--2.3-1/src/c/elementaryFunctions/bitand/u16bitands.c9
-rw-r--r--2.3-1/src/c/elementaryFunctions/bitand/u8bitanda.c14
-rw-r--r--2.3-1/src/c/elementaryFunctions/bitand/u8bitands.c9
4 files changed, 46 insertions, 0 deletions
diff --git a/2.3-1/src/c/elementaryFunctions/bitand/u16bitanda.c b/2.3-1/src/c/elementaryFunctions/bitand/u16bitanda.c
new file mode 100644
index 00000000..743161ea
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/bitand/u16bitanda.c
@@ -0,0 +1,14 @@
+/* Scilab2C FOSSEE IITB */
+#include "bitand.h"
+
+void u16bitanda(uint16* x,uint16* y,int size,uint16* out)
+{
+ int i = 0;
+ for(i=0;i<size;i++)
+ {
+ out[i] = u16bitands(x[i],y[i]);
+ }
+
+
+}
+
diff --git a/2.3-1/src/c/elementaryFunctions/bitand/u16bitands.c b/2.3-1/src/c/elementaryFunctions/bitand/u16bitands.c
new file mode 100644
index 00000000..7ba73c15
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/bitand/u16bitands.c
@@ -0,0 +1,9 @@
+/* Scilab2C FOSSEE IITB */
+
+#include "bitand.h"
+
+uint16 u16bitands(uint16 x,uint16 y)
+{
+ return (x & y);
+
+}
diff --git a/2.3-1/src/c/elementaryFunctions/bitand/u8bitanda.c b/2.3-1/src/c/elementaryFunctions/bitand/u8bitanda.c
new file mode 100644
index 00000000..e1260a71
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/bitand/u8bitanda.c
@@ -0,0 +1,14 @@
+/* Scilab2C FOSSEE IITB */
+#include "bitand.h"
+
+void u8bitanda(uint8* x,uint8* y,int size,uint8* out)
+{
+ int i = 0;
+ for(i=0;i<size;i++)
+ {
+ out[i] = u8bitands(x[i],y[i]);
+ }
+
+
+}
+
diff --git a/2.3-1/src/c/elementaryFunctions/bitand/u8bitands.c b/2.3-1/src/c/elementaryFunctions/bitand/u8bitands.c
new file mode 100644
index 00000000..eda3ccc6
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/bitand/u8bitands.c
@@ -0,0 +1,9 @@
+/* Scilab2C FOSSEE IITB */
+
+#include "bitand.h"
+
+uint8 u8bitands(uint8 x,uint8 y)
+{
+ return (x & y);
+
+}