From fa80f7480be93230d6d129329a3df9d375672ce8 Mon Sep 17 00:00:00 2001 From: nutricato Date: Thu, 19 Apr 2007 09:52:33 +0000 Subject: --- src/Scilab2C/FunctionTableManagement/AddBranch.sci | 1 - .../AddElementaryFunction.sci | 4 +- src/Scilab2C/FunctionTableManagement/Example.sce | 347 --------------------- .../GenerateLeafElementary.sci | 9 - .../GenerateLeafElementary.sci.bak | 86 ----- .../FunctionTableManagement/GenerateLibTrees.sci | 34 ++ .../FunctionTableManagement/GetCFunCall.sci | 7 - .../InitializeLibraryTrees.sci | 179 +++++++++++ 8 files changed, 214 insertions(+), 453 deletions(-) delete mode 100644 src/Scilab2C/FunctionTableManagement/Example.sce delete mode 100644 src/Scilab2C/FunctionTableManagement/GenerateLeafElementary.sci.bak create mode 100644 src/Scilab2C/FunctionTableManagement/GenerateLibTrees.sci create mode 100644 src/Scilab2C/FunctionTableManagement/InitializeLibraryTrees.sci diff --git a/src/Scilab2C/FunctionTableManagement/AddBranch.sci b/src/Scilab2C/FunctionTableManagement/AddBranch.sci index 9b870677..bd4717c1 100644 --- a/src/Scilab2C/FunctionTableManagement/AddBranch.sci +++ b/src/Scilab2C/FunctionTableManagement/AddBranch.sci @@ -11,7 +11,6 @@ function TreeBase = AddBranch(TreeBase, Branch, CINFO) // // b. if "fn" doesn't exist, we can store the whole Branch - getf("SearchFunctionName.sci"); // // I have to search the point where to insert the (sub) branch diff --git a/src/Scilab2C/FunctionTableManagement/AddElementaryFunction.sci b/src/Scilab2C/FunctionTableManagement/AddElementaryFunction.sci index 3507ad0d..4851ba66 100644 --- a/src/Scilab2C/FunctionTableManagement/AddElementaryFunction.sci +++ b/src/Scilab2C/FunctionTableManagement/AddElementaryFunction.sci @@ -3,9 +3,7 @@ function TreeOut = AddElementaryFunction(FunctionName,TreeIn) // tree (TreeIn) to which the elementary function "FunctionName" has // been added. -getf("GenerateLeafElementary.sci"); - -disp([' --> Adding the elementary function: ',FunctionName]); +disp(' --> Adding the elementary function: '+FunctionName); [FuncStruct, CINFO, NumFunc] = GenerateLeafElementary(FunctionName); TreeOut = TreeIn; diff --git a/src/Scilab2C/FunctionTableManagement/Example.sce b/src/Scilab2C/FunctionTableManagement/Example.sce deleted file mode 100644 index 114544aa..00000000 --- a/src/Scilab2C/FunctionTableManagement/Example.sce +++ /dev/null @@ -1,347 +0,0 @@ -// In this script you can find some examples that show how to work with the -// SCI2C and USER libraries. - -// Run the following code lines in the directory where the main.sci file is stored. -// cd - -clear; -clc; -mode(0); -getf("InitializeLibraries.sci"); -getf("GetCFunCall.sci"); -[SCI2CLib, USER2CLib] = InitializeLibraries(); - -save('SCI2CLib.dat',SCI2CLib); -save('USER2CLib.dat',USER2CLib); - -disp("Scalar Version:") -FunName = "cos"; -InArg.Name="inscalar"; -InArg.Type="z"; -InArg.Size=[1,1]; -OutArg.Name = "outscalar"; -CFunCall = GetCFunCall(FunName,InArg,OutArg); -disp(CFunCall) -disp(" ") -disp(" ") - -disp("Array Version:") -FunName = "sin"; -InArg.Name="inmtx"; -InArg.Type="s"; -InArg.Size=[10,7]; -OutArg.Name = "outmtx"; -CFunCall = GetCFunCall(FunName,InArg,OutArg); -disp(CFunCall) -disp(" ") -disp(" ") - - - - -// Let's consider the following example - -// ************************************** -// The input function to be traslated is: -// -------------------------------------- -// function y=foo(x) - -// y = sin(cos(x)); - -// endfunction -// -------------------------------------- - -// ************************************** -// The corresponding AST is: -// -------------------------------------- -// Equal -// Expression: -// Funcall : sin -// #lhs : 1 -// Rhs : -// Funcall : cos -// #lhs : 1 -// Rhs : -// x -// EndFuncall -// EndFuncall -// Lhs : -// y -// EndEqual - -// ************************************** -// The AST reader generates the following User-readable Intermediate Representation: -// -------------------------------------- -// __temp1 = cos(x); -// __temp2 = sin(__temp1); -// y = __temp2; - -// ************************************** -// The AST reader generates also the following internal Intermediate Representation: -// -------------------------------------- -FunName = "cos"; -InArg.Name="x"; -InArg.Type="s"; // This parameter is retrieved from annotations. -InArg.Size=[10,7]; // This parameter is retrieved from annotations. -OutArg.Number = 1; -OutArg.Name = "__temp1"; -CFunCall = GetCFunCall(FunName,InArg,OutArg); -disp(CFunCall) -disp(" ") -disp(" ") - -FunName = "sin"; -InArg.Name="__temp1"; -InArg.Type="s"; // This parameter is retrieved from annotations. -InArg.Size=[10,7]; // This parameter is retrieved from annotations. -OutArg.Number = 1; -OutArg.Name = "__temp2"; -CFunCall = GetCFunCall(FunName,InArg,OutArg); -disp(CFunCall) -disp(" ") -disp(" ") - - - - - -adf - -// Test Scalar Function -clear In1 -clear Out1 -In1.Name = "inscalar"; -disp("Scalar Version:") -disp([SCI2CLib.cos.S.C.D.CINFO.NAME,"(",eval(SCI2CLib.cos.S.C.D.CINFO.ARGLIST),")"]) -disp(" ") -disp(" ") - -// Test Array Function -clear In1 -clear Out1 -In1.Name = "inarray"; -In1.Size = [10,7]; -Out1.Name = "outarray"; -disp("Array Version:") -disp([SCI2CLib.sin.A.C.D.CINFO.NAME,"(",eval(SCI2CLib.sin.A.C.D.CINFO.ARGLIST),")"]) - - - - -disp(" ") -disp(" ") -disp(" ") -disp(" ") - -stoppami - - - - - - - - - - - - - - - - - - - - - - -// ------------------ -// --- Example 1. --- -// ------------------ -// In this example it is shown how to get the -// C function info from a given Scilab function. -// The user prepares a string (FunctionStructure) where -// all the Scilab function info are stored. -// Let's consider the following example: -// Scilab function: tan -// Input size: scalar (S) -// Input type: real (R) -// Input precision: double (D) -// In this case the user prepares the following string: -FunctionStructure = "tan.S.R.D.CINFO"; -// And executes the following command: -getf("SearchFunctionName.sci"); -[Cprototype, FlagFind] = SearchFunctionName(FunctionStructure, "SCI2CLib"); - - -// ------------------ -// --- Example 2. --- -// ------------------ -// In this example it is shown what happens when -// the user searches for a function that is not -// stored neither in the SCI2CLib nor in the USER2CLib. -// Let's suppose that the user is searching for the -// foo function having two inputs: -FunctionStructure = "foo.S.R.D.S.R.D.CINFO"; - -// In this case if the user launches the following command: -// getf("SearchFunctionName.sci"); -// [Cprototype, FlagFind] = SearchFunctionName(FunctionStructure, "SCI2CLib"); -// he/she will get FlagFind = F! - -// The problem is solved in the following way: - -[Cprototype, FlagFind] = SearchFunctionName(FunctionStructure, "SCI2CLib"); -if FlagFind==%F then - // We try to search the function in the USER2CLib. - [Cprototype, FlagFind] = SearchFunctionName(FunctionStructure, "USER2CLib"); - - if FlagFind==%F then - // If the function is not stored in the USER2CLib function, - // the tool will search for the file containing the function and will - // try to extract from that file the following info: - // CINFO.SIZE, CINFO.TYPE, CINFO.PREC - - // Suppose the following CINFO have been retrieved: - // CINFO.SIZE = "S"; - // CINFO.TYPE = "R"; - // CINFO.PREC = "D"; - - // Once CINFO have been retrieved it is possible to insert the new function - // into the USER2CLib by using the following approach: - clear CINFO; - CINFO.CPROT = "y=SRDSRDfooSRD"; - CINFO.SIZE = "S"; - CINFO.TYPE = "R"; - CINFO.PREC = "D"; - - USER2CLib = AddBranch( USER2CLib, FunctionStructure, CINFO ); - [Cprototype, FlagFind] = SearchFunctionName(FunctionStructure, "USER2CLib"); - end -end -// eval("USER2CLib." + FunctionStructure); - - - - - - - - - - - - - - -// -// now I change one output type -// -// Branch=FunctionStructure; -// TREE="USER2CLib"; -// - getf("SearchFunctionName.sci"); - getf("AddBranch.sci"); - - FunctionStructure = "fn.S.R.D.CINFO"; - - clear CINFO; - - CINFO.CPROT = "y=SRDfnSRD"; - CINFO.SIZE = "S"; - CINFO.TYPE = "R"; - CINFO.PREC = "D"; - - - [Cprototype, FlagFind] = SearchFunctionName(FunctionStructure, "SCI2CLib"); - - if FlagFind==%F then - [Cprototype, FlagFind] = SearchFunctionName(FunctionStructure, "USER2CLib"); - - if FlagFind==%F then - USER2CLib = AddBranch( USER2CLib, FunctionStructure, CINFO ); - end - - end - - eval("USER2CLib." + FunctionStructure) - -// -// I add the same function with two outputs: -// 1. the first output is S.R.D -// 2. the second output is A.R.D. -// -// Branch=FunctionStructure; -// TREE="USER2CLib"; -// - FunctionStructure = "fn.S.R.D.CINFO(2)"; - - clear CINFO; - - S(1) = "S"; - R(1) = "R"; - D(1) = "D"; - - S(2) = "M"; - R(2) = "R"; - D(2) = "D"; - - CINFO.CPROT = "y=SRDfnSRDSRD"; - CINFO.SIZE = S; - CINFO.TYPE = R; - CINFO.PREC = D; - - - [Cprototype, FlagFind] = SearchFunctionName(FunctionStructure, "SCI2CLib"); - - if FlagFind==%F then - [Cprototype, FlagFind] = SearchFunctionName(FunctionStructure, "USER2CLib"); - - if FlagFind==%F then - USER2CLib = AddBranch( USER2CLib, FunctionStructure, CINFO ); - end - - end - - eval("USER2CLib." + FunctionStructure) - -// -// fn.S.R.F.CINFO -// -// where -// -// CINFO. -// CPRO = "y=SRFfnSRF(x)" -// SIZE = "S" -// TYPE = "R" -// PREC = "F" - -// Branch=FunctionStructure; -// TREE="USER2CLib"; - - getf("SearchFunctionName.sci"); - getf("AddBranch.sci"); - - FunctionStructure = "fn.S.R.F.CINFO"; - - CINFO(1).CPROT = "y=SRFfnSRF"; - CINFO(1).SIZE = "S"; - CINFO(1).TYPE = "R"; - CINFO(1).PREC = "F"; - - [Cprototype, FlagFind] = SearchFunctionName(FunctionStructure, "SCI2CLib"); - - if FlagFind==%F then - [Cprototype, FlagFind] = SearchFunctionName(FunctionStructure, "USER2CLib"); - - if FlagFind==%F then - - USER2CLib = AddBranch(USER2CLib, FunctionStructure, CINFO ); - - end - - end - - eval("USER2CLib." + FunctionStructure) - diff --git a/src/Scilab2C/FunctionTableManagement/GenerateLeafElementary.sci b/src/Scilab2C/FunctionTableManagement/GenerateLeafElementary.sci index f7365094..acfbf1d5 100644 --- a/src/Scilab2C/FunctionTableManagement/GenerateLeafElementary.sci +++ b/src/Scilab2C/FunctionTableManagement/GenerateLeafElementary.sci @@ -20,15 +20,6 @@ function [FuncStruct, CINFO, NumFunc] = GenerateLeafElementary(FunctionName); // 09-Apr-2006 -- Nutricato Raffaele: Tests + Minor changes. // ----------------------------------------------------------------- -// ------------ -// --- getf --- -// ------------ -getf("CinfoI1SO1S.sci"); -getf("CinfoI1AO1A.sci"); -// ---------------- -// --- End getf --- -// ---------------- - // Combinations for the elementary functions: // 1: S,R,F // 2: S,R,D diff --git a/src/Scilab2C/FunctionTableManagement/GenerateLeafElementary.sci.bak b/src/Scilab2C/FunctionTableManagement/GenerateLeafElementary.sci.bak deleted file mode 100644 index f9c39345..00000000 --- a/src/Scilab2C/FunctionTableManagement/GenerateLeafElementary.sci.bak +++ /dev/null @@ -1,86 +0,0 @@ -function [FuncStruct, CINFO, NumFunc] = GenerateLeafElementary(FunctionName) -// This function generates the leaf for the -// "FunctionName" elementary function. - -NumFunc = 0; - -NumFunc = NumFunc + 1; - -FuncStruct(NumFunc) = FunctionName + ".S.R.F.CINFO"; -CINFO(NumFunc).CPROT = "y=SRF" + FunctionName + "SRF(x)"; -CINFO(NumFunc).SIZE = "S"; -CINFO(NumFunc).TYPE = "R"; -CINFO(NumFunc).PREC = "F"; -CINFO(NumFunc).DIM = "O1Sz = I1Sz"; -CINFO(NumFunc).NOut = 1; - -NumFunc = NumFunc + 1; - -FuncStruct(NumFunc) = FunctionName + ".S.R.D.CINFO"; -CINFO(NumFunc).CPROT = "y=SRD" + FunctionName + "SRD(x)"; -CINFO(NumFunc).SIZE = "S"; -CINFO(NumFunc).TYPE = "R"; -CINFO(NumFunc).PREC = "D"; -CINFO(NumFunc).DIM = "O1Sz = I1Sz"; -CINFO(NumFunc).NOut = 1; - -NumFunc = NumFunc + 1; - -FuncStruct(NumFunc) = FunctionName + ".S.C.F.CINFO"; -CINFO(NumFunc).CPROT = "y=SCF" + FunctionName + "SCF(x)"; -CINFO(NumFunc).SIZE = "S"; -CINFO(NumFunc).TYPE = "C"; -CINFO(NumFunc).PREC = "F"; -CINFO(NumFunc).DIM = "O1Sz = I1Sz"; -CINFO(NumFunc).NOut = 1; - -NumFunc = NumFunc + 1; - -FuncStruct(NumFunc) = FunctionName + ".S.C.D.CINFO"; -CINFO(NumFunc).CPROT = "y=SCD" + FunctionName + "SCD(x)"; -CINFO(NumFunc).SIZE = "S"; -CINFO(NumFunc).TYPE = "C"; -CINFO(NumFunc).PREC = "D"; -CINFO(NumFunc).DIM = "O1Sz = I1Sz"; -CINFO(NumFunc).NOut = 1; - -NumFunc = NumFunc + 1; - -FuncStruct(NumFunc) = FunctionName + ".M.R.F.CINFO"; -CINFO(NumFunc).CPROT = "MRF" + FunctionName + "MRF(*X, strideX, *Y, strideY, Nelements)"; -CINFO(NumFunc).SIZE = "M"; -CINFO(NumFunc).TYPE = "R"; -CINFO(NumFunc).PREC = "F"; -CINFO(NumFunc).DIM = "O1Sz = I1Sz"; -CINFO(NumFunc).NOut = 1; - -NumFunc = NumFunc + 1; - -FuncStruct(NumFunc) = FunctionName + ".M.R.D.CINFO"; -CINFO(NumFunc).CPROT = "MRD" + FunctionName + "MRD(*X, strideX, *Y, strideY, Nelements)"; -CINFO(NumFunc).SIZE = "M"; -CINFO(NumFunc).TYPE = "R"; -CINFO(NumFunc).PREC = "D"; -CINFO(NumFunc).DIM = "O1Sz = I1Sz"; -CINFO(NumFunc).NOut = 1; - -NumFunc = NumFunc + 1; - -FuncStruct(NumFunc) = FunctionName + ".M.C.F.CINFO"; -CINFO(NumFunc).CPROT = "MCF" + FunctionName + "MCF(*X, strideX, *Y, strideY, Nelements)"; -CINFO(NumFunc).SIZE = "M"; -CINFO(NumFunc).TYPE = "C"; -CINFO(NumFunc).PREC = "F"; -CINFO(NumFunc).DIM = "O1Sz = I1Sz"; -CINFO(NumFunc).NOut = 1; - -NumFunc = NumFunc + 1; - -FuncStruct(NumFunc) = FunctionName + ".M.C.D.CINFO"; -CINFO(NumFunc).CPROT = "MCD" + FunctionName + "MCD(*X, strideX, *Y, strideY, Nelements)"; -CINFO(NumFunc).SIZE = "M"; -CINFO(NumFunc).TYPE = "C"; -CINFO(NumFunc).PREC = "D"; -CINFO(NumFunc).DIM = "O1Sz = I1Sz"; -CINFO(NumFunc).NOut = 1; -endfunction diff --git a/src/Scilab2C/FunctionTableManagement/GenerateLibTrees.sci b/src/Scilab2C/FunctionTableManagement/GenerateLibTrees.sci new file mode 100644 index 00000000..0ccd9f43 --- /dev/null +++ b/src/Scilab2C/FunctionTableManagement/GenerateLibTrees.sci @@ -0,0 +1,34 @@ +function GenerateLibTrees(FileInfoDatFile,SharedInfoDatFile); +// function GenerateLibTrees(FileInfoDatFile,SharedInfoDatFile); +// ----------------------------------------------------------------- +// This function generates the SCI2C and USER2C library trees. +// Library trees contain detailed information of the DSP functions +// (SCI2C) and the user defined functions (USER2C). +// Notice that this function performs just an intialization of +// USER2C library tree. The insertion of the information of the +// user defined functions will be performed later. +// +// Input data: +// FileInfoDatFile: name of the .dat file containing the FileInfo structure. +// SharedInfoDatFile: it is a buffer containing parameters that are exchanged by the +// functions of the SCI2C tool. +// +// Output data: +// +// Status: +// 11-Apr-2007 -- Nutricato Raffaele: Author. +// ----------------------------------------------------------------- + +[SCI2CLibTree, USER2CLibTree] = InitializeLibraryTrees(FileInfoDatFile); + +load(FileInfoDatFile,'FileInfo'); + +PrintStringInfo('Saving the SCI2C Library Tree in file '+FileInfo.SCI2CLibTreeFileName,... + FileInfo.GeneralReport,'both','y'); +save(FileInfo.SCI2CLibTreeFileName,SCI2CLibTree); + +PrintStringInfo('Saving the USER2C Library Tree in file '+FileInfo.USER2CLibTreeFileName,... + FileInfo.GeneralReport,'both','y'); +save(FileInfo.USER2CLibTreeFileName,USER2CLibTree); + +endfunction diff --git a/src/Scilab2C/FunctionTableManagement/GetCFunCall.sci b/src/Scilab2C/FunctionTableManagement/GetCFunCall.sci index 2535e4ad..d95c7493 100644 --- a/src/Scilab2C/FunctionTableManagement/GetCFunCall.sci +++ b/src/Scilab2C/FunctionTableManagement/GetCFunCall.sci @@ -7,13 +7,6 @@ function CFunCall = GetCFunCall(FunTree,FunName,InArg,OutArg); // 06-Apr-2006 -- Nutricato Raffaele: Author. // ----------------------------------------------------------------- -// ------------ -// --- getf --- -// ------------ -// ---------------- -// --- End getf --- -// ---------------- - NInputs = size(InArg,1); NOutputs = size(OutArg,1); diff --git a/src/Scilab2C/FunctionTableManagement/InitializeLibraryTrees.sci b/src/Scilab2C/FunctionTableManagement/InitializeLibraryTrees.sci new file mode 100644 index 00000000..3178e57d --- /dev/null +++ b/src/Scilab2C/FunctionTableManagement/InitializeLibraryTrees.sci @@ -0,0 +1,179 @@ +function [SCI2CLib, USER2CLib] = InitializeLibraryTrees(FileInfoDatFile) +// ----------------------------------------------------------------- +// This function initializes the SCI2C and USER library trees. +// For each Scilab function a set of specialized C functions are inserted into +// the corresponding tree. +// For each C function a CINFO leaf is insterted into the tree. +// The CINFO leaf is a structure with many fields each of them +// containing information on the input and output arguments of the function. +// Dim is the expression that returns the size of the output(s) +// Example: +// Let's consider the sin function +// and a scalar input variable (I1Sz = 1) +// It is possible to get the size of the output argument by using +// the Dim field: Dim = "O1Sz = I1Sz" +// and the following Scilab command: +// eval(Dim); +// +// NOut is the number of the output(s). +// +// Input data: +// FileInfoDatFile: name of the .dat file containing the FileInfo structure. +// +// Output data: +// +// Status: +// 12-Apr-2007 -- Intelligente Fabio: Author. +// ----------------------------------------------------------------- + +clear + +// Implement the SCI2C library tree as a tlist. +SCI2CLib = tlist(["SCI2CLib"]); + +// Implement the USER libary tree as a tlist. +USER2CLib = tlist(["USER2CLib"]); + +// --------------------------------------------------------------- +// --- Add the elementary functions to the SCI2C library tree. --- +// --------------------------------------------------------------- +disp('--> Adding the elementary functions to the SCI2C library tree.'); + +SCI2CLib = AddElementaryFunction("sin",SCI2CLib); +SCI2CLib = AddElementaryFunction("cos",SCI2CLib); +// SCI2CLib = AddElementaryFunction("tan",SCI2CLib); +// SCI2CLib = AddElementaryFunction("cotg",SCI2CLib); +// SCI2CLib = AddElementaryFunction("asin",SCI2CLib); +// SCI2CLib = AddElementaryFunction("acos",SCI2CLib); +// SCI2CLib = AddElementaryFunction("sinh",SCI2CLib); +// SCI2CLib = AddElementaryFunction("cosh",SCI2CLib); +// SCI2CLib = AddElementaryFunction("tanh",SCI2CLib); +// SCI2CLib = AddElementaryFunction("asinh",SCI2CLib); +// SCI2CLib = AddElementaryFunction("acosh",SCI2CLib); +// SCI2CLib = AddElementaryFunction("atanh",SCI2CLib); +// SCI2CLib = AddElementaryFunction("exp",SCI2CLib); +// SCI2CLib = AddElementaryFunction("log",SCI2CLib); +// SCI2CLib = AddElementaryFunction("log10",SCI2CLib); +// SCI2CLib = AddElementaryFunction("abs",SCI2CLib); +// SCI2CLib = AddElementaryFunction("inv",SCI2CLib); +// SCI2CLib = AddElementaryFunction("sqrtR",SCI2CLib); +// ------------------------------------------------------------------- +// --- End add the elementary functions to the SCI2C library tree. --- +// ------------------------------------------------------------------- + + + + + +if (1==2) +// determinant function + + + [FuncStruct, CINFO, NumFunc] = AddLeafDet("det"); + + for ind = 1 : NumFunc, + SCI2CLib = AddBranch(SCI2CLib, FuncStruct(ind), CINFO(ind) ); + end + +// sqrt function + + + [FuncStruct, CINFO, NumFunc] = AddLeafSqrt("sqrt"); + + for ind = 1 : NumFunc, + SCI2CLib = AddBranch(SCI2CLib, FuncStruct(ind), CINFO(ind) ); + end + +// I add the function with 2 Input + +// dot function + + + [FuncStruct, CINFO, NumFunc] = AddLeafDotOp("DotAdd"); + + for ind = 1 : NumFunc, + SCI2CLib = AddBranch(SCI2CLib, FuncStruct(ind), CINFO(ind) ); + end + + [FuncStruct, CINFO, NumFunc] = AddLeafDotOp("DotSub"); + + for ind = 1 : NumFunc, + SCI2CLib = AddBranch(SCI2CLib, FuncStruct(ind), CINFO(ind) ); + end + + [FuncStruct, CINFO, NumFunc] = AddLeafDotOp("DotMul"); + + for ind = 1 : NumFunc, + SCI2CLib = AddBranch(SCI2CLib, FuncStruct(ind), CINFO(ind) ); + end + + [FuncStruct, CINFO, NumFunc] = AddLeafDotOp("DotDiv"); + + for ind = 1 : NumFunc, + SCI2CLib = AddBranch(SCI2CLib, FuncStruct(ind), CINFO(ind) ); + end + +// op function + + [FuncStruct, CINFO, NumFunc] = AddLeafDotOp("OpAdd"); + + for ind = 1 : NumFunc, + SCI2CLib = AddBranch(SCI2CLib, FuncStruct(ind), CINFO(ind) ); + end + + [FuncStruct, CINFO, NumFunc] = AddLeafDotOp("OpSub"); + + for ind = 1 : NumFunc, + SCI2CLib = AddBranch(SCI2CLib, FuncStruct(ind), CINFO(ind) ); + end + + [FuncStruct, CINFO, NumFunc] = AddLeafDotOp("OpMul"); + + for ind = 1 : NumFunc, + SCI2CLib = AddBranch(SCI2CLib, FuncStruct(ind), CINFO(ind) ); + end + + [FuncStruct, CINFO, NumFunc] = AddLeafDotOp("OpDiv"); + + for ind = 1 : NumFunc, + SCI2CLib = AddBranch(SCI2CLib, FuncStruct(ind), CINFO(ind) ); + end + +// atan function + + + [FuncStruct, CINFO, NumFunc] = AddLeafAtan("atan"); + + for ind = 1 : NumFunc, + SCI2CLib = AddBranch(SCI2CLib, FuncStruct(ind), CINFO(ind) ); + end + +// convol function + + + [FuncStruct, CINFO, NumFunc] = AddLeafConvol("convol"); + + for ind = 1 : NumFunc, + SCI2CLib = AddBranch(SCI2CLib, FuncStruct(ind), CINFO(ind) ); + end + +// fft function + + + [FuncStruct, CINFO, NumFunc] = AddLeafFFT("fft"); + + for ind = 1 : NumFunc, + SCI2CLib = AddBranch(SCI2CLib, FuncStruct(ind), CINFO(ind) ); + end + +// ifft function + + + [FuncStruct, CINFO, NumFunc] = AddLeafIFFT("ifft"); + + for ind = 1 : NumFunc, + SCI2CLib = AddBranch(SCI2CLib, FuncStruct(ind), CINFO(ind) ); + end +end // end if (1==2) + +endfunction -- cgit