diff options
author | Abhinav Dronamraju | 2017-09-29 22:00:40 +0530 |
---|---|---|
committer | Abhinav Dronamraju | 2017-09-29 22:00:40 +0530 |
commit | 9bc7ad78e8d7d7acc4b9387aa592542832e80b31 (patch) | |
tree | 7fce060665a91de5e5adb12d02003351c3d1fdfc /src/c/operations/addition | |
parent | 33755eb085a3ca8154cf83773b23fbb8aac4ba3e (diff) | |
parent | ac0045f12ad3d0938758e9742f4107a334e1afaa (diff) | |
download | scilab2c-9bc7ad78e8d7d7acc4b9387aa592542832e80b31.tar.gz scilab2c-9bc7ad78e8d7d7acc4b9387aa592542832e80b31.tar.bz2 scilab2c-9bc7ad78e8d7d7acc4b9387aa592542832e80b31.zip |
NEW FEATURES AND NEW FUNCTIONS
Diffstat (limited to 'src/c/operations/addition')
-rw-r--r-- | src/c/operations/addition/i16adda.c | 20 | ||||
-rw-r--r-- | src/c/operations/addition/i16adds.c | 18 | ||||
-rw-r--r-- | src/c/operations/addition/i8adda.c | 20 | ||||
-rw-r--r-- | src/c/operations/addition/i8adds.c | 18 | ||||
-rw-r--r-- | src/c/operations/addition/u16adda.c | 20 | ||||
-rw-r--r-- | src/c/operations/addition/u16adds.c | 18 | ||||
-rw-r--r-- | src/c/operations/addition/u8adda.c | 20 | ||||
-rw-r--r-- | src/c/operations/addition/u8adds.c | 18 | ||||
-rw-r--r-- | src/c/operations/addition/zadds.c | 1 |
9 files changed, 153 insertions, 0 deletions
diff --git a/src/c/operations/addition/i16adda.c b/src/c/operations/addition/i16adda.c new file mode 100644 index 00000000..db85675a --- /dev/null +++ b/src/c/operations/addition/i16adda.c @@ -0,0 +1,20 @@ +/* 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 +*/ + +#include "addition.h" + +void i16adda(int16* in1, int size1, int16* in2, int size2, int16* out) { + int i = 0; + for (i = 0; i < size1 && i < size2; ++i) { + out[i] = i16adds(in1[i], in2[i]); + } +} diff --git a/src/c/operations/addition/i16adds.c b/src/c/operations/addition/i16adds.c new file mode 100644 index 00000000..88c927d4 --- /dev/null +++ b/src/c/operations/addition/i16adds.c @@ -0,0 +1,18 @@ +/* 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 +*/ + +#include "addition.h" + +int16 i16adds(int16 in1, int16 in2) +{ + return (in1 + in2); +} diff --git a/src/c/operations/addition/i8adda.c b/src/c/operations/addition/i8adda.c new file mode 100644 index 00000000..5e556d35 --- /dev/null +++ b/src/c/operations/addition/i8adda.c @@ -0,0 +1,20 @@ +/* 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 +*/ + +#include "addition.h" + +void i8adda(int8* in1, int size1, int8* in2, int size2, int8* out) { + int i = 0; + for (i = 0; i < size1 && i < size2; ++i) { + out[i] = i8adds(in1[i], in2[i]); + } +} diff --git a/src/c/operations/addition/i8adds.c b/src/c/operations/addition/i8adds.c new file mode 100644 index 00000000..0520912b --- /dev/null +++ b/src/c/operations/addition/i8adds.c @@ -0,0 +1,18 @@ +/* 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 +*/ + +#include "addition.h" + +int8 i8adds(int8 in1, int8 in2) +{ + return (in1 + in2); +} diff --git a/src/c/operations/addition/u16adda.c b/src/c/operations/addition/u16adda.c new file mode 100644 index 00000000..3884aa3c --- /dev/null +++ b/src/c/operations/addition/u16adda.c @@ -0,0 +1,20 @@ +/* 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 +*/ + +#include "addition.h" + +void u16adda(uint16* in1, int size1, uint16* in2, int size2, uint16* out) { + int i = 0; + for (i = 0; i < size1 && i < size2; ++i) { + out[i] = u16adds(in1[i], in2[i]); + } +} diff --git a/src/c/operations/addition/u16adds.c b/src/c/operations/addition/u16adds.c new file mode 100644 index 00000000..2d49e905 --- /dev/null +++ b/src/c/operations/addition/u16adds.c @@ -0,0 +1,18 @@ +/* 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 +*/ + +#include "addition.h" + +uint16 u16adds(uint16 in1, uint16 in2) +{ + return (in1 + in2); +} diff --git a/src/c/operations/addition/u8adda.c b/src/c/operations/addition/u8adda.c new file mode 100644 index 00000000..01c7608b --- /dev/null +++ b/src/c/operations/addition/u8adda.c @@ -0,0 +1,20 @@ +/* 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 +*/ + +#include "addition.h" + +void u8adda(uint8* in1, int size1, uint8* in2, int size2, uint8* out) { + int i = 0; + for (i = 0; i < size1 && i < size2; ++i) { + out[i] = u8adds(in1[i], in2[i]); + } +} diff --git a/src/c/operations/addition/u8adds.c b/src/c/operations/addition/u8adds.c new file mode 100644 index 00000000..ad258232 --- /dev/null +++ b/src/c/operations/addition/u8adds.c @@ -0,0 +1,18 @@ +/* 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 +*/ + +#include "addition.h" + +uint8 u8adds(uint8 in1, uint8 in2) +{ + return (in1 + in2); +} diff --git a/src/c/operations/addition/zadds.c b/src/c/operations/addition/zadds.c index d4a94dc5..768faf38 100644 --- a/src/c/operations/addition/zadds.c +++ b/src/c/operations/addition/zadds.c @@ -11,6 +11,7 @@ */ #include "addition.h" +#include "doubleComplex.h" doubleComplex zadds(doubleComplex z1, doubleComplex z2) { return DoubleComplex(zreals(z1) + zreals(z2), |