psyclone.psyir.transformations.intrinsics.min2code_trans#
Module providing a transformation from a PSyIR MIN intrinsic to PSyIR code. This could be useful if the MIN intrinsic is not supported by the back-end or if the performance of the inline code is better than the intrinsic.
Classes#
Min2CodeTrans: Provides a transformation from a PSyIR MIN Intrinsic node to
- class psyclone.psyir.transformations.intrinsics.min2code_trans.Min2CodeTrans[source]#
Provides a transformation from a PSyIR MIN Intrinsic node to equivalent code in a PSyIR tree. Validity checks are also performed (by a parent class).
The transformation replaces
R = MIN(A, B, C ...)
with the following logic:
R = A if B < R: R = B if C < R: R = C ...
Inheritance

- apply(node, options=None, **kwargs)[source]#
Applies the Min2CodeTrans to the provided node.
- Parameters:
node (
psyclone.psyir.nodes.IntrinsicCall) – a MIN intrinsic.options (Optional[Dict[str, Any]]) – a dictionary with options for transformations.