Function definition for __syncthreads() not found

Hi everyone !!
I’m using CUDA version 8.0, i’m trying to load my data from global memory to shared memory and i need to use __syncthreads() but i can’t get rid of the red underlines, __syncthreads() exists on the CUDA header “device_functions.h” but there’s no function definition for it.
Any suggestions how to make it works ??
Thank you.

I assume you are using Microsoft Visual Studio. Make sure you are building CUDA code as such, not building CUDA code as either C or C++ code.

Assuming you are doing that already: Simply ignore the red Intellisense squiggles for CUDA-specific stuff that MSVS doesn’t know about, or turn off Intellisense altogether, if MSVS lets you.