Cuda API to convert memory allocated by cudaMallocPitch to GpuMat

Hi,
I am allocating device memory using cudaMallocPitch.
cudaMallocPitch((void *)&d_src, (size_t)&pitch, (size_t)(sizeof(float)*width), (size_t)height);

I want to do blurring on device memory allocated, I don’t want to launch kernel for blurring.

I want to use API for gaussianBlur.

GpuMat input, input;
gpu::GaussianBlur(input, input, Size(3,3), 1.0);

Is there any way to convert device memory to GpuMat and vice-versa?

Thanks,
Tushar

GpuMat is from OpenCV. You will need to use an OpenCV method to import device data into a GpuMat

There is no CUDA method to do so. CUDA knows nothing about OpenCV.