In order to use auto-vectorization for a c++ code which will be running on x86-64 and aarch64 processors, is just adding #pragma omp simd
in the code is sufficient? I plan to compile in windows using msvc, on linux using gcc and using clang for ios/osx.
Or are there any additional steps which will be needed?
Are there any other limitations which i should be aware of?
#pragma omp simd
for (int i=0; i<size; ++i)
{
c[i] = a[i] + b[i];
}