Let's pretend that
struct s {
int* __restrict__ p1;
double v;
};
void foo(int* __restrict__ p2, struct s my_s) { }
Does the C ++ compiler listed below contain keywords in this case __restrict__, and is it assumed that accessing memory through p2cannot affect access through p1? Obviously this depends on the compiler since restrictit is not a C ++ keyword.
I am mostly interested in the answer of gcc 4.9.x and nVIDIA CUDA 7.5 nvcc (when compiling the device code, of course, not when forwarding to the host compiler). The answer to the current versions of clang, gcc and msv ++ will also be interesting.
source
share