Successfully copies matrix to and from GPU