I am updating critical performance libraries to use restrictas implemented in C ++ 11 g ++ and MSVC with the keyword __restrict.
There are many routines and functions that look something like this:
void f(float a[],float b[]);
In the above example f, this is a routine whose arguments should be limited. Unfortunately, as far as I can tell, this is not possible while maintaining this syntax. Now, obviously, this can be rewritten with pointers like:
void f(float*__restrict a,float*__restrict b);
What is lost here - this is a semantic fact that aand bare arrays (I prefer to use the pointer notation for unambiguous signs and symbols of the array to an array of pointers). Descriptive argument names (omitted above) help, but only so much.
I would like to confirm that declaring variables using array syntax is not possible for these compilers at this time.
source
share