diff options
author | siddhu8990 | 2016-05-18 09:44:43 +0530 |
---|---|---|
committer | siddhu8990 | 2016-05-18 09:44:43 +0530 |
commit | a6d6a9c1e88b75668868af691c9731075a514ffb (patch) | |
tree | ac0082f5f70a279ce5d25089d328f1f872d85981 /src/c/matrixOperations/interfaces | |
parent | a9d0c72c839428a17956fa0530977fc058d8a799 (diff) | |
download | Scilab2C_fossee_old-a6d6a9c1e88b75668868af691c9731075a514ffb.tar.gz Scilab2C_fossee_old-a6d6a9c1e88b75668868af691c9731075a514ffb.tar.bz2 Scilab2C_fossee_old-a6d6a9c1e88b75668868af691c9731075a514ffb.zip |
Support added for kron, flipdim
Diffstat (limited to 'src/c/matrixOperations/interfaces')
-rw-r--r-- | src/c/matrixOperations/interfaces/int_flipdim.h | 109 | ||||
-rw-r--r-- | src/c/matrixOperations/interfaces/int_kron.h | 43 |
2 files changed, 152 insertions, 0 deletions
diff --git a/src/c/matrixOperations/interfaces/int_flipdim.h b/src/c/matrixOperations/interfaces/int_flipdim.h new file mode 100644 index 0000000..d399656 --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_flipdim.h @@ -0,0 +1,109 @@ +// 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 + + +#ifndef __INT_FLIPDIM_H__ +#define __INT_FLIPDIM_H__ + + +#ifdef __cplusplus +#extern "C" { +#endif + +#define d0d0flipdimd0(in1, in2) in1 +#define s0s0flipdims0(in1, in2) in1 +#define u80u80flipdimu80(in1, in2) in1 +#define i80i80flipdimi80(in1, in2) in1 +#define u160u160flipdimu160(in1, in2) in1 +#define i160i160flipdimi160(in1, in2) in1 +#define u80d0flipdimu80(in1, in2) in1 +#define i80d0flipdimi80(in1, in2) in1 +#define u160d0flipdimu160(in1, in2) in1 +#define i160d0flipdimi160(in1, in2) in1 + +#define d0d0d0flipdimd0(in1, in2, in3) in1 +#define s0s0s0flipdims0(in1, in2, in3) in1 +#define u80u80u80flipdimu80(in1, in2, in3) in1 +#define i80i80i80flipdimi80(in1, in2, in3) in1 +#define u160u160u160flipdimu160(in1, in2, in3) in1 +#define i160i160i160flipdimi160(in1, in2, in3) in1 +#define u80d0d0flipdimu80(in1, in2, in3) in1 +#define i80d0d0flipdimi80(in1, in2, in3) in1 +#define u160d0d0flipdimu160(in1, in2, in3) in1 +#define i160d0d0flipdimi160(in1, in2, in3) in1 + + +#define d2d0flipdimd2(in1, size1, in2, out) dflipdima (in1, size1[0], size1[1], \ + in2, 1, out); + +#define s2s0flipdims2(in1, size1, in2, out) sflipdima (in1, size1[0], size1[1], \ + in2, 1, out); + +#define u82u80flipdimu82(in1, size1, in2, out) u8flipdima (in1, size1[0], size1[1], \ + in2, 1, out); + +#define i82i80flipdimi82(in1, size1, in2, out) i8flipdima (in1, size1[0], size1[1], \ + in2, 1, out); + +#define u162u160flipdimu162(in1, size1, in2, out) u16flipdima (in1, size1[0], size1[1], \ + in2, 1, out); + +#define i162i160flipdimi162(in1, size1, in2, out) i16flipdima (in1, size1[0], size1[1], \ + in2, 1, out); + +#define u82d0flipdimu82(in1, size1, in2, out) u8flipdima (in1, size1[0], size1[1], \ + in2, 1, out); + +#define i82d0flipdimi82(in1, size1, in2, out) i8flipdima (in1, size1[0], size1[1], \ + in2, 1, out); + +#define u162d0flipdimu162(in1, size1, in2, out) u16flipdima (in1, size1[0], size1[1], \ + in2, 1, out); + +#define i162d0flipdimi162(in1, size1, in2, out) i16flipdima (in1, size1[0], size1[1], \ + in2, 1, out); + +#define d2d0d0flipdimd2(in1, size1, in2, in3, out) dflipdima(in1, size1[0], size1[1], \ + in2, in3, out); + +#define s2s0s0flipdims2(in1, size1, in2, in3, out) sflipdima(in1, size1[0], size1[1], \ + in2, in3, out); + +#define u82u80u80flipdimu82(in1, size1, in2, in3, out) u8flipdima(in1, size1[0], size1[1], \ + in2, in3, out); + +#define i82i80i80flipdimi82(in1, size1, in2, in3, out) i8flipdima(in1, size1[0], size1[1], \ + in2, in3, out); + +#define u162u160u160flipdimu162(in1, size1, in2, in3, out) u16flipdima(in1, size1[0], size1[1], \ + in2, in3, out); + +#define i162i160i160flipdimi162(in1, size1, in2, in3, out) i16flipdima(in1, size1[0], size1[1], \ + in2, in3, out); + +#define u82d0d0flipdimu82(in1, size1, in2, in3, out) u8flipdima(in1, size1[0], size1[1], \ + in2, in3, out); + +#define i82d0d0flipdimi82(in1, size1, in2, in3, out) i8flipdima(in1, size1[0], size1[1], \ + in2, in3, out); + +#define u162d0d0flipdimu162(in1, size1, in2, in3, out) u16flipdima(in1, size1[0], size1[1], \ + in2, in3, out); + +#define i162d0d0flipdimi162(in1, size1, in2, in3, out) i16flipdima(in1, size1[0], size1[1], \ + in2, in3, out); + + +#ifdef __cplusplus +#} /* extern "C" */ +#endif + +#endif /*__INT_FLIPDIM_H__*/ diff --git a/src/c/matrixOperations/interfaces/int_kron.h b/src/c/matrixOperations/interfaces/int_kron.h new file mode 100644 index 0000000..93d2575 --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_kron.h @@ -0,0 +1,43 @@ +// 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 + + +#ifndef __INT_KRON_H__ +#define __INT_KRON_H__ + + +#ifdef __cplusplus +#extern "C" { +#endif + +#define d0d0krond0(in1, in2) in1*in2 +#define s0s0krons0(in1, in2) in1*in2 + +#define d0d2krond2(in1, in2, size2, out) {int i; \ + for(i=0;i < size2[0]*size2[1];i++) out[i] = in2[i]*in1;} +#define s0s2krons2(in1, in2, size2, out) {int i; \ + for(i=0;i < size2[0]*size2[1];i++) out[i] = in2[i]*in1;} + +#define d2d0krond2(in1, size1, in2, out) {int i; \ + for(i=0;i < size1[0]*size1[1];i++) out[i] = in1[i]*in2;} +#define s2s0krons2(in1, in2, size2, out) {int i; \ + for(i=0;i < size2[0]*size2[1];i++) out[i] = in2[i]*in1;} + +#define d2d2krond2(in1, size1, in2, size2, out) dkrona(in1, size1[0], size1[1], \ + in2, size2[0], size2[1], out); +#define s2s2krons2(in1, size1, in2, size2, out) skrona(in1, size1[0], size1[1], \ + in2, size2[0], size2[1], out); + +#ifdef __cplusplus +#} /* extern "C" */ +#endif + +#endif /*__INT_KRON_H__*/ |