Vectorized matrix & vector code