CUBLAS matrix device to device copy

Hi,

I have a CUBLAS matrix which is on GPU memory, and I would like it to stay there without copying back to CPU memory.
Is there a way to copy a CUBLAS matrix which is on device memory to another CUBLAS matrix which is also on device memory?

Thanks!

Use cudaMemcpy with cudaMemcpyDeviceToDevice as the transfer type. The cublas get/set routines are essentially just wrapper functions for cudaMemcpy anyway, and the matrix/vector pointers they retrun are just regular linear memory pointers that can be used directly with other kernels or cuda runtime API routines.