diff options
Diffstat (limited to '2.3-1/src/c/matrixOperations/interfaces')
4 files changed, 232 insertions, 0 deletions
diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_cumprod.h b/2.3-1/src/c/matrixOperations/interfaces/int_cumprod.h new file mode 100644 index 00000000..722efbba --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_cumprod.h @@ -0,0 +1,54 @@ +// 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_CUMPROD_H__ +#define __INT_CUMPROD_H__ + + +#ifdef __cplusplus +#extern "C" { +#endif + +#define d0cumprodd0(in) in +#define s0cumprods0(in) in +#define u80cumprodu80(in) in +#define u160cumprodu160(in) in +#define i80cumprodi80(in) in +#define i160cumprodi160(in) in + +#define d2cumprodd2(in1, size1, out) dcumproda(in1, size1[0], size1[1], out) +#define s2cumprods2(in1, size1, out) scumproda(in1, size1[0], size1[1], out) +#define u82cumprodu82(in1, size1, out) u8cumproda(in1, size1[0], size1[1], out) +#define u162cumprodu162(in1, size1, out) u16cumproda(in1, size1[0], size1[1], out) +#define i82cumprodi82(in1, size1, out) i8cumproda(in1, size1[0], size1[1], out) +#define i162cumprodi162(in1, size1, out) i16cumproda(in1, size1[0], size1[1], out) + +#define d2g2cumprodd2(in1, size1, in2, size2, out) (in2[0]=='r') ? \ + drowcumproda(in1,size1[0],size1[1],out) : dcolumncumproda(in1,size1[0],size1[1],out) +#define s2g2cumprods2(in1, size1, in2, size2, out) (in2[0]=='r') ? \ + srowcumproda(in1,size1[0],size1[1],out) : scolumncumproda(in1,size1[0],size1[1],out) +#define u82g2cumprodu82(in1, size1, in2, size2, out) (in2[0]=='r') ? \ + u8rowcumproda(in1,size1[0],size1[1],out) : u8columncumproda(in1,size1[0],size1[1],out) +#define i82g2cumprodi82(in1, size1, in2, size2, out) (in2[0]=='r') ? \ + i8rowcumproda(in1,size1[0],size1[1],out) : i8columncumproda(in1,size1[0],size1[1],out) +#define u162g2cumprodu162(in1, size1, in2, size2, out) (in2[0]=='r') ? \ + u16rowcumproda(in1,size1[0],size1[1],out) : u16columncumproda(in1,size1[0],size1[1],out) +#define i162g2cumprodi162(in1, size1, in2, size2, out) (in2[0]=='r') ? \ + i16rowcumproda(in1,size1[0],size1[1],out) : i16columncumproda(in1,size1[0],size1[1],out) + + + +#ifdef __cplusplus +#} /* extern "C" */ +#endif + +#endif /*__INT_CUMPROD_H__*/ diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_cumsum.h b/2.3-1/src/c/matrixOperations/interfaces/int_cumsum.h new file mode 100644 index 00000000..c09a9b46 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_cumsum.h @@ -0,0 +1,54 @@ +// 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_CUMSUM_H__ +#define __INT_CUMSUM_H__ + + +#ifdef __cplusplus +#extern "C" { +#endif + +#define d0cumsumd0(in) in +#define s0cumsums0(in) in +#define u80cumsumu80(in) in +#define u160cumsumu160(in) in +#define i80cumsumi80(in) in +#define i160cumsumi160(in) in + +#define d2cumsumd2(in1, size1, out) dcumsuma(in1, size1[0], size1[1], out) +#define s2cumsums2(in1, size1, out) scumsuma(in1, size1[0], size1[1], out) +#define u82cumsumu82(in1, size1, out) u8cumsuma(in1, size1[0], size1[1], out) +#define u162cumsumu162(in1, size1, out) u16cumsuma(in1, size1[0], size1[1], out) +#define i82cumsumi82(in1, size1, out) i8cumsuma(in1, size1[0], size1[1], out) +#define i162cumsumi162(in1, size1, out) i16cumsuma(in1, size1[0], size1[1], out) + +#define d2g2cumsumd2(in1, size1, in2, size2, out) (in2[0]=='r') ? \ + drowcumsuma(in1,size1[0],size1[1],out) : dcolumncumsuma(in1,size1[0],size1[1],out) +#define s2g2cumsums2(in1, size1, in2, size2, out) (in2[0]=='r') ? \ + srowcumsuma(in1,size1[0],size1[1],out) : scolumncumsuma(in1,size1[0],size1[1],out) +#define u82g2cumsumu82(in1, size1, in2, size2, out) (in2[0]=='r') ? \ + u8rowcumsuma(in1,size1[0],size1[1],out) : u8columncumsuma(in1,size1[0],size1[1],out) +#define i82g2cumsumi82(in1, size1, in2, size2, out) (in2[0]=='r') ? \ + i8rowcumsuma(in1,size1[0],size1[1],out) : i8columncumsuma(in1,size1[0],size1[1],out) +#define u162g2cumsumu162(in1, size1, in2, size2, out) (in2[0]=='r') ? \ + u16rowcumsuma(in1,size1[0],size1[1],out) : u16columncumsuma(in1,size1[0],size1[1],out) +#define i162g2cumsumi162(in1, size1, in2, size2, out) (in2[0]=='r') ? \ + i16rowcumsuma(in1,size1[0],size1[1],out) : i16columncumsuma(in1,size1[0],size1[1],out) + + + +#ifdef __cplusplus +#} /* extern "C" */ +#endif + +#endif /*__INT_CUMSUM_H__*/ diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_tril.h b/2.3-1/src/c/matrixOperations/interfaces/int_tril.h new file mode 100644 index 00000000..d362aabf --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_tril.h @@ -0,0 +1,62 @@ +// 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_TRIL_H__ +#define __INT_TRIL_H__ + + +#ifdef __cplusplus +#extern "C" { +#endif + +#define d0trild0(in) in +#define s0trils0(in) in +#define u80trilu80(in) in +#define u160trilu160(in) in +#define i80trili80(in) in +#define i160trili160(in) in + +#define d0d0trild0(in1, in2) (in2 == 0 ? in1 : 0) +#define s0s0trils0(in1, in2) (in2 == 0 ? in1 : 0) +#define u80u80trilu80(in1, in2) (in2 == 0 ? in1 : 0) +#define i80i80trili80(in1, in2) (in2 == 0 ? in1 : 0) +#define u160u160trilu160(in1, in2) (in2 == 0 ? in1 : 0) +#define i160i160trili160(in1, in2) (in2 == 0 ? in1 : 0) +#define u80d0trilu80(in1, in2) (in2 == 0 ? in1 : 0) +#define i80d0trili80(in1, in2) (in2 == 0 ? in1 : 0) +#define u160d0trilu160(in1, in2) (in2 == 0 ? in1 : 0) +#define i160d0trili160(in1, in2) (in2 == 0 ? in1 : 0) + +#define d2trild2(in, size, out) dtrila(in, size[0], size[1], 0, out); +#define s2trils2(in, size, out) strila(in, size[0], size[1], 0, out); +#define u82trilu82(in, size, out) u8trila(in, size[0], size[1], 0, out); +#define u162trilu162(in, size, out) u16trila(in, size[0], size[1], 0, out); +#define i82trili82(in, size, out) i8trila(in, size[0], size[1], 0, out); +#define i162trili162(in, size, out) i16trila(in, size[0], size[1], 0, out); + +#define d2d0trild2(in1, size1, in2, out) dtrila(in1, size1[0], size1[1], in2, out); +#define s2s0trils2(in1, size1, in2, out) strila(in1, size1[0], size1[1], in2, out); +#define u82u80trilu82(in1, size1, in2, out) u8trila(in1, size1[0], size1[1], (double)in2, out); +#define i82i80trili82(in1, size1, in2, out) i8trila(in1, size1[0], size1[1], (double)in2, out); +#define u162u160trilu162(in1, size1, in2, out) u16trila(in1, size1[0], size1[1], (double)in2, out); +#define i162i160trili162(in1, size1, in2, out) i16trila(in1, size1[0], size1[1], (double)in2, out); +#define u82d0trilu82(in1, size1, in2, out) u8trila(in1, size1[0], size1[1], in2, out); +#define i82d0trili82(in1, size1, in2, out) i8trila(in1, size1[0], size1[1], in2, out); +#define u162d0trilu162(in1, size1, in2, out) u16trila(in1, size1[0], size1[1], in2, out); +#define i162d0trili162(in1, size1, in2, out) i16trila(in1, size1[0], size1[1], in2, out); + + +#ifdef __cplusplus +#} /* extern "C" */ +#endif + +#endif /*__INT_TRIL_H__*/ diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_triu.h b/2.3-1/src/c/matrixOperations/interfaces/int_triu.h new file mode 100644 index 00000000..fd5448ec --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_triu.h @@ -0,0 +1,62 @@ +// 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_TRIU_H__ +#define __INT_TRIU_H__ + + +#ifdef __cplusplus +#extern "C" { +#endif + +#define d0triud0(in) in +#define s0trius0(in) in +#define u80triuu80(in) in +#define u160triuu160(in) in +#define i80triui80(in) in +#define i160triui160(in) in + +#define d0d0triud0(in1, in2) (in2 == 0 ? in1 : 0) +#define s0s0trius0(in1, in2) (in2 == 0 ? in1 : 0) +#define u80u80triuu80(in1, in2) (in2 == 0 ? in1 : 0) +#define i80i80triui80(in1, in2) (in2 == 0 ? in1 : 0) +#define u160u160triuu160(in1, in2) (in2 == 0 ? in1 : 0) +#define i160i160triui160(in1, in2) (in2 == 0 ? in1 : 0) +#define u80d0triuu80(in1, in2) (in2 == 0 ? in1 : 0) +#define i80d0triui80(in1, in2) (in2 == 0 ? in1 : 0) +#define u160d0triuu160(in1, in2) (in2 == 0 ? in1 : 0) +#define i160d0triui160(in1, in2) (in2 == 0 ? in1 : 0) + +#define d2triud2(in, size, out) dtriua(in, size[0], size[1], 0, out); +#define s2trius2(in, size, out) striua(in, size[0], size[1], 0, out); +#define u82triuu82(in, size, out) u8triua(in, size[0], size[1], 0, out); +#define u162triuu162(in, size, out) u16triua(in, size[0], size[1], 0, out); +#define i82triui82(in, size, out) i8triua(in, size[0], size[1], 0, out); +#define i162triui162(in, size, out) i16triua(in, size[0], size[1], 0, out); + +#define d2d0triud2(in1, size1, in2, out) dtriua(in1, size1[0], size1[1], in2, out); +#define s2s0trius2(in1, size1, in2, out) striua(in1, size1[0], size1[1], in2, out); +#define u82u80triuu82(in1, size1, in2, out) u8triua(in1, size1[0], size1[1], (double)in2, out); +#define i82i80triui82(in1, size1, in2, out) i8triua(in1, size1[0], size1[1], (double)in2, out); +#define u162u160triuu162(in1, size1, in2, out) u16triua(in1, size1[0], size1[1], (double)in2, out); +#define i162i160triui162(in1, size1, in2, out) i16triua(in1, size1[0], size1[1], (double)in2, out); +#define u82d0triuu82(in1, size1, in2, out) u8triua(in1, size1[0], size1[1], in2, out); +#define i82d0triui82(in1, size1, in2, out) i8triua(in1, size1[0], size1[1], in2, out); +#define u162d0triuu162(in1, size1, in2, out) u16triua(in1, size1[0], size1[1], in2, out); +#define i162d0triui162(in1, size1, in2, out) i16triua(in1, size1[0], size1[1], in2, out); + + +#ifdef __cplusplus +#} /* extern "C" */ +#endif + +#endif /*__INT_TRIU_H__*/ |