summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/matrixOperations/interfaces/int_cumsum.h
diff options
context:
space:
mode:
authorsiddhu89902016-05-10 17:17:41 +0530
committersiddhu89902016-05-10 17:17:41 +0530
commit7d13dc4707f5c4387acdb1946b955490629d2f98 (patch)
treea343e5ec78c9fa354444688f1b3bbd89ca55170f /2.3-1/src/c/matrixOperations/interfaces/int_cumsum.h
parentd0dae962944e7fdb42bca7d0aa80055c44881b45 (diff)
downloadScilab2C-7d13dc4707f5c4387acdb1946b955490629d2f98.tar.gz
Scilab2C-7d13dc4707f5c4387acdb1946b955490629d2f98.tar.bz2
Scilab2C-7d13dc4707f5c4387acdb1946b955490629d2f98.zip
Added support for cumprod, cumsum, triu, tril functions
Diffstat (limited to '2.3-1/src/c/matrixOperations/interfaces/int_cumsum.h')
-rw-r--r--2.3-1/src/c/matrixOperations/interfaces/int_cumsum.h54
1 files changed, 54 insertions, 0 deletions
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__*/