Compiling Eigen library with nvcc (CUDA)

前端 未结 3 1777
长发绾君心
长发绾君心 2020-12-17 02:45

I tried to compile following program (main.cu) with the nvcc (CUDA 5.0 RC):

#include 
#include 

int main( int argc, char**         


        
3条回答
  •  清酒与你
    2020-12-17 03:32

    NVCC invokes the normal host compiler but not before it has done some preprocessing, so it's likely that NVCC is struggling to parse the Eigen code correctly (especially if it uses C++11 features, but that's unlikely since you say VS2008 works).

    I usually advise separating the device code and wrappers into the .cu files and leaving the rest of your application in normal .c/.cpp files to be handled by the host compiler directly. See this answer for some tips on getting this set up with VS2008.

提交回复
热议问题