Closed christiealappatt closed 7 years ago
I see what you mean. Maybe @cod3monk can tell us how would kerncraft deal with it.
Kerncraft does not deal with it. It does not do any code transformations and leaves that part to the compiler. I have seen issues with this particular problem in a 3D boxed stencil. For kerncraft the solution is to fuse the coefficients manually, but since you are generating the code for kerncraft it might be useful to do that automatically.
Ok thanks for clarifying. Then I will fuse them while generating the code.
fixed in 3e57c7dcdae6422891c4054eb8ef6560155c4343 and 856049e55ca8e2e4a7857aee27a74215bd8879f0
Right now in the case of symmetric, isotropic stencils the coefficients are not fused i.e. for example python stempel.py -D 2 -r 1 -s -k star -C variable
output:
I think it would be better if the output is:
Since sometimes compiler might generate additional multiplies for the current case,