Fixes for nvc++ CUDA compilation
What does this implement/fix?
This fixes compilation of some (partialPivLu()) Eigen code using the NVIDIA C++ compiler (nvc++, which is the new name for the PGI C++ compiler pgc++) with CUDA support enabled (-cuda).
Note that this is not the same thing as nvcc, which is the older two-phase CUDA compiler.
nvc++ has restricted support for static variables, but (unlike nvcc) it is able to compile device functions in a way that is compatible with usage in shared libraries. Compiling certain functions using this CUDA mode is also useful when using OpenACC and OpenMP programming models with Eigen, as Eigen's source code has CUDA annotations but not OpenACC pragmas.
Additional information
More background information is available in this NVIDIA developer forum post.
Edited by Olli Lupton