global void fillKernel(int a, int n)
{
int tid = blockIdx.xblockDim.x + threadIdx.x;
if (tid < n) a[tid] = tid;
cout<<a[tid]<<" ";
}
为何出现错误
错误 2 error : calling a host function(“std::basic_ostream<char, std::char_traits >::operator <<”) from a device/global function(“fillKernel”) is not allowed D:\My Documents\Documents\Visual Studio 。。