I am trying to vectorize a loop using ivdep but I'm not getting any output. I looked at the documentation and used the flags mentioned there. This is my code:
int main()
{
int a[100], b[100];
int size = 100;
for (int i = 0; i < size; i++)
a[i] = 5;
#pragma GCC ivdep
for (int i = 0; i < size; i++)
b[i] = a[i] + i;
}
How I compile it:
g++ vectest.c -O2 -fopt-info-all -fopt-info-missed-all -o vectest