__float_as_uint and __uint_as_float undefined in intellisense

I have built and successfully run the Optix 8.1.0 samples in VS 2022. I have installed CUDA 12.6.
However the Intellisense gives identifier __float_as_uint / __uint_as_float is undefined “error” which is not true because the solution builds successfully.
What configuration should I apply to my solution in order to make the intellisense see these function definitions?

I believe that these types of issues with CUDA + Intellisense are common and there is no automatic fix that always works. One suggestions was to use something like this as needed to ignore them during intellisense pass:

#ifdef __INTELLISENSE__
    #define __float_as_uint(x) (x)
    #define __uint_as_float(x) (x)
#endif
1 Like