Skip to content

Fixes for buffers in loops with step size > 1

Frederik Hennig requested to merge da15siwa/pystencils:loop_step into master

This MR introduces some additions and fixes for generating CPU loops with step sizes > 1:

  • The CPU create_kernel function now exposes a flag to disable the double field write check
  • Rewrote get_base_buffer_index to use pure integer arithmetic, and corrected the computation of the buffer base index to correctly incorporate loop step sizes. Added test case to check correctness.
  • Added rudimentary evalf functionality to integer division sympy function int_div (its absence lead to an infinite recursion during code generation).
  • Added correct printing of integer-typed expressions in CustomSympyPrinter._typed_number.
Edited by Frederik Hennig

Merge request reports