Skip to content

Ternary Expressions, Improved Integer Divisions, and Iteration Space Fix

Frederik Hennig requested to merge fhennig/ternary into backend-rework

Ternary expressions

This MR introduces ast nodes, typification, constant folding, and printing of ternary a ? b : c expressions. On top of that, freezing support for sympy.Piecewise is introduced.

Integer Division Improvements

This MR introduces the PsRem expression node for the C % operator, and adds constant folding for C-style integer division and remainder operations.

Fix: Iteration Space work items

Using the above, this MR fixes the computation of the amount of work items in an interation space if start, stop and step don't align.

Merge request reports