I have two quick questions regarding using SIMD directives.
(1) I am currently using !DIR$ SIMD to help the compiler to vectorize the loops. But I just noticed that in OpenMP 4.0 we have the following directives:
!$OMP END SIMD
I am a little bit confused about why we need !$OMP SIMD since !DIR$ SIMD works for both non-openmp code and openmp code. !$OMP SIMD only works when I add the compiler option -openmp to generate openmp code, right?
(2) What about the portability of the SIMD directives (!DIR$ SIMD or !$OMP SIMD)? Later I may test my code on different platforms with different compilers. I guess !DIR$ SIMD only works with Intel compiler while !$OMP SIMD may be supported by more vendors.
Thanks for your time and help!