diff --git a/modules/gpu/include/opencv2/gpu/devmem2d.hpp b/modules/gpu/include/opencv2/gpu/devmem2d.hpp index 4ab8e333f..160c2b5d0 100644 --- a/modules/gpu/include/opencv2/gpu/devmem2d.hpp +++ b/modules/gpu/include/opencv2/gpu/devmem2d.hpp @@ -95,17 +95,17 @@ namespace cv __CV_GPU_HOST_DEVICE__ T* ptr(int y = 0) { return (T*)( (char*)data + y * step); } __CV_GPU_HOST_DEVICE__ const T* ptr(int y = 0) const { return (const T*)( (const char*)data + y * step); } }; + + template struct StaticCheck; + template <> struct StaticCheck{}; template struct PtrElemStep_ : public PtrStep_ { PtrElemStep_(const DevMem2D_& mem) : PtrStep_(mem) { - step /= elem_size; + this->step /= PtrStep_::elem_size; } private: - template struct StaticCheck; - template <> struct StaticCheck{}; - StaticCheck<256 % sizeof(T) == 0> ElemStepTypeCheck; };