Skip to content
Snippets Groups Projects
Commit e0347f54 authored by Richard Angersbach's avatar Richard Angersbach
Browse files

Merge branch 'rangersbach/reductions' of i10git.cs.fau.de:pycodegen/pystencils...

Merge branch 'rangersbach/reductions' of i10git.cs.fau.de:pycodegen/pystencils into rangersbach/reductions

# Conflicts:
#	src/pystencils/backend/kernelcreation/freeze.py
parents 90ca9ead 3fc9a049
Branches
Tags
1 merge request!438Reduction Support
Pipeline #72401 failed
......@@ -213,10 +213,10 @@ class FreezeExpressions:
init_val = PsConstantExpr(PsConstant(1))
new_rhs = mul(new_lhs.clone(), rhs)
case "min":
init_val = PsCall(PsMathFunction(NumericLimitsFunctions.Min), [])
init_val = PsCall(PsMathFunction(NumericLimitsFunctions.Max), [])
new_rhs = PsCall(PsMathFunction(MathFunctions.Min), [new_lhs.clone(), rhs])
case "max":
init_val = PsCall(PsMathFunction(NumericLimitsFunctions.Max), [])
init_val = PsCall(PsMathFunction(NumericLimitsFunctions.Min), [])
new_rhs = PsCall(PsMathFunction(MathFunctions.Max), [new_lhs.clone(), rhs])
case _:
raise FreezeError(f"Unsupported reduced assignment: {expr.op}.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment