loki.dimension
Classes
|
Dimension object that defines a one-dimensional data and iteration space. |
- class Dimension(name=None, index=None, bounds=None, size=None, aliases=None, bounds_aliases=None, index_aliases=None)
Bases:
object
Dimension object that defines a one-dimensional data and iteration space.
- Parameters:
name (string) – Name of the dimension to identify in configurations
index (string) – String representation of the predominant loop index variable associated with this dimension.
size (string) – String representation of the predominant size variable used to declare array shapes using this dimension.
bounds (tuple of strings) – String representation of the variables usually used to denote the iteration bounds of this dimension.
aliases (list or tuple of strings) – String representations of alternative size variables that are used to define arrays shapes of this dimension (eg. alternative names used in “driver” subroutines).
bounds_aliases (list or tuple of strings) – String representations of alternative bounds variables that are used to define loop ranges.
index_aliases (list or tuple of strings) – String representations of alternative loop index variables associated with this dimension.
- property variables
- property size
String that matches the size expression of a data space (variable allocation).
- property index
String that matches the primary index expression of an iteration space (loop).
- property bounds
Tuple of expression string that represent the bounds of an iteration space.
- property range
String that matches the range expression of an iteration space (loop).
- property size_expressions
A list of all expression strings representing the size of a data space.
This includes generic aliases, like
end - start + 1
or1:size
ranges.
- property bounds_expressions
A list of all expression strings representing the bounds of a data space.
- property index_expressions
A list of all expression strings representing the index expression of an iteration space (loop).