Device matrix copy (CUBLAS/CUDA) How to copy a 2D matrix to another 2D matrix in device memory

I need to copy one matrix in device memory to another in device memory. I tried using the CUBLAS call cublasScopy(), treating both matrices as vectors, but that seems to mess up both matrices. Isn’t there any call to do this? I see cuMemcpyDtoD() in the documentation, but i can’t find which header it is in.