diff options
author | Abhinav Dronamraju | 2017-08-22 20:54:30 +0530 |
---|---|---|
committer | Abhinav Dronamraju | 2017-08-22 20:54:30 +0530 |
commit | fe525aa0b13baa3113ec22fe4f2d373db6e093d8 (patch) | |
tree | e879b5c3483c0d6b2405fc001b065f5b8c3bf182 /macros | |
parent | 5b728d8239b1a1f4467e2485d54c7ed7db1d4f11 (diff) | |
download | Scilab2C_fossee_old-fe525aa0b13baa3113ec22fe4f2d373db6e093d8.tar.gz Scilab2C_fossee_old-fe525aa0b13baa3113ec22fe4f2d373db6e093d8.tar.bz2 Scilab2C_fossee_old-fe525aa0b13baa3113ec22fe4f2d373db6e093d8.zip |
Faurre, kalm, Mvcorrel added
Diffstat (limited to 'macros')
-rw-r--r-- | macros/ASTManagement/AST2Ccode.sci | 9 | ||||
-rw-r--r-- | macros/ASTManagement/AST_HandleEndGenFun.sci | 4 | ||||
-rw-r--r-- | macros/FunctionAnnotation/FA_GetOutArgInfo.sci | 18 | ||||
-rw-r--r-- | macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci | 104 | ||||
-rw-r--r-- | macros/findDeps/getAllHeaders.sci | 3 | ||||
-rw-r--r-- | macros/findDeps/getAllInterfaces.sci | 3 | ||||
-rw-r--r-- | macros/findDeps/getAllSources.sci | 4 |
7 files changed, 125 insertions, 20 deletions
diff --git a/macros/ASTManagement/AST2Ccode.sci b/macros/ASTManagement/AST2Ccode.sci index 20aa999..d44a339 100644 --- a/macros/ASTManagement/AST2Ccode.sci +++ b/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/macros/ASTManagement/AST_HandleEndGenFun.sci b/macros/ASTManagement/AST_HandleEndGenFun.sci index 79ec976..455cd40 100644 --- a/macros/ASTManagement/AST_HandleEndGenFun.sci +++ b/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/macros/FunctionAnnotation/FA_GetOutArgInfo.sci b/macros/FunctionAnnotation/FA_GetOutArgInfo.sci index 4d1113e..284f4a2 100644 --- a/macros/FunctionAnnotation/FA_GetOutArgInfo.sci +++ b/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/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci index f46d167..d1cfeff 100644 --- a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci +++ b/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/macros/findDeps/getAllHeaders.sci b/macros/findDeps/getAllHeaders.sci index e4d7133..2135dce 100644 --- a/macros/findDeps/getAllHeaders.sci +++ b/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/macros/findDeps/getAllInterfaces.sci b/macros/findDeps/getAllInterfaces.sci index 4802874..601d525 100644 --- a/macros/findDeps/getAllInterfaces.sci +++ b/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/macros/findDeps/getAllSources.sci b/macros/findDeps/getAllSources.sci index 606139a..6594a2e 100644 --- a/macros/findDeps/getAllSources.sci +++ b/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" |