I'm in C and I have an int ** (2 dimensional array, it's basically a matrix, it's actually set up a little bit complicated but there's no internal aliasing, so it's not relevant).
is this int** restrict or int * restrict * restrict my instinct is the former since restrict only really applies to variables but the compiler is merrily happy to accept both (although free gets upset at discarding the restrict).
For reference the only way the code access i[4][5] is by using i[4][5] . I.e. there are NO other variables such that say j=&(i[4][5]) and the internal array is structured such that say i[a][b] and i[c][d] ALWAYS point to different integers unless a==c && b==d is true.
I need this to vectorize and my compiler (clang) is being...twitchy? it works mostly but I have to do a bunch of work to insure it can't see any other int * anywhere when the compiler is working on the array (basically I move the array processing to a function, process the array, then collect the results). The int *'s I'm dealing with are...unrelated to the array (they are MPI out values), so this is kind of annoying that the compiler thinks there might be a way one of them might alias an internal block