CUDA compile CPP with error of STATIC_ASSERTION_FAILURE

compile the *.cpp extension files with NVCC (Nvidia Cuda Compiler) will face the situation as thrust::detail::STATIC_ASSERTION_FAILURE<false>, solution at here

More information for this problem


This is the expected behavior, right? I get the same error with each release of Thrust going back to 1.5.
When you create a device_vector with more than 0 elements, you are implicitly asking the compiler to compile a CUDA kernel. The problem is that when you invoke nvcc with a .cpp source file, you are compiling in C++ mode (not CUDA C++).


©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容