summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandeep Gupta2017-07-06 15:16:16 +0530
committerSandeep Gupta2017-07-06 15:16:16 +0530
commitcb1d99232e521c34e9f0c271a6c4176cc7b9cbe4 (patch)
tree47a9dacb127137102fefd3c4dfc7ce292381ae78
parentd5463e3c142c57a8f4dcf64da54e72d6af9a968b (diff)
downloadScilab2C_fossee_old-cb1d99232e521c34e9f0c271a6c4176cc7b9cbe4.tar.gz
Scilab2C_fossee_old-cb1d99232e521c34e9f0c271a6c4176cc7b9cbe4.tar.bz2
Scilab2C_fossee_old-cb1d99232e521c34e9f0c271a6c4176cc7b9cbe4.zip
Changes
-rw-r--r--macros/ASTManagement/libbin1820 -> 1896 bytes
-rw-r--r--macros/CCodeGeneration/libbin964 -> 1040 bytes
-rw-r--r--macros/ErrorMessages/libbin476 -> 552 bytes
-rw-r--r--macros/FunctionAnnotation/libbin2284 -> 2324 bytes
-rw-r--r--macros/FunctionList/libbin544 -> 620 bytes
-rw-r--r--macros/GeneralFunctions/libbin1088 -> 1164 bytes
-rw-r--r--macros/Hardware/AVR/libbin928 -> 1004 bytes
-rw-r--r--macros/Hardware/RasberryPi/libbin932 -> 1008 bytes
-rw-r--r--macros/ImageProcessing/core/libbin480 -> 556 bytes
-rw-r--r--macros/ImageProcessing/highgui/libbin540 -> 616 bytes
-rw-r--r--macros/ImageProcessing/imgproc/libbin708 -> 784 bytes
-rw-r--r--macros/Scilab-Arduino/libbin552 -> 628 bytes
-rw-r--r--macros/SymbolTable/libbin720 -> 760 bytes
-rw-r--r--macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci2
-rw-r--r--macros/ToolInitialization/libbin796 -> 836 bytes
-rw-r--r--macros/findDeps/libbin588 -> 628 bytes
-rw-r--r--macros/libbin492 -> 568 bytes
-rw-r--r--src/c/linearAlgebra/hess/dhessa.c8
-rw-r--r--src/c/linearAlgebra/projspec/dprojspeca.c3
-rw-r--r--src/c/linearAlgebra/sqroot/dsqroota.c4
-rw-r--r--src/c/linearAlgebra/sva/dsvaa.c7
-rw-r--r--src/c/matrixOperations/Slash/dslasha.c32
22 files changed, 44 insertions, 12 deletions
diff --git a/macros/ASTManagement/lib b/macros/ASTManagement/lib
index 9c1210d..b3633d5 100644
--- a/macros/ASTManagement/lib
+++ b/macros/ASTManagement/lib
Binary files differ
diff --git a/macros/CCodeGeneration/lib b/macros/CCodeGeneration/lib
index 9a1b93c..2d5aef4 100644
--- a/macros/CCodeGeneration/lib
+++ b/macros/CCodeGeneration/lib
Binary files differ
diff --git a/macros/ErrorMessages/lib b/macros/ErrorMessages/lib
index 4c570fd..a99820c 100644
--- a/macros/ErrorMessages/lib
+++ b/macros/ErrorMessages/lib
Binary files differ
diff --git a/macros/FunctionAnnotation/lib b/macros/FunctionAnnotation/lib
index 8d5a37f..4f9081d 100644
--- a/macros/FunctionAnnotation/lib
+++ b/macros/FunctionAnnotation/lib
Binary files differ
diff --git a/macros/FunctionList/lib b/macros/FunctionList/lib
index 9b8cfc8..f59833d 100644
--- a/macros/FunctionList/lib
+++ b/macros/FunctionList/lib
Binary files differ
diff --git a/macros/GeneralFunctions/lib b/macros/GeneralFunctions/lib
index 54bea32..e151923 100644
--- a/macros/GeneralFunctions/lib
+++ b/macros/GeneralFunctions/lib
Binary files differ
diff --git a/macros/Hardware/AVR/lib b/macros/Hardware/AVR/lib
index 5f9662b..6206fdf 100644
--- a/macros/Hardware/AVR/lib
+++ b/macros/Hardware/AVR/lib
Binary files differ
diff --git a/macros/Hardware/RasberryPi/lib b/macros/Hardware/RasberryPi/lib
index 370158b..e2b0214 100644
--- a/macros/Hardware/RasberryPi/lib
+++ b/macros/Hardware/RasberryPi/lib
Binary files differ
diff --git a/macros/ImageProcessing/core/lib b/macros/ImageProcessing/core/lib
index 94cf463..55055e4 100644
--- a/macros/ImageProcessing/core/lib
+++ b/macros/ImageProcessing/core/lib
Binary files differ
diff --git a/macros/ImageProcessing/highgui/lib b/macros/ImageProcessing/highgui/lib
index 21e6ae8..64253e0 100644
--- a/macros/ImageProcessing/highgui/lib
+++ b/macros/ImageProcessing/highgui/lib
Binary files differ
diff --git a/macros/ImageProcessing/imgproc/lib b/macros/ImageProcessing/imgproc/lib
index 35c8cc5..3b80459 100644
--- a/macros/ImageProcessing/imgproc/lib
+++ b/macros/ImageProcessing/imgproc/lib
Binary files differ
diff --git a/macros/Scilab-Arduino/lib b/macros/Scilab-Arduino/lib
index cd911ee..371723f 100644
--- a/macros/Scilab-Arduino/lib
+++ b/macros/Scilab-Arduino/lib
Binary files differ
diff --git a/macros/SymbolTable/lib b/macros/SymbolTable/lib
index a978ec5..2e93305 100644
--- a/macros/SymbolTable/lib
+++ b/macros/SymbolTable/lib
Binary files differ
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
index 1b0f5bd..45853ea 100644
--- a/macros/ToolInitialization/lib
+++ b/macros/ToolInitialization/lib
Binary files differ
diff --git a/macros/findDeps/lib b/macros/findDeps/lib
index 28e8369..acee5b0 100644
--- a/macros/findDeps/lib
+++ b/macros/findDeps/lib
Binary files differ
diff --git a/macros/lib b/macros/lib
index 54b3557..1917c3f 100644
--- a/macros/lib
+++ b/macros/lib
Binary files differ
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();
+
+}