diff options
author | Sandeep Gupta | 2017-07-06 15:16:16 +0530 |
---|---|---|
committer | Sandeep Gupta | 2017-07-06 15:16:16 +0530 |
commit | cb1d99232e521c34e9f0c271a6c4176cc7b9cbe4 (patch) | |
tree | 47a9dacb127137102fefd3c4dfc7ce292381ae78 | |
parent | d5463e3c142c57a8f4dcf64da54e72d6af9a968b (diff) | |
download | Scilab2C_fossee_old-cb1d99232e521c34e9f0c271a6c4176cc7b9cbe4.tar.gz Scilab2C_fossee_old-cb1d99232e521c34e9f0c271a6c4176cc7b9cbe4.tar.bz2 Scilab2C_fossee_old-cb1d99232e521c34e9f0c271a6c4176cc7b9cbe4.zip |
Changes
22 files changed, 44 insertions, 12 deletions
diff --git a/macros/ASTManagement/lib b/macros/ASTManagement/lib Binary files differindex 9c1210d..b3633d5 100644 --- a/macros/ASTManagement/lib +++ b/macros/ASTManagement/lib diff --git a/macros/CCodeGeneration/lib b/macros/CCodeGeneration/lib Binary files differindex 9a1b93c..2d5aef4 100644 --- a/macros/CCodeGeneration/lib +++ b/macros/CCodeGeneration/lib diff --git a/macros/ErrorMessages/lib b/macros/ErrorMessages/lib Binary files differindex 4c570fd..a99820c 100644 --- a/macros/ErrorMessages/lib +++ b/macros/ErrorMessages/lib diff --git a/macros/FunctionAnnotation/lib b/macros/FunctionAnnotation/lib Binary files differindex 8d5a37f..4f9081d 100644 --- a/macros/FunctionAnnotation/lib +++ b/macros/FunctionAnnotation/lib diff --git a/macros/FunctionList/lib b/macros/FunctionList/lib Binary files differindex 9b8cfc8..f59833d 100644 --- a/macros/FunctionList/lib +++ b/macros/FunctionList/lib diff --git a/macros/GeneralFunctions/lib b/macros/GeneralFunctions/lib Binary files differindex 54bea32..e151923 100644 --- a/macros/GeneralFunctions/lib +++ b/macros/GeneralFunctions/lib diff --git a/macros/Hardware/AVR/lib b/macros/Hardware/AVR/lib Binary files differindex 5f9662b..6206fdf 100644 --- a/macros/Hardware/AVR/lib +++ b/macros/Hardware/AVR/lib diff --git a/macros/Hardware/RasberryPi/lib b/macros/Hardware/RasberryPi/lib Binary files differindex 370158b..e2b0214 100644 --- a/macros/Hardware/RasberryPi/lib +++ b/macros/Hardware/RasberryPi/lib diff --git a/macros/ImageProcessing/core/lib b/macros/ImageProcessing/core/lib Binary files differindex 94cf463..55055e4 100644 --- a/macros/ImageProcessing/core/lib +++ b/macros/ImageProcessing/core/lib diff --git a/macros/ImageProcessing/highgui/lib b/macros/ImageProcessing/highgui/lib Binary files differindex 21e6ae8..64253e0 100644 --- a/macros/ImageProcessing/highgui/lib +++ b/macros/ImageProcessing/highgui/lib diff --git a/macros/ImageProcessing/imgproc/lib b/macros/ImageProcessing/imgproc/lib Binary files differindex 35c8cc5..3b80459 100644 --- a/macros/ImageProcessing/imgproc/lib +++ b/macros/ImageProcessing/imgproc/lib diff --git a/macros/Scilab-Arduino/lib b/macros/Scilab-Arduino/lib Binary files differindex cd911ee..371723f 100644 --- a/macros/Scilab-Arduino/lib +++ b/macros/Scilab-Arduino/lib diff --git a/macros/SymbolTable/lib b/macros/SymbolTable/lib Binary files differindex a978ec5..2e93305 100644 --- a/macros/SymbolTable/lib +++ b/macros/SymbolTable/lib diff --git a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci index ec41a69..6c4bb14 100644 --- a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci +++ b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci @@ -6929,7 +6929,7 @@ ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); PrintStringInfo('NIN= 1',ClassFileName,'file','y');
PrintStringInfo('NOUT= 3',ClassFileName,'file','y');
PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
-PrintStringInfo('OUT(1).SZ(1)= FA_SZ_FULLRF(IN(1))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
PrintStringInfo('OUT(2).TP= IN(1).TP',ClassFileName,'file','y');
PrintStringInfo('OUT(2).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
diff --git a/macros/ToolInitialization/lib b/macros/ToolInitialization/lib Binary files differindex 1b0f5bd..45853ea 100644 --- a/macros/ToolInitialization/lib +++ b/macros/ToolInitialization/lib diff --git a/macros/findDeps/lib b/macros/findDeps/lib Binary files differBinary files differindex 28e8369..acee5b0 100644 --- a/macros/findDeps/lib +++ b/macros/findDeps/lib diff --git a/src/c/linearAlgebra/hess/dhessa.c b/src/c/linearAlgebra/hess/dhessa.c index 57f81b3..e1f2e2d 100644 --- a/src/c/linearAlgebra/hess/dhessa.c +++ b/src/c/linearAlgebra/hess/dhessa.c @@ -20,11 +20,13 @@ #include "matrixTranspose.h" #include "matrixMultiplication.h" +/* Lapack subroutines - which are used*/ extern int dgehrd_(int *, int *,int *,double *,int *,double *,double *,int *,int *); extern int dorghr_(int *, int *,int *,double *,int *,double *,double *,int *,int *); - +/* All the vairbale names are given exactly the same name as scilab source code */ void dhessa(double *in1,int size,int nout,double *out1, double *out2){ +/* Variables names are done through, Lapack library. */ int i,j,k; int N = size; int ILO=1; @@ -41,11 +43,11 @@ void dhessa(double *in1,int size,int nout,double *out1, double *out2){ WORK = (double *)malloc((double)LWORK*sizeof(double)); dgehrd_(&N,&ILO,&IHI,A,&LDA,TAU,WORK,&N,&INFO); - for(i=0;i<N;i++) + for(i=0;i<N;i++) /* copying it in output */ for(j=0;j<N;j++) out2[i+j*N] = A[i+j*N]; - for(j=1;j<=N-2;j++){ + for(j=1;j<=N-2;j++){ /* copying it in output */ for(i=j+2;i<=N;i++){ out2[(i-1)+(j-1)*N] = 0; } diff --git a/src/c/linearAlgebra/projspec/dprojspeca.c b/src/c/linearAlgebra/projspec/dprojspeca.c index 6bb6fa5..aea9713 100644 --- a/src/c/linearAlgebra/projspec/dprojspeca.c +++ b/src/c/linearAlgebra/projspec/dprojspeca.c @@ -63,8 +63,5 @@ double dprojspeca(double *inp1,int row,int col,double *out1,double *out2,double index = 0; return index; } - index = 1; - - } diff --git a/src/c/linearAlgebra/sqroot/dsqroota.c b/src/c/linearAlgebra/sqroot/dsqroota.c index 038afc9..a9062e6 100644 --- a/src/c/linearAlgebra/sqroot/dsqroota.c +++ b/src/c/linearAlgebra/sqroot/dsqroota.c @@ -108,9 +108,9 @@ void dsqroota(double *inp,int row,int col, double *out){ } for(i=0;i<col*rk;i++){ B[i] = V[i]; - printf("%lf ",B[i]); + //printf("%lf ",B[i]); } - printf("\n"); + //printf("\n"); /*for(i=0;i<rk;i++){ for(j=0;j<rk;j++){ //A[i*rk+j] = sqrt(S[i*row+j]); diff --git a/src/c/linearAlgebra/sva/dsvaa.c b/src/c/linearAlgebra/sva/dsvaa.c index 0d34d8d..691694e 100644 --- a/src/c/linearAlgebra/sva/dsvaa.c +++ b/src/c/linearAlgebra/sva/dsvaa.c @@ -20,6 +20,7 @@ #define eps 2.22044604925e-16 +/* Ref: Scilab source code */ void dsvaa(int ninp,double *in1,int row,int col,double in2,double *out1, \ double *out2,double *out3){ @@ -70,21 +71,21 @@ void dsvaa(int ninp,double *in1,int row,int col,double in2,double *out1, \ } } arow = M; - acol = Min(M,N); + acol = Min(M,N); /* Copying, the output in required format */ for(i=0;i<arow;i++){ for(j=0;j<rk;j++){ out1[i+j*row]=U[i+j*arow]; } } arow = Min(M,N); - for(i=0;i<rk;i++){ + for(i=0;i<rk;i++){ /* Copying, the output in required format */ for(j=0;j<rk;j++){ out2[i+j*(int)rk] = S[i+j*arow]; } } arow = N; acol = Min(M,N); - for(i=0;i<arow;i++){ + for(i=0;i<arow;i++){ /* Copying, the output in required format */ for(j=0;j<rk;j++){ out3[i+j*arow] = V[i+j*arow]; } diff --git a/src/c/matrixOperations/Slash/dslasha.c b/src/c/matrixOperations/Slash/dslasha.c new file mode 100644 index 0000000..cb2007b --- /dev/null +++ b/src/c/matrixOperations/Slash/dslasha.c @@ -0,0 +1,32 @@ +/* Copyright (C) 2017 - 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: Sandeep Gupta + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ + +/*This function finds the A/B. */ + +/* X = slash(A,B) <=> X = A/B */ + +#include <stdio.h> +#include "string.h" +#include "stdlib.h" +#include "lapack.h" +#include "matrixTranspose.h" +#include "matrixMultiplication.h" + +void dslasha(double *A,int m1,int n1,double *B,int m2,int n2,double *out){ + if(m1 != n1 && m1 != m2 && m2 != n2){ + return; + } + + double AF; + AF = (double *)malloc(); + +} |