mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
added globPtr for GpuMat
This commit is contained in:
parent
c23eb17997
commit
1c0d2b37a7
@ -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> >
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user