The restrict keyword is mainly used in pointer declarations as a type qualifier
for pointers. It does not add any new functionality. It allows you to tell the compiler
about a potential optimization. Using
__restrict with a
pointer informs the compiler that the pointer is the only way to access the object
pointed at, and the compiler does not need to perform any additional checks.
The following is another example with pointers that, by default, have no aliasing.
Apply the restrict keyword for performance improvement. The following example shows no memory dependencies with other pointers.