Reputation: 111976
Is there a way to get Eclipse (Indigo) to know about the built-in variables and functions that are available to CUDA kernels?
Consider the following simple kernel
__global__ void myKernel()
{
int x = threadIdx.x;
__syncthreads();
}
The Eclipse IDE highlights "threadIdx" and "__syncthreads" with a "Symbol 'the built-in symbol' could not be resolved" error message. Is there a way to tell Eclipse these are actually implicitly defined?
Upvotes: 3
Views: 1406
Reputation: 111976
flipchart is correct. #include <cuda_runtime_api.h>
does the trick if the symbol __CUDACC__
is defined beforehand.
Upvotes: 2