刚刚开始学习CUDA,选择了Jason Sanders的《GPU高性能编程——CUDA实战》这本书作为入门书籍。目前只看到第三章,觉得这本书非常不错,讲得比较详细,开始比较浅显,适合入门。
今天运行了书中的配套例程Julia_cuda,遇到了一些错误,记录一下。
C:/yf/CUDA_Y/text/Julia_cuda/Julia.cu(47): error : calling a __host__ function("cuComplex::cuComplex") from a __device__ function("julia") is not allowed
1>
1>C:/yf/CUDA_Y/text/Julia_cuda/Julia.cu(48): error : calling a __host__ function("cuComplex::cuComplex") from a __device__ function("julia") is not allowed
1>
1>C:/yf/CUDA_Y/text/Julia_cuda/Julia.cu(35): error : calling a __host__ function("cuComplex::cuComplex") from a __device__ function("cuComplex::operator *") is not allowed
1>
1>C:/yf/CUDA_Y/text/Julia_cuda/Julia.cu(38): error : calling a __host__ function("cuComplex::cuComplex") from a __device__ function("c