diff options
author | Abhinav Dronamraju | 2017-08-22 20:54:30 +0530 |
---|---|---|
committer | Abhinav Dronamraju | 2017-08-22 20:54:30 +0530 |
commit | 55c0e6c1c041d9d0215c6a192ed11476d49d593c (patch) | |
tree | 649540f50d8a524a140c8d82f279e4e87a83d281 /2.3-1/macros | |
parent | de496fd5c6183e2f5eba2b4688d2bcf18aef62a1 (diff) | |
download | Scilab2C-55c0e6c1c041d9d0215c6a192ed11476d49d593c.tar.gz Scilab2C-55c0e6c1c041d9d0215c6a192ed11476d49d593c.tar.bz2 Scilab2C-55c0e6c1c041d9d0215c6a192ed11476d49d593c.zip |
Faurre, kalm, Mvcorrel added
Diffstat (limited to '2.3-1/macros')
-rw-r--r-- | 2.3-1/macros/ASTManagement/AST2Ccode.sci | 9 | ||||
-rw-r--r-- | 2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci | 4 | ||||
-rw-r--r-- | 2.3-1/macros/FunctionAnnotation/FA_GetOutArgInfo.sci | 18 | ||||
-rw-r--r-- | 2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci | 104 | ||||
-rw-r--r-- | 2.3-1/macros/findDeps/getAllHeaders.sci | 3 | ||||
-rw-r--r-- | 2.3-1/macros/findDeps/getAllInterfaces.sci | 3 | ||||
-rw-r--r-- | 2.3-1/macros/findDeps/getAllSources.sci | 4 |
7 files changed, 125 insertions, 20 deletions
diff --git a/2.3-1/macros/ASTManagement/AST2Ccode.sci b/2.3-1/macros/ASTManagement/AST2Ccode.sci index 20aa999e..d44a3393 100644 --- a/2.3-1/macros/ASTManagement/AST2Ccode.sci +++ b/2.3-1/macros/ASTManagement/AST2Ccode.sci @@ -16,7 +16,6 @@ function AST2Ccode(FileInfoDatFile) // Copyright 2007 Raffaele Nutricato. // Contact: raffaele.nutricato@tiscali.it // ----------------------------------------------------------------- - // ------------------------------ // --- Check input arguments. --- // ------------------------------ @@ -75,7 +74,6 @@ FName = null ASTFileName = FileInfo.Funct(nxtscifunnumber).ASTFileName; - // ----------------------- // --- Initialization. --- // ----------------------- @@ -121,7 +119,6 @@ AST_PushASTStack('Dummy'); SharedInfo.UsedTempScalarVars = OrigUsedTempScalarVars; //NUT: put here a manageeol so that you can have all the save and load you want. SharedInfo.ASTReader.UsedTempVars = 0; - // ---------------------------------- // --- Main loop to read the AST. --- // ---------------------------------- @@ -137,7 +134,6 @@ while ~meof(fidAST) if STACKDEDUG == 1 disp('Read AST Line: '+treeline); end - // Analyze line. select treeline @@ -179,7 +175,6 @@ while ~meof(fidAST) end disp_isthere = 0; FName = null - case 'Equal' then SharedInfo.Equal.Enabled = 1; // 1 means enabled -> we are inside an equal AST block. AST_PushASTStack(treeline); @@ -218,7 +213,6 @@ while ~meof(fidAST) end AST_PushASTStack(treeline); end - // ---------------- // --- If/Else. --- // ---------------- @@ -237,7 +231,6 @@ while ~meof(fidAST) SharedInfo = C_IfElseBlocks(FileInfo,SharedInfo,'out'); end SharedInfo.CountNestedIf = 0; - // -------------- // --- Dummy. --- // -------------- @@ -254,7 +247,6 @@ while ~meof(fidAST) disp_isthere = 0; //NUT: per essere precisi si puo' pensare di mettere un check //NUT: alla fine dell'albero per accertarsi che c'e' end program li' dove ce lo aspettiamo - // ------------ // --- For. --- // ------------ @@ -316,7 +308,6 @@ SharedInfo.Function_list = SharedInfo.Function_list(1:SharedInfo.Function_list_i - // -------------------------------------- // --- End main loop to read the AST. --- // -------------------------------------- diff --git a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci index 79ec976c..455cd404 100644 --- a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci +++ b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci @@ -348,8 +348,8 @@ NOutArg_mod = NOutArg OutArg(1).FindLike = InArg(1).FindLike; OutArg(1).Scope = 'Number_d'; else - OutArg = FA_GetOutArgInfo(InArg,NInArg,OutArg,NOutArg,SharedInfo,FunPrecSpecifier,FunTypeAnnot,FunSizeAnnot,ReportFileName,ASTFunName); - end + OutArg = FA_GetOutArgInfo(InArg,NInArg,OutArg,NOutArg,SharedInfo,FunPrecSpecifier,FunTypeAnnot,FunSizeAnnot,ReportFileName,ASTFunName); +end // #RNU_RES_B // --- Generate the names for the output arguments. --- diff --git a/2.3-1/macros/FunctionAnnotation/FA_GetOutArgInfo.sci b/2.3-1/macros/FunctionAnnotation/FA_GetOutArgInfo.sci index 4d1113ea..284f4a29 100644 --- a/2.3-1/macros/FunctionAnnotation/FA_GetOutArgInfo.sci +++ b/2.3-1/macros/FunctionAnnotation/FA_GetOutArgInfo.sci @@ -95,15 +95,15 @@ for counterout = 1:NOutArg UpdatedOutArg(counterout).FindLike = -1;
end
- // #RNU_RES_B
- // When the size is given by e IN(x).VAL annotation we can have two cases:
- // IN(x).VAL is a number or IN(x).VAL is %nan. When it is %nan the
- // size is equal to the name of IN(x).
- // This is a dynamic memory extension of a local variable and for the moment
- // we issue an error according to SCI2C specifications
- // #RNU_RES_E
- //disp(FunSizeAnnot(2),FunSizeAnnot(1))
- //Ukasha
+// #RNU_RES_B
+// When the size is given by e IN(x).VAL annotation we can have two cases:
+// IN(x).VAL is a number or IN(x).VAL is %nan. When it is %nan the
+// size is equal to the name of IN(x).
+// This is a dynamic memory extension of a local variable and for the moment
+// we issue an error according to SCI2C specifications
+// #RNU_RES_E
+// disp(FunSizeAnnot(2),FunSizeAnnot(1))
+// Ukasha
// if ASTFunName == svd
// x=1;
// for i=1:InArg(1).Size(1)
diff --git a/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci b/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci index f46d1672..d1cfeff2 100644 --- a/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci +++ b/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci @@ -11119,6 +11119,110 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex //------------------------------------
+//---- Class KALM --------------------
+//------------------------------------
+ClassName = 'KALM';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+
+PrintStringInfo('NIN= 8',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 4',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(4).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(2).SZ(2)',ClassFileName,'file','y');
+
+PrintStringInfo('OUT(2).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= IN(4).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= IN(4).SZ(1)',ClassFileName,'file','y');
+
+PrintStringInfo('OUT(3).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).SZ(1)= IN(2).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).SZ(2)= IN(2).SZ(2)',ClassFileName,'file','y');
+
+PrintStringInfo('OUT(4).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(4).SZ(1)= IN(3).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(4).SZ(2)= IN(3).SZ(2)',ClassFileName,'file','y');
+
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d2d2d2d2d2d2d2d2'+ArgSeparator+'d2d2d2d2',ClassFileName,'file','y');
+PrintStringInfo('z2z2z2z2z2z2z2z2'+ArgSeparator+'z2z2z2z2',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'kalm';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class MVCORREL --------------------
+//------------------------------------
+ClassName = 'MVCORREL';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(2)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(2).SZ(2)',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'mvcorrel';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class FAURRE --------------------
+//------------------------------------
+ClassName = 'FAURRE';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+
+PrintStringInfo('NIN= 5',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 3',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(4).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(4).SZ(1)',ClassFileName,'file','y');
+
+PrintStringInfo('OUT(2).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= IN(5).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= IN(5).SZ(2)',ClassFileName,'file','y');
+
+PrintStringInfo('OUT(3).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).SZ(1)= IN(4).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).SZ(2)= IN(5).SZ(1)',ClassFileName,'file','y');
+
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d2d2d2d2'+ArgSeparator+'d2d2d2',ClassFileName,'file','y');
+PrintStringInfo('z0z2z2z2z2'+ArgSeparator+'z2z2z2',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'faurre';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
//---- Class CHEB1MAG --------------------
//------------------------------------
ClassName = 'CHEB1MAG';
diff --git a/2.3-1/macros/findDeps/getAllHeaders.sci b/2.3-1/macros/findDeps/getAllHeaders.sci index e4d7133e..2135dced 100644 --- a/2.3-1/macros/findDeps/getAllHeaders.sci +++ b/2.3-1/macros/findDeps/getAllHeaders.sci @@ -155,6 +155,7 @@ function allHeaders = getAllHeaders(SharedInfo) "src/c/statisticsFunctions/includes/sum.h" "src/c/statisticsFunctions/includes/mean.h" "src/c/statisticsFunctions/includes/median.h" + "src/c/statisticsFunctions/includes/mvcorrel.h" "src/c/statisticsFunctions/includes/nanmedian.h" "src/c/statisticsFunctions/includes/gsort.h" "src/c/statisticsFunctions/includes/nanstdev.h" @@ -201,6 +202,8 @@ function allHeaders = getAllHeaders(SharedInfo) "src/c/signalProcessing/includes/zpch1.h" "src/c/signalProcessing/includes/zpch2.h" "src/c/signalProcessing/includes/buttmag.h" + "src/c/signalProcessing/includes/kalm.h" + "src/c/signalProcessing/includes/faurre.h" "src/c/signalProcessing/includes/cheb1mag.h" "src/c/signalProcessing/includes/cheb2mag.h" "src/c/signalProcessing/includes/sincd.h" diff --git a/2.3-1/macros/findDeps/getAllInterfaces.sci b/2.3-1/macros/findDeps/getAllInterfaces.sci index 48028745..601d5255 100644 --- a/2.3-1/macros/findDeps/getAllInterfaces.sci +++ b/2.3-1/macros/findDeps/getAllInterfaces.sci @@ -144,6 +144,7 @@ function allInterfaces = getAllInterfaces(SharedInfo) "src/c/elementaryFunctions/interfaces/int_isinf.h" "src/c/statisticsFunctions/interfaces/int_mean.h" "src/c/statisticsFunctions/interfaces/int_median.h" + "src/c/statisticsFunctions/interfaces/int_mvcorrel.h" "src/c/statisticsFunctions/interfaces/int_nanmedian.h" "src/c/statisticsFunctions/interfaces/int_gsort.h" "src/c/statisticsFunctions/interfaces/int_nanstdev.h" @@ -199,6 +200,8 @@ function allInterfaces = getAllInterfaces(SharedInfo) "src/c/signalProcessing/interfaces/int_zpch1.h" "src/c/signalProcessing/interfaces/int_zpch2.h" "src/c/signalProcessing/interfaces/int_buttmag.h" + "src/c/signalProcessing/interfaces/int_kalm.h" + "src/c/signalProcessing/interfaces/int_faurre.h" "src/c/signalProcessing/interfaces/int_cheb1mag.h" "src/c/signalProcessing/interfaces/int_cheb2mag.h" "src/c/signalProcessing/interfaces/int_sincd.h" diff --git a/2.3-1/macros/findDeps/getAllSources.sci b/2.3-1/macros/findDeps/getAllSources.sci index 606139a7..6594a2e1 100644 --- a/2.3-1/macros/findDeps/getAllSources.sci +++ b/2.3-1/macros/findDeps/getAllSources.sci @@ -1017,6 +1017,7 @@ function allSources = getAllSources(SharedInfo,BuildTool) "src/c/statisticsFunctions/median/zmediana.c" "src/c/statisticsFunctions/median/zmediancola.c" "src/c/statisticsFunctions/median/zmedianrowa.c" + "src/c/statisticsFunctions/mvcorrel/dmvcorrela.c" "src/c/statisticsFunctions/stdev/dstdeva.c" "src/c/statisticsFunctions/stdev/dstdevrowa.c" "src/c/statisticsFunctions/stdev/dstdevcola.c" @@ -1330,6 +1331,9 @@ function allSources = getAllSources(SharedInfo,BuildTool) "src/c/signalProcessing/zpch1/dzpch1s.c" "src/c/signalProcessing/zpch2/dzpch2s.c" "src/c/signalProcessing/buttmag/dbuttmags.c" + "src/c/signalProcessing/kalm/dkalma.c" + "src/c/signalProcessing/kalm/zkalma.c" + "src/c/signalProcessing/faurre/dfaurrea.c" "src/c/signalProcessing/cheb1mag/dcheb1mags.c" "src/c/signalProcessing/cheb2mag/dcheb2mags.c" "src/c/signalProcessing/sincd/dsincds.c" |