From ebc36d2dd511d3b847a2c14ed38e8d3942a1467e Mon Sep 17 00:00:00 2001 From: Frederik Hennig <frederik.hennig@fau.de> Date: Wed, 27 Mar 2024 16:40:39 +0100 Subject: [PATCH] temporarily remove modulo_floor --- src/pystencils/backend/kernelcreation/freeze.py | 3 +-- tests/nbackend/kernelcreation/test_freeze.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pystencils/backend/kernelcreation/freeze.py b/src/pystencils/backend/kernelcreation/freeze.py index 8e3ad7e42..6ce0264e2 100644 --- a/src/pystencils/backend/kernelcreation/freeze.py +++ b/src/pystencils/backend/kernelcreation/freeze.py @@ -332,9 +332,8 @@ class FreezeExpressions: return PsBitwiseOr(*args) case integer_functions.int_power_of_2(): return PsLeftShift(PsExpression.make(PsConstant(1)), args[0]) - case integer_functions.modulo_floor(): - return PsIntDiv(*args) * args[1] # TODO: what exactly are the semantics? + # case integer_functions.modulo_floor(): # case integer_functions.div_floor() # TODO: requires if *expression* # case integer_functions.modulo_ceil(): diff --git a/tests/nbackend/kernelcreation/test_freeze.py b/tests/nbackend/kernelcreation/test_freeze.py index 68c773770..269435257 100644 --- a/tests/nbackend/kernelcreation/test_freeze.py +++ b/tests/nbackend/kernelcreation/test_freeze.py @@ -132,7 +132,7 @@ def test_freeze_integer_functions(): asms = [ Assignment(z, int_div(x, y)), Assignment(z, int_power_of_2(x, y)), - Assignment(z, modulo_floor(x, y)), + # Assignment(z, modulo_floor(x, y)), ] fasms = [freeze(asm) for asm in asms] @@ -140,7 +140,7 @@ def test_freeze_integer_functions(): should = [ PsDeclaration(z2, PsIntDiv(x2, y2)), PsDeclaration(z2, PsLeftShift(PsExpression.make(PsConstant(1)), x2)), - PsDeclaration(z2, PsMul(PsIntDiv(x2, y2), y2)), + # PsDeclaration(z2, PsMul(PsIntDiv(x2, y2), y2)), ] for fasm, correct in zip(fasms, should): -- GitLab