diff --git a/src/pystencils/backend/kernelcreation/freeze.py b/src/pystencils/backend/kernelcreation/freeze.py index 5cdb3864c1f1d09e65686dd36da3623d837e71d5..9dc3928b3549e7d0a9eae4ae2e78244e4e9e4b4c 100644 --- a/src/pystencils/backend/kernelcreation/freeze.py +++ b/src/pystencils/backend/kernelcreation/freeze.py @@ -200,7 +200,8 @@ class FreezeExpressions: orig_lhs_symb = lhs.symbol dtype = lhs.dtype - assert isinstance(dtype, PsNumericType) + assert isinstance(dtype, PsNumericType), \ + "Reduction assignments require type information of the lhs symbol." # replace original symbol with pointer-based type used for export orig_lhs_symb_as_ptr = PsSymbol(orig_lhs_symb.name, PsPointerType(dtype)) @@ -226,7 +227,7 @@ class FreezeExpressions: case ReductionOp.Max: init_val = PsCall(PsMathFunction(NumericLimitsFunctions.Min), []) case _: - raise FreezeError(f"Unsupported reduced assignment: {op}.") + raise FreezeError(f"Unsupported kind of reduction assignment: {op}.") reduction_info = ReductionInfo(op, init_val, orig_lhs_symb_as_ptr)