Merge pull request #1866 from ilya-lavrenov:ocl_fix2

This commit is contained in:
Andrey Pavlenko
2013-11-26 23:27:48 +04:00
committed by OpenCV Buildbot
6 changed files with 109 additions and 88 deletions

View File

@@ -2340,31 +2340,6 @@ CV_EXPORTS MatExpr max(double s, const Mat& a);
CV_EXPORTS MatExpr abs(const Mat& m);
CV_EXPORTS MatExpr abs(const MatExpr& e);
namespace traits {
template <typename T>
struct GetMatForRead
{
};
template <>
struct GetMatForRead<Mat>
{
static const Mat get(const Mat& m) { return m; }
};
template <>
struct GetMatForRead<UMat>
{
static const Mat get(const UMat& m) { return m.getMat(ACCESS_READ); }
};
} // namespace traits
template <typename T>
const Mat getMatForRead(const T& mat)
{
return traits::GetMatForRead<T>::get(mat);
}
} // cv
#include "opencv2/core/mat.inl.hpp"