pyvkfft
pyvkfft copied to clipboard
Problem with French decimal separator
When using pyvkFFT on MacOS with a French system, we occasionally have the error
program_source:247:11: error: no matching function for call to 'fma'
loc_1.x = fma(temp_2.x, -0,00000000000000000e+00f, temp_0.x);
^~~
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.720/include/opencl-c.h:7517:22: note: candidate function not viable: requires 3 arguments, but 4 were provided
showing that a number to text conversion has used the French decimal separation character ',' instead of '.', making the fma
function call to fail. How to circumvent this? Going to the MacOS prefs to set the number format to use '.' does not change anything. In any case, this should not be necessary to have to change this system-wide pref.
The problem may lie in the code of the function PfFMA
of vkFFT_MathUtils.h, from my own investigations, where there are the use of 'fma' with sprintf
statements...
Could a use of numpy.printoptions
previously in our code be a cause of this behaviour?