psyclone.psyir.transformations.intrinsics.array_reduction_base_trans#
Module providing common functionality to transformation from a PSyIR array-reduction intrinsic to PSyIR code.
Classes#
ArrayReductionBaseTrans: An abstract parent class providing common functionality to
- class psyclone.psyir.transformations.intrinsics.array_reduction_base_trans.ArrayReductionBaseTrans[source]#
An abstract parent class providing common functionality to array-reduction intrinsic transformations which translate the intrinsics into an equivalent loop structure.
Inheritance

- apply(node, options=None, **kwargs)[source]#
Apply the array-reduction intrinsic conversion transformation to the specified node. This node must be one of these intrinsic operations which is converted to an equivalent loop structure.
- Parameters:
node (
psyclone.psyir.nodes.IntrinsicCall) – an array-reduction intrinsic.options (Optional[Dict[str, Any]]) – options for the transformation.
- validate(node, options=None, **kwargs)[source]#
Check that the input node is valid before applying the transformation.
- Parameters:
node (
psyclone.psyir.nodes.IntrinsicCall) – an array-reduction intrinsic.options (Optional[Dict[str, Any]]) – options for the transformation.
- Raises:
TransformationError – if the supplied node is not an intrinsic.
TransformationError – if the supplied node is not an array-reduction intrinsic.
TransformationError – if there is a dimension argument.
TransformationError – if the array argument is not an array.
TransformationError – if the shape of the array is not supported.
TransformationError – if the array datatype is not supported.
TransformationError – if the intrinsic is not part of an assignment.