I have a very simple fortran loop, that sets some elements of an array to 0.0, as shown below:
!dir$ loop count min(128)
arr(1:max(start,someVar)) = 0.0
When I compile the file with ifort, the vectorization report says:
file.f90(60): (col. 5) remark: LOOP WAS VECTORIZED
file.f90(60): (col. 5) remark: loop was not vectorized: not inner loop
I tried using !dir$ simd before the loop, and it vectorized. But my question is: Why wasn't it vectorizing, or converted to memcpy or memset? It is clearly an inner loop.
After upgrading to ifort 15, the optimization report stated that the line was in fact converted to memset. I think the new memset code loops over the array, 'memset'-ing chunks at a time.