From def17f2baa5d0109bc0039c72471b4a9b568b20e Mon Sep 17 00:00:00 2001 From: Peter Andreas Entschev Date: Fri, 6 Dec 2013 09:31:18 -0200 Subject: [PATCH] Removing ocl::oclMat::ptr() method. The method ocl::oclMat::ptr() is being removed because it returns a pointer to a row of oclMat::data. The data attribute is a cl_mem structure and cannot be iterated outside an OpenCL kernel. --- modules/ocl/doc/data_structures.rst | 8 ----- .../include/opencv2/ocl/matrix_operations.hpp | 30 ------------------- modules/ocl/include/opencv2/ocl/ocl.hpp | 8 ----- 3 files changed, 46 deletions(-) diff --git a/modules/ocl/doc/data_structures.rst b/modules/ocl/doc/data_structures.rst index 01a16739ba..bde3d14af4 100644 --- a/modules/ocl/doc/data_structures.rst +++ b/modules/ocl/doc/data_structures.rst @@ -144,14 +144,6 @@ OpenCV C++ 1-D or 2-D dense array class :: //! returns true if oclMatrix data is NULL bool empty() const; - //! returns pointer to y-th row - uchar* ptr(int y = 0); - const uchar *ptr(int y = 0) const; - - //! template version of the above method - template _Tp *ptr(int y = 0); - template const _Tp *ptr(int y = 0) const; - //! matrix transposition oclMat t() const; diff --git a/modules/ocl/include/opencv2/ocl/matrix_operations.hpp b/modules/ocl/include/opencv2/ocl/matrix_operations.hpp index ad3a16755f..e234a45aa1 100644 --- a/modules/ocl/include/opencv2/ocl/matrix_operations.hpp +++ b/modules/ocl/include/opencv2/ocl/matrix_operations.hpp @@ -456,36 +456,6 @@ namespace cv return data == 0; } - - - inline uchar *oclMat::ptr(int y) - { - CV_DbgAssert( (unsigned)y < (unsigned)rows ); - CV_Error(CV_GpuNotSupported, "This function hasn't been supported yet.\n"); - return data + step * y; - } - - inline const uchar *oclMat::ptr(int y) const - { - CV_DbgAssert( (unsigned)y < (unsigned)rows ); - CV_Error(CV_GpuNotSupported, "This function hasn't been supported yet.\n"); - return data + step * y; - } - - template inline _Tp *oclMat::ptr(int y) - { - CV_DbgAssert( (unsigned)y < (unsigned)rows ); - CV_Error(CV_GpuNotSupported, "This function hasn't been supported yet.\n"); - return (_Tp *)(data + step * y); - } - - template inline const _Tp *oclMat::ptr(int y) const - { - CV_DbgAssert( (unsigned)y < (unsigned)rows ); - CV_Error(CV_GpuNotSupported, "This function hasn't been supported yet.\n"); - return (const _Tp *)(data + step * y); - } - inline oclMat oclMat::t() const { oclMat tmp; diff --git a/modules/ocl/include/opencv2/ocl/ocl.hpp b/modules/ocl/include/opencv2/ocl/ocl.hpp index b8c9b85354..eb310a26e7 100644 --- a/modules/ocl/include/opencv2/ocl/ocl.hpp +++ b/modules/ocl/include/opencv2/ocl/ocl.hpp @@ -379,14 +379,6 @@ namespace cv //! returns true if oclMatrix data is NULL bool empty() const; - //! returns pointer to y-th row - uchar* ptr(int y = 0); - const uchar *ptr(int y = 0) const; - - //! template version of the above method - template _Tp *ptr(int y = 0); - template const _Tp *ptr(int y = 0) const; - //! matrix transposition oclMat t() const; -- GitLab