loki.transformations.parallel.block_loop
Transformation utilities to remove and generate parallel block loops.
Functions
|
Insert IFS-style (NPROMA) driver block-loops in |
|
- remove_block_loops(routine, dimension)
Remove any outer block
Loop
from a given :any:`Subroutine.The loops are identified according to a given
Dimension
object, and will remove auxiliary assignments of index and bound variables, as commonly used in IFS-style block loops.- Parameters:
routine (
Subroutine
) – Subroutine from which to remove block loopsdimension (
Dimension
) – The dimension object describing loop variables
- add_block_loops(routine, dimension, default_type=None)
Insert IFS-style (NPROMA) driver block-loops in
!$loki parallel
regions.The provided
Dimension
object describes the variables to used when generating the loop and default assignments. It encapsulates IFS-specific convention, where a strided loop over points, defined bydimension.index
,dimension.bounds
anddimension.step
is created, alongside assignments that define the corresponding block index and upper bound, defined bydimension.indices[1]
anddimension.upper[1]
respectively.- Parameters:
routine (
Subroutine
) – The routine in which to add block loops.dimension (
Dimension
) – The dimension object describing the block loop variables.default_type (
SymbolAttributes
, optional) – Default type to use when creating variables; defaults tointeger(kind=JPIM)
.