Next: The array dimension interchange
Up: Simple functions
Previous: The loop blocking transformation
The array padding transformation sets a dimension in an array to a new size. The goal of this transformation is to reduce the number of memory system conflicts. The transformation is applied to a full function AST. The new size can be specified by the user or can be computed automatically. The array must be a local variable and it's dimension must be constant.
-
Fits:Padding:Check(UNIT,DIAGMESG,ARRAzY,DIM,SIZE)
-
This function checks if the array padding transformation can be applied.
- UNIT (input AST) is a foresys unit.
- DIAGMESG (output STRING) is a diagnostic string for the user.
- ARRAY (input STRING) is the array name.
- DIM (input STRING) is the dimension.
- SIZE (input/output INT) is the new size of the dimension. At output,
its content is computed if its input value is -1.
- The function returns an error code (return INT) :
- 1 if all is correct.
- 0 if ARRAY is not defined.
- -1 if ARRAY is not a local variable.
- -2 if DIM is not a valid dimension of ARRAY.
-
Fits:Padding:Advice(UNIT,DIAGMESG,ARRAzY,DIM,SIZE)
-
This function emits a diagnostic about the interest of the array padding transformation
- UNIT (input AST) is a foresys unit.
- DIAGMESG (output STRING) is a diagnostic string for the user.
- ARRAY (input STRING) is the array name.
- DIM (input STRING) is the dimension.
- SIZE (input INT) is the new size of the dimension. A FALSE value means
that the size will be computed automatically.
- The function returns a diagnostic code (return INT) :
- 1 if the transformation is recommended
- 0 if the transformation may be interesting
- -1 if the transformation in not recommended
-
Fits:Padding:Safe(UNIT,DIAGMESG,ARRAzY,DIM,SIZE)
-
This function emits a diagnostic about the code produced by the array padding transformation
- UNIT (input AST) is a foresys unit.
- DIAGMESG (output STRING) is a diagnostic string for the user.
- ARRAY (input STRING) is the array name.
- DIM (input STRING) is the dimension.
- SIZE (input INT) is the new size of the dimension. A FALSE value means
that the size will be computed automatically.
- The function returns a diagnostic code (return INT) :
- 1 if the transformation is safe.
- 0 if the transformation may be safe. More information is given in
DIAGMESG.
- -1 if the transformation is not safe.
-
Fits:Padding:Apply(UNIT,DIAGMESG,ARRAzY,DIM,SIZE)
-
This statement applies the array padding transformation.
- AST (input AST) is a Foresys AST.
- VERBOSE (input INT) is the comment level.
- ARRAY (input STRING) is the array name.
- DIM (input STRING) is the dimension.
- SIZE (input INT) is the new size of the dimension. A FALSE value means
that the size will be computed automatically (i.e. the old size +1)
Next: The array dimension interchange
Up: Simple functions
Previous: The loop blocking transformation
Yann Mevel
1999-04-30