Vectorized loop