【发布时间】:2013-04-16 11:03:30
【问题描述】:
对于数学运算,我添加到头文件中
#include <math_functions.h>
#include <device_functions.h>
但是当我编译它时,它开始出现以下错误。我该怎么办?
附言: CUDA 5.0,VS2010
NVIDIA GPU 计算工具包\CUDA\v5.0\include\crt/func_macro.h(50): 致命错误 C1189: #error : -- 错误包含 cudart 标头 文件
【问题讨论】:
-
确保将这些标头包含在
cu文件中,而不是cpp文件中。 -
您永远不需要在用户代码中包含任何这些标头。
标签: cuda compiler-errors runtime-error