I attached two code files mandel1.cpp and mandel2.cpp.
mandel1.cpp has a loop with all the code in the body
mandel2.cpp has equivalent code but instead of having the code in the body it calls an inline function
Compiling with intel c++ compiler 15 with "icc -O3 -fp-model fast=2 -xCORE-AVX2 -fma -c -S", I can vectorize mandel1.cpp but not mandel2.cpp.
Is there I way I can vectorize mandel2.cpp and still have a separate function? It seems like the optimizer ought to just be able to inline and then apply the vectorization if it can vectorize mandel1.cpp.