Fastest way to fill SIMD-vector with data
Kulakov, Igor
[please enable javascript to see the address]
Thu Oct 31 11:30:37 CET 2013
Hi Matthias,
what is actually current the fastest way to fill a vector with data?
Before Vc didn't let us to assign a data entry by entry and we used Memory class. Like this:
float_v::Memory tmpFloat;
for(int iV=0; iV < float_v::Size; iV++)
tmpFloat[iV] = t0[iV]->X();
tmpVec.load( tmpFloat );
t.SetX(tmpVec);
But will it be optimised by compiler to be equivalent to desired:
for(int iV=0; iV < float_v::Size; iV++)
t.fX[iV] = t0[iV]->X();
?
May be there is even faster way if the input data is not aligned?
I tried to find a use case of Vc::Memory in Vc-0.7 doxygen documentation and failed. When exactly we should use this class?
Best regards,
Igor
More information about the Vc
mailing list