ANTAREX API

Clava API

LARA API

LARA Common Language API

(.js)
laraImport("antarex.memoi.MemoizationC");

(.lara)
import antarex.memoi.MemoizationC;

Aspects

C_UpdateCallMemoization

This aspect adds the declaration of the header of the wrapper
in the files of the applications that reference a memoized function (cfunc).


Inputs

cfunc:: string - name of a memoized function.
cfunc: any

Memoize_Function

Memoizes a C user function with default arguments.


Inputs

(func): any - the name of the C function to memoize It calls Memoize_Function_ARGS(cfunc, 'none', 'no', 'none','no', 0, DEFAULT_TABSIZE); For more details, see Memoize_Function_ARGS. For a function of math.h, use Memoize_MathFunction.
cfunc: any

Memoize_Function_ARGS

Memoizes a C function with arguments.


Inputs

cfunc:: string - the name of the function to memoize.
fileToLoad:: string - the name of the file to load to initialse the internal table, or none.
FullOffLine:: string - yes or no. yes implies a full off lime memoization (requires a fileToLoad).
FileToSave:: string - the name of the file to save the data of the table, or none.
AlwaysReplace:: string - yes or no. yes implis that in case of collisions, the table is updated.
precision:: int - the number of bit to delete (float/double) for internal approximation, 0 for int.
tsize:: int - the size of the table. First, it searches the existence of such a function in the application. In case of success, it controls that parameters and the type of the arguments are conformed with the INRIA memoization library. Then, it adds (function GenCode_C_Memoization) the informations, required for generating the memoization library, in a file called "funs-static.def". Finally, it updates the user code by replacing a reference to the memoized method by a reference to the wrapper function.
cfunc: any
fileToLoad: any
FullOffLine: any
FileToSave: any
AlwaysReplace: any
precision: any
tsize: any