Editing a .cu file, Eclipse shows any function with a restrict parameter as a syntax error. Because of the syntax error, the code for the function appears with a yellow underscore throughout all the text of the function, and the function does not appear in the Outline view for the file. Similarly, any field of a struct or class using restrict shows as a syntax error.
However, the source compiles and executes just fine!
If I replace restrict by __restrict, the syntax error indicators vanish, and it compiles. I imagine __restrict is doing what I expect?
Is this a bug, or am I misusing restrict?
Thanks!
Here’s a simple example:
__device__ int foo(const float * __restrict__ f){
return 9;
}
I am running NSight 9.2 (downloaded today) and am getting a similar problem. Has there been any progress made? (Using the Eclipse version on Ubuntu 16.04). I am trying to write a C version using just restrict, rather than `restrict’ and the former gives me the syntax error in the function definitions/declaration.