I am a newbie with cuda, I progressed in the comprehension of the problem.
It really seems to be a bug coming from NVCC.
I added the “-keep” option to the command line of NVCC to see the generated CPP file.
The problem is that the template argument duduced from NVCC is not the same for Visual.
The template argument deduced by NVCC does not have any “const” qualifier, whereas Visual (and Intel C++ compiler, and GCC) lets the “const”.
I’ll try to set some “#ifdef” in the library, so that the “const” qualifier won’t be propagated in the expression templates whenever compiled with NVCC.
But it clearly seems to be a bug of NVCC
I confirm: NVCC does not deduce well templates with ‘const’ qualifiers.
I added “#ifdefCUDACC” at some points in my library, in order to not propagate the ‘const’ in the expression templates, and added “const_cast” statments.
It works for me, but it’s definitly a workarround for something that seems to be a bug of NVCC.
Someone could confirm?
A developper of NVCC could correct this issue?