I am trying to understand why Visual Studio 2012 (x64) doesn't want to vectorized a conversion from a short
to a float
. Does anybody have a reason or a way around?
//unsigned short* __restrict A,B,C,D
for (int j = 0; j < H*W;j++)
{
float Gs = D[j]-B[j];
float Gc = A[j]-C[j];
in[j]=atan2f(Gs,Gc);
}
info C5002: loop not vectorized due to reason '1101'
RESOLUTION
Runtime using shorts and not vectorizing is about 800ms
Runtime converting to all ints and auto vectorizing is about 140ms
(!!!)