Restrict
void Add2Elems(int * __restrict a, int * __restrict b, int x) {
for (int i = 0; i < 50; ++i) {
a[i] += x;
b[i] += x;
}
}
void Add2Elems(int *a, int *b, int x) {
for (int i = 0; i < 50; ++i) {
a[i] += x;
b[i] += x;
}
}
* The benchmark is run under AMD Ryzen 9.
* For the full benchmark code, please refer here.