(.js)
laraImport("antarex.split.splitLoopFuncs");
(.lara)
import antarex.split.splitLoopFuncs;
Global Functions
AddGlobalDecls
AddGlobalDecls($theLoop, $nbLibs, $refParams)
Parameters
$theLoop: any
$nbLibs: any
$refParams: any
declareLoopAsNewFunctionOrMethod
declareLoopAsNewFunctionOrMethod($theLoop, $referencedParameters)
Parameters
$theLoop: any
$referencedParameters: any
genLoaderLib
genLoaderLib($vFunction, $nbLibs, $refParams)
Parameters
$vFunction: any
$nbLibs: any
$refParams: any
generateBestChoiceCode
generateBestChoiceCode()
Generate the code of the function that selects the best choice.
getBestId
getBestId()
Returns
any - the name of the variable used to store the choice of the selected fragment. The name is the concatenation of $CURRENT_ID_SPLITTEDLOOP with "_best".
getCurrentCpt
getCurrentCpt()
Returns
any - the name of the array used to store the time execution of the fragments. The name is the concatenation of $CURRENT_ID_SPLITTEDLOOP with "_cpt".
getCurrentLoadLibrary
getCurrentLoadLibrary()
Returns
any - the name of function used for loading the associated library of the current splitted loop. The name is the concatenation of $CURRENT_ID_SPLITTEDLOOP with "_load".
getCurrentSplittedFileName
getCurrentSplittedFileName()
Returns
any - the name of current splitted loop. The name is the concatenation of $CURRENT_ID_SPLITTEDLOOP with "_code.cpp".
getCurrentSplittedLoopName
getCurrentSplittedLoopName()
Returns
any - the name assigned to the current splitted name, fixed by the last call to mkNewSplittedLoopName() function.
getFunctionBestId
getFunctionBestId()
Returns
any - the name of the function to call for the selection of the best choice. This function is generated is the weaved code.
getLearning
getLearning()
Returns
any - the name of the variable used to manage the execution of the different fragment is a learning step. The name is the concatenation of $CURRENT_ID_SPLITTEDLOOP with "_LEARNING".
getNbIterations
getNbIterations(lbound, ubound, stepValued, vop)
Parameters
lbound: any
ubound: any
stepValued: any
vop: any
Returns
any - the definitions of the number of iterations of a loop characterized by the parameters.
getSelectedId
getSelectedId()
Returns
any - the name of the variable used to manage the execution, to know if the best fragment has been selected after the learning step. The name is the concatenation of $CURRENT_ID_SPLITTEDLOOP with "_LEARNING".
getSplipLoopPragma
getSplipLoopPragma($s)
Parameters
$s: any
Returns
any - the pragma with name $SPLITPRAGMA or undefined, assigned to a statement ($s).
getSplitLoopLib
getSplitLoopLib(vindex)
Parameters
vindex: any
Returns
any - the name of the library (os dependent) of the vindex-th fragment of the current splitted loop. Example: (linux : libINRIA_SPLITTED_LOOP_2_3.so, witn vindex=3).
getSplitLoopMangleNameOf
getSplitLoopMangleNameOf($vFunction, $ident, $refParams)
Mangling
- refParams = 'int, int ' [, delc_1, ... ,decl_n]
Parameters
$vFunction: any
$ident: any
$refParams: any
mkNewSplittedLoopName
mkNewSplittedLoopName()
Make a new name for the current splitted loop, stored in $CURRENT_ID_SPLITTEDLOOP.
Returns
any - this new name.
replaceLoop
replaceLoop($loop, $nbLoops, $referencedParams)
Replace a loop ( $loop ) by nbLoops loops, with the same body than the original one,
but a subset of the iteration space. Different optimization sequences on each loop independently will be applied.
Timers around each chunk observe the performance of each fragment.
Global boolean variables are added for management (XX denotes a number to ensure the unicity of the identifiers)
- INRIA_SPLITTED_LOOP_XX_LEARNING, initialy true, for the execution of the different fragments with time evaluation.
- INRIA_SPLITTED_LOOP_XX_SELECTED, initialy false, set to true when the "best" fragment is selected. The choice is
done when the INRIA_SPLITTED_LOOP_XX_learning is false and when the INRIA_SPLITTED_LOOP_XX_SELECTED is false.
Parameters
$loop: any
$nbLoops: any
$referencedParams: any
satisfiesSplitLoopsCriteria
satisfiesSplitLoopsCriteria(aloop)
tryToNormalizeLoopForSplitting
tryToNormalizeLoopForSplitting(aloop)