loki.transformations.single_column.hoist
Classes
Specialisation for the Synthesis part of the hoist variables transformation that uses automatic arrays in the driver layer to allocate hoisted temporaries. |
- class SCCHoistTemporaryArraysTransformation(block_dim=None, **kwargs)
Bases:
HoistVariablesTransformationSpecialisation for the Synthesis part of the hoist variables transformation that uses automatic arrays in the driver layer to allocate hoisted temporaries.
This flavour of the hoisting synthesis will add a blocking dimension to the allocation and add OpenACC directives to the driver routine to trigger device side-allocation of the hoisted temporaries.
- Parameters:
block_dim (
Dimension) –Dimensionobject to define the blocking dimension to use for hoisted array arguments on the driver side.
- driver_variable_declaration(routine, variables)
Adds driver-side declarations of full block-size arrays to pass to kernels. It also adds the OpenACC pragmas for driver-side allocation/deallocation.
- Parameters:
routine (
Subroutine) – The subroutine to add the variable declaration to.variables (tuple of
Variable) – The array to be declared, allocated and de-allocated.
- driver_call_argument_remapping(routine, call, variables)
Adds hoisted sub-arrays to the kernel call from a driver routine.
This assumes that the hoisted temporaries have been allocated with a blocking dimension and are device-resident. The remapping will then add the block-index as the last index to each passed array argument.
- Parameters:
routine (
Subroutine) – The subroutine to add the variable declaration to.call (
CallStatement) – Call object to which hoisted arrays will be added.variables (tuple of
Variable) – The array to be declared, allocated and de-allocated.