diff options
30 files changed, 760 insertions, 180 deletions
diff --git a/src/Scilab2C/Scilab2C/ToolInitialization/INIT_FillSCI2LibCDirs.sci b/src/Scilab2C/Scilab2C/ToolInitialization/INIT_FillSCI2LibCDirs.sci index 7a4974dd..2af8c1ff 100644 --- a/src/Scilab2C/Scilab2C/ToolInitialization/INIT_FillSCI2LibCDirs.sci +++ b/src/Scilab2C/Scilab2C/ToolInitialization/INIT_FillSCI2LibCDirs.sci @@ -498,10 +498,10 @@ PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y'); PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y'); PrintStringInfo('c0c0'+ArgSeparator+'c0',ClassFileName,'file','y'); PrintStringInfo('z0d0'+ArgSeparator+'z0',ClassFileName,'file','y'); -PrintStringInfo('s2s0'+ArgSeparator+'s0',ClassFileName,'file','y'); -PrintStringInfo('d2d0'+ArgSeparator+'d0',ClassFileName,'file','y'); -PrintStringInfo('c2s0'+ArgSeparator+'c0',ClassFileName,'file','y'); -PrintStringInfo('z2d0'+ArgSeparator+'z0',ClassFileName,'file','y'); +PrintStringInfo('s2s0'+ArgSeparator+'s0',ClassFileName,'file','y');/* possible ? */ +PrintStringInfo('d2d0'+ArgSeparator+'d0',ClassFileName,'file','y');/* possible ? */ +PrintStringInfo('c2s0'+ArgSeparator+'c0',ClassFileName,'file','y');/* possible ? */ +PrintStringInfo('z2d0'+ArgSeparator+'z0',ClassFileName,'file','y');/* possible ? */ PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y'); PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y'); PrintStringInfo('c2s0'+ArgSeparator+'c2',ClassFileName,'file','y'); diff --git a/src/auxiliaryFunctions/interfaces/int_find.h b/src/auxiliaryFunctions/interfaces/int_find.h index 742ddc06..2df50986 100644 --- a/src/auxiliaryFunctions/interfaces/int_find.h +++ b/src/auxiliaryFunctions/interfaces/int_find.h @@ -15,20 +15,84 @@ #ifndef __INT_FIND_H__ #define __INT_FIND_H__ -#define s0finds0(in) (in == 0) ? -1 : in +/* 1 input, 1 output */ -#define d0findd0(in) (in == 0) ? -1 : in +#define s0finds0(in) (in == 0) ? -1 : in + +#define d0findd0(in) (in == 0) ? -1 : in -#define c0findc0(in) ((creals(in) == 0) && (cimags(in) == 0)) ? -1 : in +#define c0finds0(in) ((creals(in) == 0) && (cimags(in) == 0)) ? -1 : in -#define z0findz0(in) ((zreals(in) == 0) && (zimags(in) == 0)) ? -1 : in +#define z0findd0(in) ((zreals(in) == 0) && (zimags(in) == 0)) ? -1 : in -#define s2finds2(in,size,out) sfinda(in, size[0]*size[1]) +#define s2finds2(in,size,out) sfinda(in, size[0]*size[1]) -#define d2findd2(in,size,out) dfinda(in, size[0]*size[1]) +#define d2findd2(in,size,out) dfinda(in, size[0]*size[1]) + +#define c2finds2(in,size,out) cfinda(in, size[0]*size[1]) + +#define z2findd2(in,size,out) zfinda(in, size[0]*size[1]) + +/* 1 input, 2 outputs */ + +#define s0finds0s0(in,out1,out2) if (in==0) {out1=0;out2=0;} + +#define d0findd0d0(in,out1,out2) if (in==0) {out1=0;out2=0;} + +#define c0finds0s0(in,out1,out2) if ((creals(in)==0) && (cimags(in)==0)) {out1=0;out2=0;} + +#define z0findd0d0(in,out1,out2) if ((zreals(in)==0) && (zimags(in)==0)) {out1=0;out2=0;} + +#define s2finds2s2(in,size,out1,out2) sfind2d(in,size[0],size[1],&out1,&out2) + +#define d2findd2d2(in,size,out1,out2) dfind2d(in,size[0],size[1],&out1,&out2) + +#define c2finds2s2(in,size,out1,out2) cfind2d(in,size[0],size[1],&out1,&out2) + +#define z2finds2s2(in,size,out1,out2) zfind2d(in,size[0],size[1],&out1,&out2) + +/* 2 inputs, 1 output */ + +#define s0s0finds0(in1,in2) s0finds0(in1) + +#define d0d0findd0(in1,in2) d0findd0(in1) + +#define c0s0finds0(in1,in2) c0finds0(in1) + +#define z0d0findd0(in1,in2) z0findd0(in1) + +#define s2s0finds2(in1,size,in2,out) s2finds2(in1,size,out_tmp);for(int i=0;i<in2;i++) out[i]=out_tmp[i]; + +#define d2d0findd2(in1,size,in2,out) d2findd2(in1,size,out_tmp);for(int i=0;i<in2;i++) out[i]=out_tmp[i]; + +#define c2s0finds2(in1,size,in2,out) c2finds2(in1,size,out_tmp);for(int i=0;i<in2;i++) out[i]=out_tmp[i]; + +#define z2d0findd2(in1,size,in2,out) z2findd2(in1,size,out_tmp);for(int i=0;i<in2;i++) out[i]=out_tmp[i]; + +/* 2 inputs, 2 outputs */ + +#define s0s0finds0s0(in1,in2,out1,out2) s0finds0s0(in1,out1,out2) + +#define d0d0findd0d0(in1,in2,out1,out2) d0findd0d0(in1,out1,out2) + +#define c0s0finds0s0(in1,in2,out1,out2) c0finds0s0(in1,out1,out2) + +#define z0d0findd0d0(in1,in2,out1,out2) z0findd0d0(in1,out1,out2) + +#define s2s0finds2s2(in1,size,in2,out1,out2) s2finds2s2(in1,size,out1_tmp,out_tmp2);for(int i=0;i<in2;i++) {out1[i]=out1_tmp[i];out2[i]= out2_tmp[i];} + +#define d2d0findd2d2(in1,size,in2,out1,out2) d2findd2d2(in1,size,out1_tmp,out_tmp2);for(int i=0;i<in2;i++) {out1[i]=out1_tmp[i];out2[i]= out2_tmp[i];} + +#define c2s0finds2s2(in1,size,in2,out1,out2) c2finds2s2(in1,size,out1_tmp,out_tmp2);for(int i=0;i<in2;i++) {out1[i]=out1_tmp[i];out2[i]= out2_tmp[i];} + +#define z2d0findd2d2(in1,size,in2,out1,out2) z2findd2d2(in1,size,out1_tmp,out_tmp2);for(int i=0;i<in2;i++) {out1[i]=out1_tmp[i];out2[i]= out2_tmp[i];} -#define c2findc2(in,size,out) cfinda(in, size[0]*size[1]) -#define z2findz2(in,size,out) zfinda(in, size[0]*size[1]) #endif /* !__INT_FIND_H__ */ + +PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y'); +PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y'); + +PrintStringInfo('s2s0'+ArgSeparator+'s2s2',ClassFileName,'file','y'); +PrintStringInfo('d2d0'+ArgSeparator+'d2d2',ClassFileName,'file','y'); diff --git a/src/auxiliaryFunctions/interfaces/int_rand.h b/src/auxiliaryFunctions/interfaces/int_rand.h deleted file mode 100644 index 1ce248a9..00000000 --- a/src/auxiliaryFunctions/interfaces/int_rand.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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 - * - */ -/* ADDED BY NUTRICATO, BUT WAITING FOR THE AUTOMATIC GENERATION OF IT - AS SHOWN BELOW MANY CASES ARE MISSING. SCALAR RANDOM GENERATOR NOT - IMPLEMENTED YET, SEE DRANDS.C -*/ - -#ifndef __INT_RAND_H__ -#define __INT_RAND_H__ -/* -PrintStringInfo('NIN= 0',ClassFileName,'file','y'); -PrintStringInfo('NOUT= 1',ClassFileName,'file','y'); -PrintStringInfo('OUT(1).TP= FA_TP_USER',ClassFileName,'file','y'); -PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); -PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); - -PrintStringInfo('NIN= 1',ClassFileName,'file','y'); -PrintStringInfo('NOUT= 1',ClassFileName,'file','y'); -PrintStringInfo('OUT(1).TP= FA_TP_USER',ClassFileName,'file','y'); -PrintStringInfo('OUT(1).SZ(1)= FA_SZ_1(IN(1).SZ)',ClassFileName,'file','y'); -PrintStringInfo('OUT(1).SZ(2)= FA_SZ_2(IN(1).SZ)',ClassFileName,'file','y'); -
-PrintStringInfo('NIN= 2',ClassFileName,'file','y'); -PrintStringInfo('NOUT= 1',ClassFileName,'file','y'); -PrintStringInfo('OUT(1).TP= FA_TP_USER',ClassFileName,'file','y'); -PrintStringInfo('OUT(1).SZ(1)= IN(1).VAL',ClassFileName,'file','y'); -PrintStringInfo('OUT(1).SZ(2)= IN(2).VAL',ClassFileName,'file','y');
- - -PrintStringInfo(ArgSeparator+'s0',ClassFileName,'file','y'); -PrintStringInfo(ArgSeparator+'d0',ClassFileName,'file','y'); - -PrintStringInfo('s0'+ArgSeparator+'s0',ClassFileName,'file','y'); -PrintStringInfo('s0'+ArgSeparator+'d0',ClassFileName,'file','y'); -PrintStringInfo('d0'+ArgSeparator+'s0',ClassFileName,'file','y'); -PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y'); -PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y'); -PrintStringInfo('s2'+ArgSeparator+'d2',ClassFileName,'file','y'); -PrintStringInfo('d2'+ArgSeparator+'s2',ClassFileName,'file','y'); -PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y'); - -PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y'); -PrintStringInfo('s0s0'+ArgSeparator+'d0',ClassFileName,'file','y'); -PrintStringInfo('s0s0'+ArgSeparator+'s2',ClassFileName,'file','y'); -PrintStringInfo('s0s0'+ArgSeparator+'d2',ClassFileName,'file','y'); -PrintStringInfo('d0d0'+ArgSeparator+'s0',ClassFileName,'file','y'); -PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y'); -PrintStringInfo('d0d0'+ArgSeparator+'s2',ClassFileName,'file','y'); -PrintStringInfo('d0d0'+ArgSeparator+'d2',ClassFileName,'file','y'); -*/ -#define s0s0rands2(in1,in2,out) \ -sranda(out, in1*in2) - -#define d0d0randd2(in1,in2,out) \ -dranda(out, in1*in2) - - -#endif /* !__INT_RAND_H__ */ diff --git a/src/auxiliaryFunctions/interfaces/int_size.h b/src/auxiliaryFunctions/interfaces/int_size.h new file mode 100644 index 00000000..2608bc81 --- /dev/null +++ b/src/auxiliaryFunctions/interfaces/int_size.h @@ -0,0 +1,71 @@ +/* + * 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 + * + */ +/* ADDED BY NUTRICATO, BUT WAITING FOR THE AUTOMATIC GENERATION OF IT + AS SHOWN BELOW MANY CASES ARE MISSING. SCALAR RANDOM GENERATOR NOT + IMPLEMENTED YET, SEE DRANDS.C +*/ + +#ifndef __INT_SIZE_H__ +#define __INT_SIZE_H__ + +#define s0sizes2(in,out) out[0]=1.0f;out[1]=1.0f; + +#define d0sized2(in,out) out[0]=1.0;out[1]=1.0; + +#define c0sizes2(in,out) out[0]=1.0f;out[1]=1.0f; + +#define z0sized2(in,out) out[0]=1.0;out[1]=1.0; + +#define s2sizes2(in,size,out) out[0]=size[0];out[1]=size[1]; + +#define d2sized2(in,size,out) out[0]=size[0];out[1]=size[1]; + +#define c2sizes2(in,size,out) out[0]=size[0];out[1]=size[1]; + +#define z2sized2(in,size,out) out[0]=size[0];out[1]=size[1]; + +#define s0sizes0s0(in,out1,out2) out1=1.0f;out2=1.0f; + +#define d0sized0d0(in,out1,out2) out1=1.0;out2=1.0; + +#define c0sizes0s0(in,out1,out2) out1=1.0f;out2=1.0f; + +#define z0sized0d0(in,out1,out2) out1=1.0;out2=1.0; + +#define s2sizes0s0(in,size,out1,out2) out1=size[0];out2=size[1]; + +#define d2sized0d0(in,size,out1,out2) out1=size[0];out2=size[1]; + +#define c2sizes0s0(in,size,out1,out2) out1=size[0];out2=size[1]; + +#define z2sized0d0(in,size,out1,out2) out1=size[0];out2=size[1]; + +#define s0s0sizes0(in1,in2) 1.0f + +#define d0d0sized0(in1,in2) 1. + +#define c0s0sizes0(in1,in2) 1.0f + +#define z0d0sized0(in1,in2) 1. + +#define s2s0sizes0(in1,size,in2) (in2==1) ? size[0] : size[1] + +#define d2d0sized0(in1,size,in2) (in2==1) ? size[0] : size[1] + +#define c2s0sizes0(in1,size,in2) (in2==1) ? size[0] : size[1] + +#define z2d0sized0(in1,size,in2) (in2==1) ? size[0] : size[1] + + +#endif /* !__INT_SIZE_H__ */ + + diff --git a/src/matrixOperations/Makefile.am b/src/matrixOperations/Makefile.am index 4f3ae352..62380e3e 100644 --- a/src/matrixOperations/Makefile.am +++ b/src/matrixOperations/Makefile.am @@ -10,8 +10,7 @@ ## ## -SUBDIRS= addition \ - cat \ +SUBDIRS= cat \ division \ expm \ eye \ diff --git a/src/matrixOperations/Makefile.in b/src/matrixOperations/Makefile.in index bf30261a..4894de57 100644 --- a/src/matrixOperations/Makefile.in +++ b/src/matrixOperations/Makefile.in @@ -165,8 +165,7 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = addition \ - cat \ +SUBDIRS = cat \ division \ expm \ eye \ diff --git a/src/matrixOperations/includes/determ.h b/src/matrixOperations/includes/determ.h index ec1df30c..e9276a70 100644 --- a/src/matrixOperations/includes/determ.h +++ b/src/matrixOperations/includes/determ.h @@ -20,13 +20,13 @@ -double ddeterma (double *in, int size); +double ddeterma (double *in, int rows); -float sdeterma (float *in, int size); +float sdeterma (float *in, int rows); -doubleComplex zdeterma (doubleComplex *in, int size); +doubleComplex zdeterma (doubleComplex *in, int rows); -floatComplex cdeterma (floatComplex *in, int size); +floatComplex cdeterma (floatComplex *in, int rows); #endif /* __DETERM_H__ */ diff --git a/src/matrixOperations/includes/ones.h b/src/matrixOperations/includes/ones.h index 93fe1c62..b4d6eef4 100644 --- a/src/matrixOperations/includes/ones.h +++ b/src/matrixOperations/includes/ones.h @@ -18,6 +18,28 @@ #include "doubleComplex.h" /* +** \brief create a float one value +*/ +#define seyes(in) 1.0f + +/* +** \brief create a Double one value +*/ +#define deyes(in) 1.0 + +/* +** \brief create a float complex one value +*/ +#define ceyes(in) FloatComplex(1.0f, 0) + +/* +** \brief create a Double complex one value +*/ +#define zeyes(in) DoubleComplex(1, 0) + + + +/* ** \brief create a float matrix full of one */ void sonesa ( float* in , int rows , int cols ); diff --git a/src/matrixOperations/interfaces/int_BackSlash.h b/src/matrixOperations/interfaces/int_BackSlash.h new file mode 100644 index 00000000..898c37be --- /dev/null +++ b/src/matrixOperations/interfaces/int_BackSlash.h @@ -0,0 +1,37 @@ +/* + * 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 + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_OPBACKSLASH_H__ +#define __INT_OPBACKSLASH_H__ + +/* Matrix \ Matrix */ + +#define s2s2OpBackSlashs2(in1,size1,in2,size2,out) sldivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define d2d2OpBackSlashd2(in1,size1,in2,size2,out) dldivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define c2c2OpBackSlashc2(in1,size1,in2,size2,out) cldivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define c2s2OpBackSlashc2(in1,size1,in2,size2,out) cldivma(in1,size1[0],size1[1],FloatComplexMatrix(in2,0,size2[0]*size2[1]),size2[0],size2[1],out) + +#define s2c2OpBackSlashc2(in1,size1,in2,size2,out) cldivma(FloatComplexMatrix(in1,0,size1[0]*size1[1]),size1[0],size1[1],in2,size2[0],size2[1],out) + +#define z2z2OpBackSlashz2(in1,size1,in2,size2,out) zldivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define z2d2OpBackSlashc2(in1,size1,in2,size2,out) cldivma(in1,size1[0],size1[1],DoubleComplexMatrix(in2,0,size2[0]*size2[1]),size2[0],size2[1],out) + +#define d2z2OpBackSlashc2(in1,size1,in2,size2,out) cldivma(DoubleComplexMatrix(in1,0,size1[0]*size1[1]),size1[0],size1[1],in2,size2[0],size2[1],out) + + +#endif /* !__INT_OPBACKSLASH_H__ */ diff --git a/src/matrixOperations/interfaces/int_OpSlash.h b/src/matrixOperations/interfaces/int_OpSlash.h index bf6ba42f..20930a0a 100644 --- a/src/matrixOperations/interfaces/int_OpSlash.h +++ b/src/matrixOperations/interfaces/int_OpSlash.h @@ -15,20 +15,24 @@ #ifndef __INT_OPSLASH_H__ #define __INT_OPSLASH_H__ -#define s0rdivms0(in) srdivms(in) -#define d0rdivmd0(in) drdivms(in) +/* Matrix / Matrix */ -#define c0rdivmc0(in) crdivms(in) +#define s2s2OpSlashs2(in1,size1,in2,size2,out) srdivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) -#define z0rdivmz0(in) zrdivms(in) +#define d2d2OpSlashd2(in1,size1,in2,size2,out) drdivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) -#define s2rdivms2(in,size,out) srdivma(in, size[0]*size[1], out) +#define c2c2OpSlashc2(in1,size1,in2,size2,out) crdivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) -#define d2rdivmd2(in,size,out) drdivma(in, size[0]*size[1], out) +#define c2s2OpSlashc2(in1,size1,in2,size2,out) crdivma(in1,size1[0],size1[1],FloatComplexMatrix(in2,0,size2[0]*size2[1]),size2[0],size2[1],out) -#define c2rdivmc2(in,size,out) crdivma(in, size[0]*size[1], out) +#define s2c2OpSlashc2(in1,size1,in2,size2,out) crdivma(FloatComplexMatrix(in1,0,size1[0]*size1[1]),size1[0],size1[1],in2,size2[0],size2[1],out) + +#define z2z2OpSlashz2(in1,size1,in2,size2,out) zrdivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define z2d2OpSlashc2(in1,size1,in2,size2,out) crdivma(in1,size1[0],size1[1],DoubleComplexMatrix(in2,0,size2[0]*size2[1]),size2[0],size2[1],out) + +#define d2z2OpSlashc2(in1,size1,in2,size2,out) crdivma(DoubleComplexMatrix(in1,0,size1[0]*size1[1]),size1[0],size1[1],in2,size2[0],size2[1],out) -#define z2rdivmz2(in,size,out) zrdivma(in, size[0]*size[1], out) #endif /* !__INT_OPSLASH_H__ */ diff --git a/src/matrixOperations/interfaces/int_OpStar.h b/src/matrixOperations/interfaces/int_OpStar.h index 4362baa2..400918a4 100644 --- a/src/matrixOperations/interfaces/int_OpStar.h +++ b/src/matrixOperations/interfaces/int_OpStar.h @@ -15,23 +15,23 @@ #ifndef __INT_OPSTAR_H__ #define __INT_OPSTAR_H__ -/* Matrix .* Matrix */ +/* Matrix * Matrix */ -#define s2s2OpStars2(in1,size1,in2,size2,out) smulma(in1,size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define s2s2OpStars2(in1,size1,in2,size2,out) smulma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) -#define d2d2OpStard2(in1,size1,in2,size2,out) dmulma(in1,size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define d2d2OpStard2(in1,size1,in2,size2,out) dmulma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) -#define c2c2OpStarc2(in1,size1,in2,size2,out) cmulma(in1,size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define c2c2OpStarc2(in1,size1,in2,size2,out) cmulma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) -#define c2s2OpStarc2(in1,size1,in2,size2,out) cmulma(in1,size1[0]*size1[1],FloatComplexMatrix(in2,0,size2[0]*size2[1]),size2[0]*size2[1],out) +#define c2s2OpStarc2(in1,size1,in2,size2,out) cmulma(in1,size1[0],size1[1],FloatComplexMatrix(in2,0,size2[0]*size2[1]),size2[0],size2[1],out) -#define s2c2OpStarc2(in1,size1,in2,size2,out) cmulma(FloatComplexMatrix(in1,0,size1[0]*size1[1]),size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define s2c2OpStarc2(in1,size1,in2,size2,out) cmulma(FloatComplexMatrix(in1,0,size1[0]*size1[1]),size1[0],size1[1],in2,size2[0],size2[1],out) -#define z2z2OpStarz2(in1,size1,in2,size2,out) zmulma(in1,size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define z2z2OpStarz2(in1,size1,in2,size2,out) zmulma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) -#define z2d2OpStarc2(in1,size1,in2,size2,out) cmulma(in1,size1[0]*size1[1],DoubleComplexMatrix(in2,0,size2[0]*size2[1]),size2[0]*size2[1],out) +#define z2d2OpStarc2(in1,size1,in2,size2,out) cmulma(in1,size1[0],size1[1],DoubleComplexMatrix(in2,0,size2[0],size2[1]),size2[0],size2[1],out) -#define d2z2OpStarc2(in1,size1,in2,size2,out) cmulma(DoubleComplexMatrix(in1,0,size1[0]*size1[1]),size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define d2z2OpStarc2(in1,size1,in2,size2,out) cmulma(DoubleComplexMatrix(in1,0,size1[0],size1[1]),size1[0],size1[1],in2,size2[0],size2[1],out) #endif /* !__INT_OPSTAR_H__ */ diff --git a/src/matrixOperations/interfaces/int_cat.h b/src/matrixOperations/interfaces/int_cat.h new file mode 100644 index 00000000..a4d8b132 --- /dev/null +++ b/src/matrixOperations/interfaces/int_cat.h @@ -0,0 +1,124 @@ +/* + * 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 + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_CAT_H__ +#define __INT_CAT_H__ + +/* Column Cat */ + +/* Same input elements */ + +#define s0s0OpCcs2(in1,in2,out) scolumncats(in1,in2,out) + +#define d0d0OpCcd2(in1,in2,out) dcolumncats(in1,in2,out) + +#define c0c0OpCcc2(in1,in2,out) ccolumncats(in1,in2,out) + +#define z0z0OpCcz2(in1,in2,out) zcolumncats(in1,in2,out) + +#define s2s2OpCcs2(in1,size1,in2,size2,out) scolumncata(in1, size1[0], size2[1], in2, size1[0], size2[1], out) + +#define d2d2OpCcd2(in1,size1,in2,size2,out) dcolumncata(in1, size1[0], size2[1], in2, size1[0], size2[1], out) + +#define c2c2OpCcc2(in1,size1,in2,size2,out) ccolumncata(in1, size1[0], size2[1], in2, size1[0], size2[1], out) + +#define z2z2OpCcz2(in1,size1,in2,size2,out) zcolumncata(in1, size1[0], size2[1], in2, size1[0], size2[1], out) + +/* Differents input elements */ + +/* Matrix-Scalar */ + +/* Same type */ +#define s2s0OpCcs2(in1,size,in2,out) scolumncata(in1, size[0], size[1], in2, 1, 1, out); + +#define d2d0OpCcd2(in1,size,in2,out) dcolumncata(in1, size[0], size[1], in2, 1, 1, out); + +#define c2c0OpCcc2(in1,size,in2,out) ccolumncata(in1, size[0], size[1], in2, 1, 1, out); + +#define z2z0OpCcz2(in1,size,in2,out) zcolumncata(in1, size[0], size[1], in2, 1, 1, out); + + +/* Different type */ + +/* Scalar-Matrix */ + +/* Same type */ +#define s0s2OpCcs2(in1,in2,size,out) scolumncata(in1, 1, 1, in2, size[0], size[1], out); + +#define d0d2OpCcd2(in1,in2,size,out) dcolumncata(in1, 1, 1, in2, size[0], size[1], out); + +#define c0c2OpCcc2(in1,in2,size,out) ccolumncata(in1, 1, 1, in2, size[0], size[1], out); + +#define z0z2OpCcz2(in1,in2,size,out) zcolumncata(in1, 1, 1, in2, size[0], size[1], out); + +/* Different type */ + + + + + + +/* Row Cat */ + +/* Same input elements */ + +#define s0s0OpRcs2(in1,in2,out) srowcats(in1,in2,out) + +#define d0d0OpRcd2(in1,in2,out) drowcats(in1,in2,out) + +#define c0c0OpRcc2(in1,in2,out) crowcats(in1,in2,out) + +#define z0z0OpRcz2(in1,in2,out) zrowcats(in1,in2,out) + +#define s2s2OpRcs2(in1,size1,in2,size2,out) srowcata(in1, size1[0], size2[1], in2, size1[0], size2[1], out) + +#define d2d2OpRcd2(in1,size1,in2,size2,out) drowcata(in1, size1[0], size2[1], in2, size1[0], size2[1], out) + +#define c2c2OpRcc2(in1,size1,in2,size2,out) crowcata(in1, size1[0], size2[1], in2, size1[0], size2[1], out) + +#define z2z2OpRcz2(in1,size1,in2,size2,out) zrowcata(in1, size1[0], size2[1], in2, size1[0], size2[1], out) + +/* Differents input elements */ + +/* Matrix-Scalar */ + +/* Same type */ +#define s2s0OpRcs2(in1,size,in2,out) srowcata(in1, size[0], size[1], in2, 1, 1, out); + +#define d2d0OpRcd2(in1,size,in2,out) drowcata(in1, size[0], size[1], in2, 1, 1, out); + +#define c2c0OpRcc2(in1,size,in2,out) crowcata(in1, size[0], size[1], in2, 1, 1, out); + +#define z2z0OpRcz2(in1,size,in2,out) zrowcata(in1, size[0], size[1], in2, 1, 1, out); + + +/* Different type */ + +/* Scalar-Matrix */ + +/* Same type */ +#define s0s2OpRcs2(in1,in2,size,out) srowcata(in1, 1, 1, in2, size[0], size[1], out); + +#define d0d2OpRcd2(in1,in2,size,out) drowcata(in1, 1, 1, in2, size[0], size[1], out); + +#define c0c2OpRcc2(in1,in2,size,out) crowcata(in1, 1, 1, in2, size[0], size[1], out); + +#define z0z2OpRcz2(in1,in2,size,out) zrowcata(in1, 1, 1, in2, size[0], size[1], out); + +/* Different type */ + + + + +#endif /* !__INT_CAT_H__ */ diff --git a/src/matrixOperations/interfaces/int_det.h b/src/matrixOperations/interfaces/int_det.h new file mode 100644 index 00000000..3c622929 --- /dev/null +++ b/src/matrixOperations/interfaces/int_det.h @@ -0,0 +1,34 @@ +/* + * 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 + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_DETERM_H__ +#define __INT_DETERM_H__ + +#define s0dets0(in) in + +#define d0detd0(in) in + +#define c0detc0(in) in + +#define z0detz0(in) in + +#define s2dets0(in,size,out) sdeterma(in, size[0]) + +#define d2detd0(in,size,out) ddeterma(in, size[0]) + +#define c2detc0(in,size,out) cdeterma(in, size[0]) + +#define z2detz0(in,size,out) zdeterma(in, size[0]) + +#endif /* !__INT_DETERM_H__ */ diff --git a/src/matrixOperations/interfaces/int_invert.h b/src/matrixOperations/interfaces/int_invert.h new file mode 100644 index 00000000..6e3b895b --- /dev/null +++ b/src/matrixOperations/interfaces/int_invert.h @@ -0,0 +1,34 @@ +/* + * 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 + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_INVERT_H__ +#define __INT_INVERT_H__ + +#define s0inverts0(in) 1/in + +#define d0invertd0(in) 1/in + +#define c0invertc0(in) crdivs(FloatComplex(1,0),in) + +#define z0invertz0(in) zrdivs(DoubleComplex(1,0),in) + +#define s2inverts2(in,size,out) sinverma(in, out, size[0]) + +#define d2invertd2(in,size,out) dinverma(in, out, size[0]) + +#define c2invertc2(in,size,out) cinverma(in, out, size[0]) + +#define z2invertz2(in,size,out) zinverma(in, out, size[0]) + +#endif /* !__INT_INVERT_H__ */ diff --git a/src/matrixOperations/interfaces/int_trace.h b/src/matrixOperations/interfaces/int_trace.h new file mode 100644 index 00000000..2b9a5d4e --- /dev/null +++ b/src/matrixOperations/interfaces/int_trace.h @@ -0,0 +1,34 @@ +/* + * 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 + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_TRACE_H__ +#define __INT_TRACE_H__ + +#define s0traces0(in) in + +#define d0traced0(in) in + +#define c0tracec0(in) in + +#define z0tracez0(in) in + +#define s2traces0(in,size,out) stracea(in, size[0]) + +#define d2traced0(in,size,out) dtracea(in, size[0]) + +#define c2tracec0(in,size,out) ctracea(in, size[0]) + +#define z2tracez0(in,size,out) ztracea(in, size[0]) + +#endif /* !__INT_TRACE_H__ */ diff --git a/src/matrixOperations/interfaces/interface.sh b/src/matrixOperations/interfaces/interface.sh new file mode 100755 index 00000000..8c7f073b --- /dev/null +++ b/src/matrixOperations/interfaces/interface.sh @@ -0,0 +1,6 @@ +for i in $@; do + +./generateInterfaces.pl --function-name $i --header-file int_$i.h + +done + diff --git a/src/operations/includes/division.h b/src/operations/includes/division.h index e5ff2e3e..103e1cf2 100644 --- a/src/operations/includes/division.h +++ b/src/operations/includes/division.h @@ -40,14 +40,11 @@ float srdivs (float in1, float in2); /* ** \brief Compute a right division 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 in2 : input array. +** \param size : size of in2 array = rows*columns. ** \param out : array that contains the division in1 ./ in2. */ -void srdiva (float* in1, int size1, - float* in2, int size2, - float* out ); +void srdiva (float* in1, float* in2, int size, float* out ); /* ** \brief Compute a right division for double. @@ -60,14 +57,11 @@ double drdivs (double in1, double in2); /* ** \brief Compute a right division 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 in2 : input array. +** \param size : size of in2 array = rows*columns. ** \param out : array that contains the division in1 ./ in2. */ -void drdiva (double* in1, int size1, - double* in2, int size2, - double* out ); +void drdiva (double* in1, double* in2, int size, double* out ); /* ** \brief Compute a right division for floats complex. @@ -80,14 +74,11 @@ floatComplex crdivs (floatComplex in1, floatComplex in2); /* ** \brief Compute a right division element ways for float complex. ** \param in1 : input array. -** \param size1 : size of in1 array. -** \param in2 : input arry. -** \param size2 : size of in2 array. +** \param in2 : input array. +** \param size : size of in2 array = rows*columns. ** \param out : array that contains the division in1 ./ in2. */ -void crdiva(floatComplex* in1, int size1, - floatComplex* in2, int size2, - floatComplex* out ); +void crdiva(floatComplex* in1, floatComplex* in2, int size, floatComplex* out ); /* ** \brief Compute a right division for double complex. @@ -100,14 +91,11 @@ doubleComplex zrdivs (doubleComplex in1, doubleComplex in2); /* ** \brief Compute a right division element ways for double complex. ** \param in1 : input array. -** \param size1 : size of in1 array. -** \param in2 : input arry. -** \param size2 : size of in2 array. +** \param in2 : input array. +** \param size : size of in2 array = rows*columns. ** \param out : array that contains the division in1 ./ in2. */ -void zrdiva(doubleComplex* in1, int size1, - doubleComplex* in2, int size2, - doubleComplex* out ); +void zrdiva(doubleComplex* in1, doubleComplex* in2, int size, doubleComplex* out ); /* ** LEFT DIVISION @@ -124,14 +112,11 @@ float sldivs (float in1, float in2); /* ** \brief Compute a left division 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 in2 : input array. +** \param size : size of in2 array = rows*columns. ** \param out : array that contains the division in1 .\ in2. */ -void sldiva (float* in1, int size1, - float* in2, int size2, - float* out ); +void sldiva (float* in1, float* in2, int size, float* out ); /* ** \brief Compute a left division for double. @@ -144,14 +129,11 @@ double dldivs (double in1, double in2); /* ** \brief Compute a left division 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 in2 : input array. +** \param size : size of in2 array = rows*columns. ** \param out : array that contains the division in1 .\ in2. */ -void dldiva (double* in1, int size1, - double* in2, int size2, - double* out ); +void dldiva (double* in1, double* in2, int size, double* out ); /* ** \brief Compute a left division for floats complex. @@ -164,14 +146,11 @@ floatComplex cldivs (floatComplex in1, floatComplex in2); /* ** \brief Compute a left division element ways for float complex. ** \param in1 : input array. -** \param size1 : size of in1 array. -** \param in2 : input arry. -** \param size2 : size of in2 array. +** \param in2 : input array. +** \param size : size of in2 array = rows*columns. ** \param out : array that contains the division in1 .\ in2. */ -void cldiva(floatComplex* in1, int size1, - floatComplex* in2, int size2, - floatComplex* out ); +void cldiva(floatComplex* in1, floatComplex* in2, int size, floatComplex* out ); /* ** \brief Compute a left division for double complex. @@ -184,14 +163,11 @@ doubleComplex zldivs (doubleComplex in1, doubleComplex in2); /* ** \brief Compute a left division element ways for double complex. ** \param in1 : input array. -** \param size1 : size of in1 array. -** \param in2 : input arry. -** \param size2 : size of in2 array. +** \param in2 : input array. +** \param size : size of in2 array = rows*columns. ** \param out : array that contains the division in1 .\ in2. */ -void zldiva(doubleComplex* in1, int size1, - doubleComplex* in2, int size2, - doubleComplex* out ); +void zldiva(doubleComplex* in1, doubleComplex* in2, int size, doubleComplex* out ); diff --git a/src/operations/includes/multiplication.h b/src/operations/includes/multiplication.h index 04e5c1d7..b8c28dd0 100644 --- a/src/operations/includes/multiplication.h +++ b/src/operations/includes/multiplication.h @@ -34,7 +34,7 @@ float smuls(float in1, float in2); /* ** \brief Compute a multiplication element ways for floats. ** \param in1 : input array. -** \param in2 : input arry. +** \param in2 : input array. ** \param size : size of in2 array. ** \param out : array that contains the multiplication = in1 .* in2. */ @@ -51,7 +51,7 @@ double dmuls(double in1, double in2); /* ** \brief Compute a multiplication element ways for double. ** \param in1 : input array. -** \param in2 : input arry. +** \param in2 : input array. ** \param size : size of in2 array. ** \param out : array that contains the multiplication = in1 .* in2. */ @@ -68,7 +68,7 @@ floatComplex cmuls(floatComplex in1, floatComplex in2); /* ** \brief Compute a multiplication element ways for complex single precision. ** \param in1 : input array. -** \param in2 : input arry. +** \param in2 : input array. ** \param size : size of in2 array. ** \param out : array that contains the multiplication = in1 .* in2. */ @@ -85,7 +85,7 @@ doubleComplex zmuls(doubleComplex in1, doubleComplex in2); /* ** \brief Compute a multiplication element ways for complex double precision. ** \param in1 : input array. -** \param in2 : input arry. +** \param in2 : input array. ** \param size: size of in2 array. ** \param out : array that contains the multiplication = in1 .* in2. */ diff --git a/src/operations/interface/int_DotBackSlash.h b/src/operations/interface/int_DotBackSlash.h index c082203e..3c6e15a7 100644 --- a/src/operations/interface/int_DotBackSlash.h +++ b/src/operations/interface/int_DotBackSlash.h @@ -73,21 +73,21 @@ /* Matrix .\ Matrix */ -#define s2s2OpDotBackSlashs2(in1,size1,in2,size2,out) sldiva(in1,size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define s2s2OpDotBackSlashs2(in1,size1,in2,size2,out) sldiva(in1,in2,size2[0]*size2[1],out) -#define d2d2OpDotBackSlashd2(in1,size1,in2,size2,out) dldiva(in1,size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define d2d2OpDotBackSlashd2(in1,size1,in2,size2,out) dldiva(in1,in2,size2[0]*size2[1],out) -#define c2c2OpDotBackSlashc2(in1,size1,in2,size2,out) cldiva(in1,size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define c2c2OpDotBackSlashc2(in1,size1,in2,size2,out) cldiva(in1,in2,size2[0]*size2[1],out) -#define c2s2OpDotBackSlashc2(in1,size1,in2,size2,out) cldiva(in1,size1[0]*size1[1],FloatComplexMatrix(in2,0,size2[0]*size2[1]),size2[0]*size2[1],out) +#define c2s2OpDotBackSlashc2(in1,size1,in2,size2,out) cldiva(in1,FloatComplexMatrix(in2,0,size2[0]*size2[1]),size2[0]*size2[1],out) -#define s2c2OpDotBackSlashc2(in1,size1,in2,size2,out) cldiva(FloatComplexMatrix(in1,0,size1[0]*size1[1]),size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define s2c2OpDotBackSlashc2(in1,size1,in2,size2,out) cldiva(FloatComplexMatrix(in1,0,size1[0]*size1[1]),in2,size2[0]*size2[1],out) -#define z2z2OpDotBackSlashz2(in1,size1,in2,size2,out) zldiva(in1,size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define z2z2OpDotBackSlashz2(in1,size1,in2,size2,out) zldiva(in1,in2,size2[0]*size2[1],out) -#define z2d2OpDotBackSlashc2(in1,size1,in2,size2,out) cldiva(in1,size1[0]*size1[1],DoubleComplexMatrix(in2,0,size2[0]*size2[1]),size2[0]*size2[1],out) +#define z2d2OpDotBackSlashc2(in1,size1,in2,size2,out) cldiva(in1,DoubleComplexMatrix(in2,0,size2[0]*size2[1]),size2[0]*size2[1],out) -#define d2z2OpDotBackSlashc2(in1,size1,in2,size2,out) cldiva(DoubleComplexMatrix(in1,0,size1[0]*size1[1]),size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define d2z2OpDotBackSlashc2(in1,size1,in2,size2,out) cldiva(DoubleComplexMatrix(in1,0,size1[0]*size1[1]),in2,size2[0]*size2[1],out) #endif /* !__INT_DOTDotBackSlash_H__ */ diff --git a/src/operations/interface/int_OpDotSlash.h b/src/operations/interface/int_OpDotSlash.h index bc56ef06..a745b77c 100644 --- a/src/operations/interface/int_OpDotSlash.h +++ b/src/operations/interface/int_OpDotSlash.h @@ -73,21 +73,21 @@ /* Matrix ./ Matrix */ -#define s2s2OpDotSlashs2(in1,size1,in2,size2,out) srdiva(in1,size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define s2s2OpDotSlashs2(in1,size1,in2,size2,out) srdiva(in1,in2,size2[0]*size2[1],out) -#define d2d2OpDotSlashd2(in1,size1,in2,size2,out) drdiva(in1,size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define d2d2OpDotSlashd2(in1,size1,in2,size2,out) drdiva(in1,in2,size2[0]*size2[1],out) -#define c2c2OpDotSlashc2(in1,size1,in2,size2,out) crdiva(in1,size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define c2c2OpDotSlashc2(in1,size1,in2,size2,out) crdiva(in1,in2,size2[0]*size2[1],out) -#define c2s2OpDotSlashc2(in1,size1,in2,size2,out) crdiva(in1,size1[0]*size1[1],FloatComplexMatrix(in2,0,size2[0]*size2[1]),size2[0]*size2[1],out) +#define c2s2OpDotSlashc2(in1,size1,in2,size2,out) crdiva(in1,FloatComplexMatrix(in2,0,size2[0]*size2[1]),size2[0]*size2[1],out) -#define s2c2OpDotSlashc2(in1,size1,in2,size2,out) crdiva(FloatComplexMatrix(in1,0,size1[0]*size1[1]),size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define s2c2OpDotSlashc2(in1,size1,in2,size2,out) crdiva(FloatComplexMatrix(in1,0,size1[0]*size1[1]),in2,size2[0]*size2[1],out) -#define z2z2OpDotSlashz2(in1,size1,in2,size2,out) zrdiva(in1,size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define z2z2OpDotSlashz2(in1,size1,in2,size2,out) zrdiva(in1,in2,size2[0]*size2[1],out) -#define z2d2OpDotSlashc2(in1,size1,in2,size2,out) crdiva(in1,size1[0]*size1[1],DoubleComplexMatrix(in2,0,size2[0]*size2[1]),size2[0]*size2[1],out) +#define z2d2OpDotSlashc2(in1,size1,in2,size2,out) crdiva(in1,DoubleComplexMatrix(in2,0,size2[0]*size2[1]),size2[0]*size2[1],out) -#define d2z2OpDotSlashc2(in1,size1,in2,size2,out) crdiva(DoubleComplexMatrix(in1,0,size1[0]*size1[1]),size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define d2z2OpDotSlashc2(in1,size1,in2,size2,out) crdiva(DoubleComplexMatrix(in1,0,size1[0]*size1[1]),in2,size2[0]*size2[1],out) diff --git a/src/operations/interface/int_OpDotStar.h b/src/operations/interface/int_OpDotStar.h index 8adfee87..d996c0c7 100644 --- a/src/operations/interface/int_OpDotStar.h +++ b/src/operations/interface/int_OpDotStar.h @@ -73,21 +73,21 @@ /* Matrix .* Matrix */ -#define s2s2OpDotStars2(in1,size1,in2,size2,out) smula(in1,size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define s2s2OpDotStars2(in1,size1,in2,size2,out) smula(in1,in2,size2[0]*size2[1],out) -#define d2d2OpDotStard2(in1,size1,in2,size2,out) dmula(in1,size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define d2d2OpDotStard2(in1,size1,in2,size2,out) dmula(in1,in2,size2[0]*size2[1],out) -#define c2c2OpDotStarc2(in1,size1,in2,size2,out) cmula(in1,size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define c2c2OpDotStarc2(in1,size1,in2,size2,out) cmula(in1,in2,size2[0]*size2[1],out) -#define c2s2OpDotStarc2(in1,size1,in2,size2,out) cmula(in1,size1[0]*size1[1],FloatComplexMatrix(in2,0,size2[0]*size2[1]),size2[0]*size2[1],out) +#define c2s2OpDotStarc2(in1,size1,in2,size2,out) cmula(in1,FloatComplexMatrix(in2,0,size2[0]*size2[1]),size2[0]*size2[1],out) -#define s2c2OpDotStarc2(in1,size1,in2,size2,out) cmula(FloatComplexMatrix(in1,0,size1[0]*size1[1]),size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define s2c2OpDotStarc2(in1,size1,in2,size2,out) cmula(FloatComplexMatrix(in1,0,size1[0]*size1[1]),in2,size2[0]*size2[1],out) -#define z2z2OpDotStarz2(in1,size1,in2,size2,out) zmula(in1,size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define z2z2OpDotStarz2(in1,size1,in2,size2,out) zmula(in1,in2,size2[0]*size2[1],out) -#define z2d2OpDotStarc2(in1,size1,in2,size2,out) cmula(in1,size1[0]*size1[1],DoubleComplexMatrix(in2,0,size2[0]*size2[1]),size2[0]*size2[1],out) +#define z2d2OpDotStarc2(in1,size1,in2,size2,out) cmula(in1,DoubleComplexMatrix(in2,0,size2[0]*size2[1]),size2[0]*size2[1],out) -#define d2z2OpDotStarc2(in1,size1,in2,size2,out) cmula(DoubleComplexMatrix(in1,0,size1[0]*size1[1]),size1[0]*size1[1],in2,size2[0]*size2[1],out) +#define d2z2OpDotStarc2(in1,size1,in2,size2,out) cmula(DoubleComplexMatrix(in1,0,size1[0]*size1[1]),in2,size2[0]*size2[1],out) #endif /* !__INT_OPDOTSTAR_H__ */ diff --git a/src/operations/interface/int_OpMinus.h b/src/operations/interface/int_OpMinus.h index 6d925c3d..ccdf32df 100644 --- a/src/operations/interface/int_OpMinus.h +++ b/src/operations/interface/int_OpMinus.h @@ -70,6 +70,22 @@ #define z2d0OpMinusz2(in1,size,in2,out) for(int i=0;i<size[0]*size[1];i++) out[i]= zdiffs(in1[i],DoubleComplex(in2,0)); +/* Matrix - Matrix */ +#define s2s2OpMinuss2(in1,size1,in2,size2,out) sdiffa(in1, size1[0]*size1[1], in2, size2[0]*size2[1], out) + +#define d2d2OpMinusd2(in1,size1,in2,size2,out) ddiffa(in1, size1[0]*size1[1], in2, size2[0]*size2[1], out) + +#define c2c2OpMinusc2(in1,size1,in2,size2,out) cdiffa(in1, size1[0]*size1[1], in2, size2[0]*size2[1], out) + +#define c2s2OpMinusc2(in1,size1,in2,size2,out) cdiffa(in1, size1[0]*size1[1], FloatComplexMatrix(in2,0,size2[0]*size2[1]), size2[0]*size2[1], out) + +#define s2c2OpMinusc2(in1,size1,in2,size2,out) cdiffa(FloatComplexMatrix(in1,0,size1[0]*size1[1]), size1[0]*size1[1], in2, size2[0]*size2[1], out) + +#define z2z2OpMinusz2(in1,size1,in2,size2,out) zdiffa(in1, size1[0]*size1[1], in2, size2[0]*size2[1], out) + +#define z2d2OpMinusz2(in1,size1,in2,size2,out) zdiffa(in1, size1[0]*size1[1], DoubleComplexMatrix(in2,0,size2[0]*size2[1]), size2[0]*size2[1], out) + +#define d2z2OpMinusz2(in1,size1,in2,size2,out) zdiffa(DoubleComplexMatrix(in1,0,size1[0]*size1[1]), size1[0]*size1[1], in2, size2[0]*size2[1], out) #endif /* !__INT_OPMINUS_H__ */ diff --git a/src/operations/interface/int_OpPlus.h b/src/operations/interface/int_OpPlus.h index 7cfe31d8..8e56692c 100644 --- a/src/operations/interface/int_OpPlus.h +++ b/src/operations/interface/int_OpPlus.h @@ -74,5 +74,27 @@ #define z0d2OpPlusz2(in1,size,in2,out) for (int i=0;i<size[0]*size[1];i++) out[i] = zadds(in1,DoubleComplex(in2[i],0)) +/* Matrix + Matrix */ + +#define s2s2OpPluss2(in1,size1,in2,size2,out) sadda(in1, size1[0]*size1[1], in2, size2[0]*siz2e[1], out) + +#define d2d2OpPlusd2(in1,size1,in2,size2,out) dadda(in1, size1[0]*size1[1], in2, size2[0]*size2[1], out) + +#define c2c2OpPlusc2(in1,size1,in2,size2,out) cadda(in1, size1[0]*size1[1], in2, size2[0]*size2[1], out) + +#define s2c2OpPlusc2(in1,size1,in2,size2,out) cadda(FloatComplexMatrix(in1,0,size1[0]*size1[1]), size1[0]*size1[1], in2, size2[0]*size2[1], out) + +#define c2s2OpPlusc2(in1,size1,in2,size2,out) cadda(in1, size1[0]*siz1e[1], FloatComplexMatrix(in2,0,size2[0]*size2[1]), size2[0]*size2[1], out) + +#define z2z2OpPlusz2(in1,size1,in2,size2,out) zadda(in1, size1[0]*size1[1], in2, size2[0]*size2[1], out) + +#define d2z2OpPlusz2(in1,size1,in2,size2,out) zadda(DoubleComplexMatrix(in1,0,size1[0]*size1[1]), size1[0]*size1[1], in2, size2[0]*size2[1], out) + +#define z2d2OpPlusz2(in1,size1,in2,size2,out) zadda(in1, size1[0]*size1[1], DoubleComplexMatrix(in2,0,size2[0]*size2[1]), size2[0]*size2[1], out) + + + + + #endif /* !__INT_OPPLUS_H__ */ diff --git a/src/signalProcessing/includes/fft.h b/src/signalProcessing/includes/fft.h index 30a12e21..593c6eb3 100644 --- a/src/signalProcessing/includes/fft.h +++ b/src/signalProcessing/includes/fft.h @@ -16,6 +16,15 @@ #include "floatComplex.h" #include "doubleComplex.h" + +#define sffts(in) in +#define dffts(in) in +#define cffts(in) in +#define zffts(in) in + +#define sfftma(in,rows,columns,out) cfftma(FloatComplexMatrix(in,0),rows,columns,out) +#define dfftma(in,rows,columns,out) zfftma(DoubleComplexMatrix(in,0),rows,columns,out) + /* ** compute the fast fourier transform of a vector ** param in : the input matrix in complex float precision diff --git a/src/signalProcessing/includes/ifft.h b/src/signalProcessing/includes/ifft.h index ba6e8848..e599b22a 100644 --- a/src/signalProcessing/includes/ifft.h +++ b/src/signalProcessing/includes/ifft.h @@ -16,6 +16,13 @@ #include "floatComplex.h" #include "doubleComplex.h" +#define siffts(in) in +#define diffts(in) in +#define ciffts(in) in +#define ziffts(in) in + +#define sifftma(in,rows,columns,out) cifftma(FloatComplexMatrix(in,0),rows,columns,out) +#define difftma(in,rows,columns,out) zifftma(DoubleComplexMatrix(in,0),rows,columns,out) /* ** compute the inverse fast fourier transform of a vector diff --git a/src/signalProcessing/interfaces/int_cepstrum.h b/src/signalProcessing/interfaces/int_cepstrum.h new file mode 100644 index 00000000..af1991ba --- /dev/null +++ b/src/signalProcessing/interfaces/int_cepstrum.h @@ -0,0 +1,34 @@ +/* + * 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 + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_CEPSTRUM_H__ +#define __INT_CEPSTRUM_H__ + +#define s0cepstrums0(in) scepstrums(in) + +#define d0cepstrumd0(in) dcepstrums(in) + +#define c0cepstrumc0(in) ccepstrums(in) + +#define z0cepstrumz0(in) zcepstrums(in) + +#define s2cepstrums2(in,size,out) scepstruma(in, size[0]*size[1], out) + +#define d2cepstrumd2(in,size,out) dcepstruma(in, size[0]*size[1], out) + +#define c2cepstrumc2(in,size,out) ccepstruma(in, size[0]*size[1], out) + +#define z2cepstrumz2(in,size,out) zcepstruma(in, size[0]*size[1], out) + +#endif /* !__INT_CEPSTRUM_H__ */ diff --git a/src/signalProcessing/interfaces/int_convol.h b/src/signalProcessing/interfaces/int_convol.h new file mode 100644 index 00000000..9c0b730a --- /dev/null +++ b/src/signalProcessing/interfaces/int_convol.h @@ -0,0 +1,35 @@ +/* + * 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 + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_CONVOL_H__ +#define __INT_CONVOL_H__ + +#define s0s0convols0(in1,in2) in1*in2 + +#define d0d0convold0(in1,in2) in1*in2 + +#define c0c0convolc0(in1,in2) cmuls(in1,in2) + +#define z0z0convolz0(in1,in2) zmuls(in1,in2) + + +#define s2convols2(in,size,out) sconvola(in, size[0]*size[1], out) + +#define d2convold2(in,size,out) dconvola(in, size[0]*size[1], out) + +#define c2convolc2(in,size,out) cconvola(in, size[0]*size[1], out) + +#define z2convolz2(in,size,out) zconvola(in, size[0]*size[1], out) + +#endif /* !__INT_CONVOL_H__ */ diff --git a/src/signalProcessing/interfaces/int_fft.h b/src/signalProcessing/interfaces/int_fft.h new file mode 100644 index 00000000..8366f095 --- /dev/null +++ b/src/signalProcessing/interfaces/int_fft.h @@ -0,0 +1,52 @@ +/* + * 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 + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_FFT_H__ +#define __INT_FFT_H__ + +#define s0fftc0(in) FloatComplex(sffts(in),0) + +#define d0fftz0(in) DoubleComplex(dffts(in),0) + +#define c0fftc0(in) cffts(in) + +#define z0fftz0(in) zffts(in) + +#define s2fftc2(in,size,out) sfftma(in, size[0], size[1], out) + +#define d2fftz2(in,size,out) dfftma(in, size[0], size[1], out) + +#define c2fftc2(in,size,out) cfftma(in, size[0], size[1], out) + +#define z2fftz2(in,size,out) zfftma(in, size[0], size[1], out) + + + +#define s0s0fftc0(in1,in2) (in2==-1) ? s0fftc0(in1) : s0ifftc0(in1) + +#define d0d0fftz0(in1,in2) (in2==-1) ? d0fftz0(in1) : d0ifftz0(in1) + +#define c0s0fftc0(in1,in2) (in2==-1) ? c0fftc0(in1) : c0ifftc0(in1) + +#define z0d0fftz0(in1,in2) (in2==-1) ? z0fftz0(in1) : z0ifftz0(in1) + +#define s2s0fftc2(in1,size,in2,out) (in2==-1) ? s2fftc2(in1,size,out) : s2ifftc2(in1,size,out) + +#define d2d0fftz2(in1,size,in2,out) (in2==-1) ? d2fftz2(in1,size,out) : d2ifftz2(in1,size,out) + +#define c2s0fftc2(in1,size,in2,out) (in2==-1) ? c2fftc2(in1,size,out) : c2ifftc2(in1,size,out) + +#define z2d0fftz2(in1,size,in2,out) (in2==-1) ? z2fftz2(in1,size,out) : z2ifftz2(in1,size,out) + +#endif /* !__INT_FFT_H__ */ diff --git a/src/signalProcessing/interfaces/int_ifft.h b/src/signalProcessing/interfaces/int_ifft.h new file mode 100644 index 00000000..419969c9 --- /dev/null +++ b/src/signalProcessing/interfaces/int_ifft.h @@ -0,0 +1,34 @@ +/* + * 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 + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_IFFT_H__ +#define __INT_IFFT_H__ + +#define s0ifftc0(in) FloatComlex(siffts(in),0) + +#define d0ifftz0(in) DoubleComlex(diffts(in),0) + +#define c0ifftc0(in) ciffts(in) + +#define z0ifftz0(in) ziffts(in) + +#define s2ifftc2(in,size,out) sifftma(in, size[0], size[1], out) + +#define d2ifftz2(in,size,out) difftma(in, size[0], size[1], out) + +#define c2ifftc2(in,size,out) cifftma(in, size[0], size[1], out) + +#define z2ifftz2(in,size,out) zifftma(in, size[0], size[1], out) + +#endif /* !__INT_IFFT_H__ */ diff --git a/src/signalProcessing/interfaces/int_lev.h b/src/signalProcessing/interfaces/int_lev.h new file mode 100644 index 00000000..3a4a86a9 --- /dev/null +++ b/src/signalProcessing/interfaces/int_lev.h @@ -0,0 +1,34 @@ +/* + * 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 + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_LEV_H__ +#define __INT_LEV_H__ + +#define s0levs0(in) slevs(in) + +#define d0levd0(in) dlevs(in) + +#define c0levc0(in) clevs(in) + +#define z0levz0(in) zlevs(in) + +#define s2levs2(in,size,out) sleva(in, size[0]*size[1], out) + +#define d2levd2(in,size,out) dleva(in, size[0]*size[1], out) + +#define c2levc2(in,size,out) cleva(in, size[0]*size[1], out) + +#define z2levz2(in,size,out) zleva(in, size[0]*size[1], out) + +#endif /* !__INT_LEV_H__ */ |