From 82e50ba319fc2c531bde168df4b23fa28b990d56 Mon Sep 17 00:00:00 2001 From: imushir Date: Fri, 22 Jan 2016 16:01:46 +0530 Subject: added support of uint8,uint16 for bitwise operators --- src/c/elementaryFunctions/interfaces/int_bitand.h | 16 ++++++++++++++++ src/c/elementaryFunctions/interfaces/int_bitcmp.h | 16 ++++++++++++++++ src/c/elementaryFunctions/interfaces/int_bitget.h | 10 ++++++++++ src/c/elementaryFunctions/interfaces/int_bitor.h | 16 ++++++++++++++++ src/c/elementaryFunctions/interfaces/int_bitset.h | 13 +++++++++++++ src/c/elementaryFunctions/interfaces/int_bitxor.h | 16 ++++++++++++++++ 6 files changed, 87 insertions(+) create mode 100644 src/c/elementaryFunctions/interfaces/int_bitand.h create mode 100644 src/c/elementaryFunctions/interfaces/int_bitcmp.h create mode 100644 src/c/elementaryFunctions/interfaces/int_bitget.h create mode 100644 src/c/elementaryFunctions/interfaces/int_bitor.h create mode 100644 src/c/elementaryFunctions/interfaces/int_bitset.h create mode 100644 src/c/elementaryFunctions/interfaces/int_bitxor.h (limited to 'src/c/elementaryFunctions/interfaces') diff --git a/src/c/elementaryFunctions/interfaces/int_bitand.h b/src/c/elementaryFunctions/interfaces/int_bitand.h new file mode 100644 index 0000000..26031ad --- /dev/null +++ b/src/c/elementaryFunctions/interfaces/int_bitand.h @@ -0,0 +1,16 @@ +/* Scilab2C FOSSEE IITB */ + +#ifndef __INT_BITAND_H__ +#define __INT_BITAND_H__ + + +#define u80u80bitandu80(in1,in2) u8bitands(in1,in2) + +#define u82u82bitandu82(in1,size1,in2,size2,out) u8bitanda(in1,in2,size1[0]*size1[1],out) + +#define u160u160bitandu160(in1,in2) u16bitands(in1,in2) + +#define u162u162bitandu162(in1,size1,in2,size2,out) u16bitanda(in1,in2,size1[0]*size1[1],out) + + +#endif diff --git a/src/c/elementaryFunctions/interfaces/int_bitcmp.h b/src/c/elementaryFunctions/interfaces/int_bitcmp.h new file mode 100644 index 0000000..d72eb2e --- /dev/null +++ b/src/c/elementaryFunctions/interfaces/int_bitcmp.h @@ -0,0 +1,16 @@ +/* Scilab2C FOSSEE IITB */ + +#ifndef __INT_BITCMP_H__ +#define __INT_BITCMP_H__ + + +#define u80d0bitcmpu80(in1,in2) u8bitcmps(in1,in2) + +#define u82d0bitcmpu82(in1,size1,in2,out) u8bitcmpa(in1,in2,size1[0]*size1[1],out) + +#define u160d0bitcmpu160(in1,in2) u16bitcmps(in1,in2) + +#define u162d0bitcmpu162(in1,size1,in2,out) u16bitcmpa(in1,in2,size1[0]*size1[1],out) + + +#endif diff --git a/src/c/elementaryFunctions/interfaces/int_bitget.h b/src/c/elementaryFunctions/interfaces/int_bitget.h new file mode 100644 index 0000000..7b6b8e9 --- /dev/null +++ b/src/c/elementaryFunctions/interfaces/int_bitget.h @@ -0,0 +1,10 @@ +/* Scilab2C FOSSEE IITB */ + +#ifndef __INT_BITGET_H__ +#define __INT_BITGET_H__ + +#define u80d0bitgetu80(in1,in2) u8bitgets(in1,in2) + +#define u160d0bitgetu160(in1,in2) u16bitgets(in1,in2) + +#endif diff --git a/src/c/elementaryFunctions/interfaces/int_bitor.h b/src/c/elementaryFunctions/interfaces/int_bitor.h new file mode 100644 index 0000000..6a65c9f --- /dev/null +++ b/src/c/elementaryFunctions/interfaces/int_bitor.h @@ -0,0 +1,16 @@ +/* Scilab2C FOSSEE IITB */ + +#ifndef __INT_BITOR_H__ +#define __INT_BITOR_H__ + + +#define u80u80bitoru80(in1,in2) u8bitors(in1,in2) + +#define u82u82bitoru82(in1,size1,in2,size2,out) u8bitora(in1,in2,size1[0]*size1[1],out) + +#define u160u160bitoru160(in1,in2) u16bitors(in1,in2) + +#define u162u162bitoru162(in1,size1,in2,size2,out) u16bitora(in1,in2,size1[0]*size1[1],out) + + +#endif diff --git a/src/c/elementaryFunctions/interfaces/int_bitset.h b/src/c/elementaryFunctions/interfaces/int_bitset.h new file mode 100644 index 0000000..e864325 --- /dev/null +++ b/src/c/elementaryFunctions/interfaces/int_bitset.h @@ -0,0 +1,13 @@ +/* Scilab2C FOSSEE IITB */ + +#ifndef __INT_BITSET_H__ +#define __INT_BITSET_H__ + +#define u80d0d0bitsetu80(in1,in2,in3) u8bitsets(in1,in2,in3) + +#define u160d0d0bitsetu160(in1,in2,in3) u16bitsets(in1,in2,in3) + + + + +#endif diff --git a/src/c/elementaryFunctions/interfaces/int_bitxor.h b/src/c/elementaryFunctions/interfaces/int_bitxor.h new file mode 100644 index 0000000..30aea6c --- /dev/null +++ b/src/c/elementaryFunctions/interfaces/int_bitxor.h @@ -0,0 +1,16 @@ +/* Scilab2C FOSSEE IITB */ + +#ifndef __INT_BITXOR_H__ +#define __INT_BITXOR_H__ + + +#define u80u80bitxoru80(in1,in2) u8bitxors(in1,in2) + +#define u82u82bitxoru82(in1,size1,in2,size2,out) u8bitxora(in1,in2,size1[0]*size1[1],out) + +#define u160u160bitxoru160(in1,in2) u16bitxors(in1,in2) + +#define u162u162bitxoru162(in1,size1,in2,size2,out) u16bitxora(in1,in2,size1[0]*size1[1],out) + + +#endif -- cgit