From a6d6a9c1e88b75668868af691c9731075a514ffb Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Wed, 18 May 2016 09:44:43 +0530 Subject: Support added for kron, flipdim --- src/c/matrixOperations/interfaces/int_kron.h | 43 ++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/c/matrixOperations/interfaces/int_kron.h (limited to 'src/c/matrixOperations/interfaces/int_kron.h') diff --git a/src/c/matrixOperations/interfaces/int_kron.h b/src/c/matrixOperations/interfaces/int_kron.h new file mode 100644 index 00000000..93d25756 --- /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__*/ -- cgit From c75fb67154fb5679d6ede9a52d5f5ae15600f9f9 Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Mon, 6 Jun 2016 09:18:33 +0530 Subject: File handling functions added --- src/c/matrixOperations/interfaces/int_kron.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/c/matrixOperations/interfaces/int_kron.h') diff --git a/src/c/matrixOperations/interfaces/int_kron.h b/src/c/matrixOperations/interfaces/int_kron.h index 93d25756..a6fbaab1 100644 --- a/src/c/matrixOperations/interfaces/int_kron.h +++ b/src/c/matrixOperations/interfaces/int_kron.h @@ -1,21 +1,21 @@ -// 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 - +/* 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" { +extern "C" { #endif #define d0d0krond0(in1, in2) in1*in2 @@ -37,7 +37,7 @@ in2, size2[0], size2[1], out); #ifdef __cplusplus -#} /* extern "C" */ +} /* extern "C" */ #endif #endif /*__INT_KRON_H__*/ -- cgit