The following trial presents my intention, which failed to compile:
__host__ __device__ void f(){}
int main()
{
f<<<1,1>>>();
}
The compiler complaints:
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".
Hope my statement is clear, and thanks for advices.