Commit a04104cb authored by Heinz-Bernd Eggenstein's avatar Heinz-Bernd Eggenstein
Browse files

Bug #1649: wrong results for transform lengths > 2^24

Prevent integer overruns for long transforms in Taylor approx of sin cos.
Still to do: check all uses of mad24 etc in generated code where overruns could occur as well
parent 2df1083e
...@@ -1120,7 +1120,7 @@ insertSinCosCalcTaylor3(string & kernel_string, cl_fft_plan *plan, int num, int ...@@ -1120,7 +1120,7 @@ insertSinCosCalcTaylor3(string & kernel_string, cl_fft_plan *plan, int num, int
logDenom++; logDenom++;
} }
kernel_string += string(" int k = (ang_index << ") + num2str(plan->logN2) + string(" + ") + num2str(denom / 2) + string(") >> ") + num2str(logDenom) + string(";\n"); kernel_string += string(" int k = (ang_index + ") + num2str( 1 <<(logDenom - plan->logN2 -1) ) + string(") >> ") + num2str(logDenom - plan->logN2) +string( ";\n");
// get cos/sin of grid point from LUT // get cos/sin of grid point from LUT
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment