【发布时间】:2013-06-11 21:21:39
【问题描述】:
下面的试验提出了我的意图,编译失败:
__host__ __device__ void f(){}
int main()
{
f<<<1,1>>>();
}
编译器投诉:
a.cu(5): error: a __device__ function call cannot be configured
1 error detected in the compilation of "/tmp/tmpxft_00001537_00000000-6_a.cpp1.ii".
希望我的陈述清楚,并感谢您的建议。
【问题讨论】:
-
你的意思是
__device__ __host__ void f(){}? -
我尝试了 "device host" 和 "host device" 的组合,都失败了
-
以上代码基于教程“uni-graz.at/~liebma/CUDA/…”
标签: cuda