以下试验提出了我的意图,但未能编译:
__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".
希望我的陈述清楚,并感谢您的建议。