Add type conversion for SP types
1 unresolved thread
1 unresolved thread
If Assignments are already typed for double-precision but the kernel is created for single-precision the assignments should be adapted.
Merge request reports
Activity
Filter activity
1101 1101 move_constants_before_loop(function_node.body) 1102 1102 cleanup_blocks(function_node.body) 1103 1103 1104 def replace_data_type_of_typed_symbols(assignments, data_type): 1105 """changes the data types of the lhs of assignments which are already specified as TypedSymbol. This is needed 1106 if the Assignments are already typed to double but the kernel is created for single precision""" 1107 for i, assignment in enumerate(assignments): 1108 if type(assignment.lhs) is TypedSymbol and assignment.lhs.dtype != data_type: 1109 assignments[i] = Assignment(TypedSymbol(assignments[i].lhs.name, data_type), assignments[i].rhs) mentioned in merge request lbmpy!69 (merged)