ANTAREX API

Clava API

LARA API

LARA Common Language API

(.js)
laraImport("antarex.split.splitLoopAspects");

(.lara)
import antarex.split.splitLoopAspects;

Aspects

normalizeLoopsToBeSplitted

It normalized the loops annotated with the pragma named SPLITLOOP

The normal form is
for (i=lbound, i <= ubound, i++) { .... }

Currently, it does not transform anything. Not yet implemented.
to the normal form.


Outputs

modified: any
allNormalized: any
found: any

splitLoop_Declarations

The interface (external references) of the loops to split is computed.
These symbols are managed as global variables of the application: new symbols are used for that.
The new symbols will be used in the extracted phasis of code to declared them as external symbols.



splitLoop_ExtractCode

Extract the code of the loops to be splitted.
For such a loop, it creates a new function(or method) in a new file
with lower and upper bounds as parameters.
The original code then is replaced by a set of calls, depending on the number of parts specified in
the pragma. The pragma is then removed from the code.



splitLoops

Split the loops annotated with the pragma named SPLITLOOP.
#pragma SPLITLOOP NBPARTS

where NBPARTS is the number of parts.

It calls the following aspects:
- normalizeLoopsToBeSplitted(): normalize of the loops to split.
- splitLoop_Declarations(): synthetize the interface of the loops.
- splitLoop_ExtractCode(): extract the code in new files.

and it also generates the algorithm required to select the best choice (function generateBestChoiceCode())

Example:
#pragma SPLITLOOP 3
for (i=vmin, i <= vmax, i++) { .... }



splitLoops_finalize

Finalize the components of the split compilation.



splitLoops_initialize

Initialize the components of the split compilation.