How to pass cv::cuda::GpuMat to a kernel as cv::cuda::PtrStepSz?

I need to pass cv::cuda::GpuMat as argument to a CUDA kernel function. I came across, that a cv::cuda::GpuMat can be passed to kernel as cv::cuda::PtrStepSz. I am not able to find documentation or any implementation example for the same. What is the proper syntax to pass cv::cuda::GpuMat? How to access the cv::cuda::PtrStepSz inside kernel?
If available kindly share resources to better understand utilisation of cv::cuda::PtrStepSz.

Nearly all of the internal CUDA code is passed a GpuMat which is implicitly converted to a PtrStep or PtrStepSz because of

template <typename _Tp> operator PtrStepSz<_Tp>() const;

See resize for an example. The kernel is passed a PtrStepSz for dst

template <class Ptr2D, typename T> __global__ void resize(Ptr2D src, PtrStepSz<T> dst, const float fy, const float fx)

but is orginally called with a GpuMat