From 290c8db0a85ff6e4a9d84243624852a21190598f Mon Sep 17 00:00:00 2001 From: peng xiao Date: Fri, 21 Jun 2013 14:51:23 +0800 Subject: [PATCH] Revise naming for getOclMat function. --- modules/core/src/matrix.cpp | 12 ++++++------ modules/ocl/include/opencv2/ocl/ocl.hpp | 6 +++--- modules/ocl/src/matrix_operations.cpp | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/core/src/matrix.cpp b/modules/core/src/matrix.cpp index c4c0041..5a3600b 100644 --- a/modules/core/src/matrix.cpp +++ b/modules/core/src/matrix.cpp @@ -982,7 +982,7 @@ Mat _InputArray::getMat(int i) const if( k == OCL_MAT ) { - CV_Error(-1, "Not implemented"); + CV_Error(CV_StsNotImplemented, "This method is not implemented for oclMat yet"); } CV_Assert( k == STD_VECTOR_MAT ); @@ -1069,7 +1069,7 @@ void _InputArray::getMatVector(vector& mv) const if( k == OCL_MAT ) { - CV_Error(-1, "Not implemented"); + CV_Error(CV_StsNotImplemented, "This method is not implemented for oclMat yet"); } CV_Assert( k == STD_VECTOR_MAT ); @@ -1201,7 +1201,7 @@ Size _InputArray::size(int i) const if( k == OCL_MAT ) { - CV_Error(-1, "Not implemented"); + CV_Error(CV_StsNotImplemented, "This method is not implemented for oclMat yet"); } CV_Assert( k == GPU_MAT ); @@ -1320,7 +1320,7 @@ bool _InputArray::empty() const if( k == OCL_MAT ) { - CV_Error(-1, "Not implemented"); + CV_Error(CV_StsNotImplemented, "This method is not implemented for oclMat yet"); } CV_Assert( k == GPU_MAT ); @@ -1545,7 +1545,7 @@ void _OutputArray::create(int dims, const int* sizes, int mtype, int i, bool all if( k == OCL_MAT ) { - CV_Error(-1, "Not implemented"); + CV_Error(CV_StsNotImplemented, "This method is not implemented for oclMat yet"); } if( k == NONE ) @@ -1661,7 +1661,7 @@ void _OutputArray::release() const if( k == OCL_MAT ) { - CV_Error(-1, "Not implemented"); + CV_Error(CV_StsNotImplemented, "This method is not implemented for oclMat yet"); } CV_Assert( k == STD_VECTOR_MAT ); diff --git a/modules/ocl/include/opencv2/ocl/ocl.hpp b/modules/ocl/include/opencv2/ocl/ocl.hpp index 9fdd8f3..ed887e6 100644 --- a/modules/ocl/include/opencv2/ocl/ocl.hpp +++ b/modules/ocl/include/opencv2/ocl/ocl.hpp @@ -392,9 +392,9 @@ namespace cv int wholecols; }; - // convert InputArray/OutputArray to oclMat - CV_EXPORTS oclMat& getOclMat(InputArray src); - CV_EXPORTS oclMat& getOclMat(OutputArray src); + // convert InputArray/OutputArray to oclMat references + CV_EXPORTS oclMat& getOclMatRef(InputArray src); + CV_EXPORTS oclMat& getOclMatRef(OutputArray src); ///////////////////// mat split and merge ///////////////////////////////// //! Compose a multi-channel array from several single-channel arrays diff --git a/modules/ocl/src/matrix_operations.cpp b/modules/ocl/src/matrix_operations.cpp index dc7deeb..dcaf041 100644 --- a/modules/ocl/src/matrix_operations.cpp +++ b/modules/ocl/src/matrix_operations.cpp @@ -244,13 +244,13 @@ cv::ocl::oclMat::operator cv::_OutputArray() return newOutputArray; } -cv::ocl::oclMat& cv::ocl::getOclMat(InputArray src) +cv::ocl::oclMat& cv::ocl::getOclMatRef(InputArray src) { CV_Assert(src.flags & cv::_InputArray::OCL_MAT); return *reinterpret_cast(src.obj); } -cv::ocl::oclMat& cv::ocl::getOclMat(OutputArray src) +cv::ocl::oclMat& cv::ocl::getOclMatRef(OutputArray src) { CV_Assert(src.flags & cv::_InputArray::OCL_MAT); return *reinterpret_cast(src.obj); -- 2.7.4