Made the copying of a row of a matrix faster through using memcpy.