diff options
Diffstat (limited to 'src/matrixOperations/includes')
-rw-r--r-- | src/matrixOperations/includes/matrixAddition.h | 74 | ||||
-rw-r--r-- | src/matrixOperations/includes/matrixDivision.h | 0 | ||||
-rw-r--r-- | src/matrixOperations/includes/matrixMultiplication.h | 82 | ||||
-rw-r--r-- | src/matrixOperations/includes/matrixSubtraction.h | 74 |
4 files changed, 230 insertions, 0 deletions
diff --git a/src/matrixOperations/includes/matrixAddition.h b/src/matrixOperations/includes/matrixAddition.h new file mode 100644 index 00000000..2299c53e --- /dev/null +++ b/src/matrixOperations/includes/matrixAddition.h @@ -0,0 +1,74 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * 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 + * + */ + +#ifndef __MATRICXADDITION_H__ +#define __MATRICXADDITION_H__ + +#include "floatComplex.h" +#include "doubleComplex.h" + +/* +** +** WARNING WE ASSUME MATRIXES TO BE CONSCISTENT +** size1 = size2; +** +*/ + + +/* +** \brief Compute an addition element ways for floats. +** \param in1 : input array. +** \param size1 : size of in1 array. +** \param in2 : input arry. +** \param size2 : size of in2 array. +** \param out : array that contains the addition in1 + in2. +*/ +void saddma(float *in1, int size1, + float *in2, int size2, + float *out); +/* +** \brief Compute an addition element ways for double. +** \param in1 : input array. +** \param size1 : size of in1 array. +** \param in2 : input arry. +** \param size2 : size of in2 array. +** \param out : array that contains the addition in1 + in2. +*/ +void daddma(double *in1, int size1, + double *in2, int size2, + double * out); + +/* +** \brief Compute an addition element ways for complex single precision. +** \param in1 : input array. +** \param size1 : size of in1 array. +** \param in2 : input arry. +** \param size2 : size of in2 array. +** \param out : array that contains the addition in1 + in2. +*/ +void caddma(floatComplex *in1, int size1, + floatComplex *in2, int size2, + floatComplex *out); + +/* +** \brief Compute an addition element ways for complex double precision. +** \param in1 : input array. +** \param size1 : size of in1 array. +** \param in2 : input arry. +** \param size2 : size of in2 array. +** \param out : array that contains the addition in1 + in2. +*/ +void zaddma(doubleComplex *in1, int size1, + doubleComplex *in2, int size2, + doubleComplex *out); + +#endif /* !__MATRICXADDITION_H__ */ diff --git a/src/matrixOperations/includes/matrixDivision.h b/src/matrixOperations/includes/matrixDivision.h new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/src/matrixOperations/includes/matrixDivision.h diff --git a/src/matrixOperations/includes/matrixMultiplication.h b/src/matrixOperations/includes/matrixMultiplication.h new file mode 100644 index 00000000..413f8d96 --- /dev/null +++ b/src/matrixOperations/includes/matrixMultiplication.h @@ -0,0 +1,82 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * 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 + * + */ + +#ifndef __MATRIXMULTIPLICATION_H__ +#define __MATRIXMULTIPLICATION_H__ + +#include "floatComplex.h" +#include "doubleComplex.h" + +/* +** +** WARNING WE ASSUME MATRIXES TO BE CONSCISTENT +** columns1 = lines2; +** +*/ + +/* +** \brief Compute a multiplication for floats matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +void smulma(float *in1, int lines1, int columns1, + float *in2, int lines2, int columns2, + float *out); + +/* +** \brief Compute a multiplication for doubles matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +void dmulma(double *in1, int lines1, int columns1, + double *in2, int lines2, int columns2, + double *out); + +/* +** \brief Compute a multiplication for floats complex matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +void cmulma(floatComplex *in1, int lines1, int columns1, + floatComplex *in2, int lines2, int columns2, + floatComplex *out); + +/* +** \brief Compute a multiplication for doubles matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +void zmulma(doubleComplex *in1, int lines1, int columns1, + doubleComplex *in2, int lines2, int columns2, + doubleComplex *out); + +#endif /* !__MATRIXMULTIPLICATION_H__ */ diff --git a/src/matrixOperations/includes/matrixSubtraction.h b/src/matrixOperations/includes/matrixSubtraction.h new file mode 100644 index 00000000..4823d532 --- /dev/null +++ b/src/matrixOperations/includes/matrixSubtraction.h @@ -0,0 +1,74 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * 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 + * + */ + +#ifndef __MATRIXSUBSTRACTION_H__ +#define __MATRIXSUBSTRACTION_H__ + +#include "floatComplex.h" +#include "doubleComplex.h" + +/* +** +** WARNING WE ASSUME MATRIXES TO BE CONSCISTENT +** size1 = size2; +** +*/ + + +/* +** \brief Compute an substraction element ways for floats. +** \param in1 : input array. +** \param size1 : size of in1 array. +** \param in2 : input arry. +** \param size2 : size of in2 array. +** \param out : array that contains in1 - in2. +*/ +void sdiffma(float *in1, int size1, + float *in2, int size2, + float *out); +/* +** \brief Compute an substraction element ways for double. +** \param in1 : input array. +** \param size1 : size of in1 array. +** \param in2 : input arry. +** \param size2 : size of in2 array. +** \param out : array that contains in1 - in2. +*/ +void ddiffma(double *in1, int size1, + double *in2, int size2, + double * out); + +/* +** \brief Compute an substraction element ways for complex single precision. +** \param in1 : input array. +** \param size1 : size of in1 array. +** \param in2 : input arry. +** \param size2 : size of in2 array. +** \param out : array that contains in1 - in2. +*/ +void cdiffma(floatComplex *in1, int size1, + floatComplex *in2, int size2, + floatComplex *out); + +/* +** \brief Compute an substraction element ways for complex double precision. +** \param in1 : input array. +** \param size1 : size of in1 array. +** \param in2 : input arry. +** \param size2 : size of in2 array. +** \param out : array that contains in1 - in2. +*/ +void zdiffma(doubleComplex *in1, int size1, + doubleComplex *in2, int size2, + doubleComplex *out); + +#endif /* !__MATRIXSUBSTRACTION_H__ */ |