added globPtr for GpuMat

This commit is contained in:
Vladislav Vinogradov 2013-07-19 15:30:51 +04:00
parent c23eb17997
commit 1c0d2b37a7

View File

@ -91,6 +91,17 @@ __host__ GlobPtrSz<T> globPtr(T* data, size_t step, int rows, int cols)
return p; return p;
} }
template <typename T>
__host__ GlobPtrSz<T> globPtr(const GpuMat& mat)
{
GlobPtrSz<T> p;
p.data = (T*) mat.data;
p.step = mat.step;
p.rows = mat.rows;
p.cols = mat.cols;
return p;
}
template <typename T> struct PtrTraits< GlobPtrSz<T> > : PtrTraitsBase<GlobPtrSz<T>, GlobPtr<T> > template <typename T> struct PtrTraits< GlobPtrSz<T> > : PtrTraitsBase<GlobPtrSz<T>, GlobPtr<T> >
{ {
}; };