diff options
author | imushir | 2016-02-22 14:18:24 +0530 |
---|---|---|
committer | imushir | 2016-02-22 14:18:24 +0530 |
commit | 53ba48050cb84aac181851b1426579e866d8d1dd (patch) | |
tree | d434e62f7b1ace342dd3a8d930461f7895107132 /2.3-1/macros | |
parent | 65ca99dd846281e3d1c3066697ad260df0d0909e (diff) | |
download | Scilab2C-53ba48050cb84aac181851b1426579e866d8d1dd.tar.gz Scilab2C-53ba48050cb84aac181851b1426579e866d8d1dd.tar.bz2 Scilab2C-53ba48050cb84aac181851b1426579e866d8d1dd.zip |
added support of double for linspace
Diffstat (limited to '2.3-1/macros')
-rw-r--r-- | 2.3-1/macros/FunctionAnnotation/FA_SZ_LINSPACE_ROW.sci | 4 | ||||
-rw-r--r-- | 2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci | 36 | ||||
-rw-r--r-- | 2.3-1/macros/findDeps/getAllHeaders.sci | 1 | ||||
-rw-r--r-- | 2.3-1/macros/findDeps/getAllInterfaces.sci | 1 | ||||
-rw-r--r-- | 2.3-1/macros/findDeps/getAllSources.sci | 2 |
5 files changed, 44 insertions, 0 deletions
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_LINSPACE_ROW.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_LINSPACE_ROW.sci new file mode 100644 index 00000000..986b5291 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_LINSPACE_ROW.sci @@ -0,0 +1,4 @@ +function outsize = FA_SZ_LINSPACE_ROW(insize) + in1num = string(eval(insize(1))); + outsize = in1num; +endfunction: diff --git a/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci b/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci index 1f07e4ad..2ad8b269 100644 --- a/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci +++ b/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci @@ -1074,6 +1074,39 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,E INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+// --------------------
+// --- Class linspace. ---
+// --------------------
+ClassName = 'linspace';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+PrintStringInfo('NIN= 3',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
+//PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_LINSPACE_ROW(IN(1).SZ)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(3).VAL',ClassFileName,'file','y');
+
+
+// ---Function List Class.----
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+
+PrintStringInfo('d0d0d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'linspace'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
//---------------------
//-----Class Rand.------
@@ -3702,6 +3735,7 @@ ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); PrintStringInfo('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
PrintStringInfo('c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+
PrintStringInfo('z0'+ArgSeparator+'z0',ClassFileName,'file','y');
PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
@@ -3847,6 +3881,7 @@ PrintStringInfo('OUT(1).TP= FA_TP_MAX(IN(1).TP,IN(2).TP)',ClassFileName,'file PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
PrintStringInfo('OUT(1).SZ(2)= IN(2).VAL',ClassFileName,'file','y');
PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+
PrintStringInfo('NOUT= 2',ClassFileName,'file','y');
PrintStringInfo('OUT(1).TP= FA_TP_MAX(IN(1).TP,IN(2).TP)',ClassFileName,'file','y');
PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
@@ -4806,6 +4841,7 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex // // For every sci2c function library class we reported
// // the domains , annotations only for the class-leader
+
// // Example [y1,y2]=Fun(x1,x2,x3) : scilab library function call
// // Domain RxNxSel->{R,R} :the first input element is real number ,the second is integer ,
diff --git a/2.3-1/macros/findDeps/getAllHeaders.sci b/2.3-1/macros/findDeps/getAllHeaders.sci index 3d67a663..27a67376 100644 --- a/2.3-1/macros/findDeps/getAllHeaders.sci +++ b/2.3-1/macros/findDeps/getAllHeaders.sci @@ -94,6 +94,7 @@ function allHeaders = getAllHeaders(Target) "src/c/elementaryFunctions/includes/bitcmp.h" "src/c/elementaryFunctions/includes/bitset.h" "src/c/elementaryFunctions/includes/bitget.h" + "src/c/elementaryFunctions/includes/linspace.h" "src/c/elementaryFunctions/includes/asinh.h" "src/c/elementaryFunctions/includes/atan2.h" "src/c/elementaryFunctions/includes/atanh.h" diff --git a/2.3-1/macros/findDeps/getAllInterfaces.sci b/2.3-1/macros/findDeps/getAllInterfaces.sci index b8cd6d38..8b60d7c1 100644 --- a/2.3-1/macros/findDeps/getAllInterfaces.sci +++ b/2.3-1/macros/findDeps/getAllInterfaces.sci @@ -84,6 +84,7 @@ function allInterfaces = getAllInterfaces(Target) "src/c/elementaryFunctions/interfaces/int_bitcmp.h" "src/c/elementaryFunctions/interfaces/int_bitset.h" "src/c/elementaryFunctions/interfaces/int_bitget.h" + "src/c/elementaryFunctions/interfaces/int_linspace.h" "src/c/elementaryFunctions/interfaces/int_cosh.h" "src/c/elementaryFunctions/interfaces/int_uint8.h" "src/c/elementaryFunctions/interfaces/int_int8.h" diff --git a/2.3-1/macros/findDeps/getAllSources.sci b/2.3-1/macros/findDeps/getAllSources.sci index 64a4e470..ab4f9a0e 100644 --- a/2.3-1/macros/findDeps/getAllSources.sci +++ b/2.3-1/macros/findDeps/getAllSources.sci @@ -620,6 +620,8 @@ function allSources = getAllSources(Target) "src/c/elementaryFunctions/bitset/u16bitsets.c" "src/c/elementaryFunctions/bitget/u8bitgets.c" "src/c/elementaryFunctions/bitget/u16bitgets.c" + "src/c/elementaryFunctions/linspace/dlinspaces.c" + "src/c/elementaryFunctions/linspace/dlinspacea.c" "src/c/statisticsFunctions/max/dmaxa.c" "src/c/statisticsFunctions/max/smaxa.c" "src/c/statisticsFunctions/max/srowmaxa.c" |