core: apply CV_OVERRIDE/CV_FINAL

pull/11093/head
Alexander Alekhin 7 years ago
parent 0587f92d96
commit 9111538bfb
  1. 2
      modules/core/include/opencv2/core.hpp
  2. 4
      modules/core/include/opencv2/core/private.hpp
  3. 4
      modules/core/include/opencv2/core/ptr.inl.hpp
  4. 9
      modules/core/include/opencv2/core/utility.hpp
  5. 2
      modules/core/src/batch_distance.cpp
  6. 8
      modules/core/src/bufferpool.impl.hpp
  7. 12
      modules/core/src/conjugate_gradient.cpp
  8. 16
      modules/core/src/downhill_simplex.cpp
  9. 24
      modules/core/src/dxt.cpp
  10. 4
      modules/core/src/kmeans.cpp
  11. 2
      modules/core/src/lut.cpp
  12. 8
      modules/core/src/matrix.cpp
  13. 86
      modules/core/src/matrix_expressions.cpp
  14. 36
      modules/core/src/ocl.cpp
  15. 36
      modules/core/src/out.cpp
  16. 2
      modules/core/src/parallel.cpp
  17. 8
      modules/core/src/trace.cpp

@ -124,7 +124,7 @@ public:
/*!
\return the error description and the context as a text string.
*/
virtual const char *what() const throw();
virtual const char *what() const throw() CV_OVERRIDE;
void formatMessage();
String msg; ///< the formatted error message

@ -165,6 +165,8 @@ template <typename T>
T* allocSingleton(size_t count) { return static_cast<T*>(fastMalloc(sizeof(T) * count)); }
}
#if 1 // TODO: Remove in OpenCV 4.x
// property implementation macros
#define CV_IMPL_PROPERTY_RO(type, name, member) \
@ -187,6 +189,8 @@ T* allocSingleton(size_t count) { return static_cast<T*>(fastMalloc(sizeof(T) *
#define CV_WRAP_SAME_PROPERTY(type, name, internal_obj) CV_WRAP_PROPERTY(type, name, name, internal_obj)
#define CV_WRAP_SAME_PROPERTY_S(type, name, internal_obj) CV_WRAP_PROPERTY_S(type, name, name, internal_obj)
#endif
/****************************************************************************************\
* Structures and macros for integration with IPP *
\****************************************************************************************/

@ -89,12 +89,12 @@ private:
};
template<typename Y, typename D>
struct PtrOwnerImpl : PtrOwner
struct PtrOwnerImpl CV_FINAL : PtrOwner
{
PtrOwnerImpl(Y* p, D d) : owned(p), deleter(d)
{}
void deleteSelf()
void deleteSelf() CV_OVERRIDE
{
deleter(owned);
delete this;

@ -524,7 +524,7 @@ public:
m_functor(functor)
{ }
virtual void operator() (const cv::Range& range) const
virtual void operator() (const cv::Range& range) const CV_OVERRIDE
{
m_functor(range);
}
@ -558,7 +558,8 @@ void Mat::forEach_impl(const Functor& operation) {
virtual ~PixelOperationWrapper(){}
// ! Overloaded virtual operator
// convert range call to row call.
virtual void operator()(const Range &range) const {
virtual void operator()(const Range &range) const CV_OVERRIDE
{
const int DIMS = mat->dims;
const int COLS = mat->size[DIMS - 1];
if (DIMS <= 2) {
@ -711,8 +712,8 @@ public:
inline void cleanup() { TLSDataContainer::cleanup(); }
private:
virtual void* createDataInstance() const {return new T;} // Wrapper to allocate data by template
virtual void deleteDataInstance(void* pData) const {delete (T*)pData;} // Wrapper to release data by template
virtual void* createDataInstance() const CV_OVERRIDE {return new T;} // Wrapper to allocate data by template
virtual void deleteDataInstance(void* pData) const CV_OVERRIDE {delete (T*)pData;} // Wrapper to release data by template
// Disable TLS copy operations
TLSData(TLSData &) {}

@ -176,7 +176,7 @@ struct BatchDistInvoker : public ParallelLoopBody
func = _func;
}
void operator()(const Range& range) const
void operator()(const Range& range) const CV_OVERRIDE
{
AutoBuffer<int> buf(src2->rows);
int* bufptr = buf;

@ -17,10 +17,10 @@ public:
DummyBufferPoolController() { }
virtual ~DummyBufferPoolController() { }
virtual size_t getReservedSize() const { return (size_t)-1; }
virtual size_t getMaxReservedSize() const { return (size_t)-1; }
virtual void setMaxReservedSize(size_t size) { (void)size; }
virtual void freeAllReservedBuffers() { }
virtual size_t getReservedSize() const CV_OVERRIDE { return (size_t)-1; }
virtual size_t getMaxReservedSize() const CV_OVERRIDE { return (size_t)-1; }
virtual void setMaxReservedSize(size_t size) CV_OVERRIDE { (void)size; }
virtual void freeAllReservedBuffers() CV_OVERRIDE { }
};
} // namespace

@ -68,15 +68,15 @@ namespace cv
#define SEC_METHOD_ITERATIONS 4
#define INITIAL_SEC_METHOD_SIGMA 0.1
class ConjGradSolverImpl : public ConjGradSolver
class ConjGradSolverImpl CV_FINAL : public ConjGradSolver
{
public:
Ptr<Function> getFunction() const;
void setFunction(const Ptr<Function>& f);
TermCriteria getTermCriteria() const;
Ptr<Function> getFunction() const CV_OVERRIDE;
void setFunction(const Ptr<Function>& f) CV_OVERRIDE;
TermCriteria getTermCriteria() const CV_OVERRIDE;
ConjGradSolverImpl();
void setTermCriteria(const TermCriteria& termcrit);
double minimize(InputOutputArray x);
void setTermCriteria(const TermCriteria& termcrit) CV_OVERRIDE;
double minimize(InputOutputArray x) CV_OVERRIDE;
protected:
Ptr<MinProblemSolver::Function> _Function;
TermCriteria _termcrit;

@ -140,7 +140,7 @@ multiple lines in three dimensions as not all lines intersect in three dimension
namespace cv
{
class DownhillSolverImpl : public DownhillSolver
class DownhillSolverImpl CV_FINAL : public DownhillSolver
{
public:
DownhillSolverImpl()
@ -149,8 +149,8 @@ public:
_step=Mat_<double>();
}
void getInitStep(OutputArray step) const { _step.copyTo(step); }
void setInitStep(InputArray step)
void getInitStep(OutputArray step) const CV_OVERRIDE { _step.copyTo(step); }
void setInitStep(InputArray step) CV_OVERRIDE
{
// set dimensionality and make a deep copy of step
Mat m = step.getMat();
@ -161,13 +161,13 @@ public:
transpose(m, _step);
}
Ptr<MinProblemSolver::Function> getFunction() const { return _Function; }
Ptr<MinProblemSolver::Function> getFunction() const CV_OVERRIDE { return _Function; }
void setFunction(const Ptr<Function>& f) { _Function=f; }
void setFunction(const Ptr<Function>& f) CV_OVERRIDE { _Function=f; }
TermCriteria getTermCriteria() const { return _termcrit; }
TermCriteria getTermCriteria() const CV_OVERRIDE { return _termcrit; }
void setTermCriteria( const TermCriteria& termcrit )
void setTermCriteria( const TermCriteria& termcrit ) CV_OVERRIDE
{
CV_Assert( termcrit.type == (TermCriteria::MAX_ITER + TermCriteria::EPS) &&
termcrit.epsilon > 0 &&
@ -175,7 +175,7 @@ public:
_termcrit=termcrit;
}
double minimize( InputOutputArray x_ )
double minimize( InputOutputArray x_ ) CV_OVERRIDE
{
dprintf(("hi from minimize\n"));
CV_Assert( !_Function.empty() );

@ -1562,7 +1562,7 @@ public:
*ok = true;
}
virtual void operator()(const Range& range) const
virtual void operator()(const Range& range) const CV_OVERRIDE
{
IppStatus status;
Ipp8u* pBuffer = 0;
@ -1643,7 +1643,7 @@ public:
*ok = true;
}
virtual void operator()(const Range& range) const
virtual void operator()(const Range& range) const CV_OVERRIDE
{
IppStatus status;
Ipp8u* pBuffer = 0;
@ -2607,7 +2607,7 @@ inline DftDims determineDims(int rows, int cols, bool isRowWise, bool isContinuo
return InvalidDim;
}
class OcvDftImpl : public hal::DFT2D
class OcvDftImpl CV_FINAL : public hal::DFT2D
{
protected:
Ptr<hal::DFT1D> contextA;
@ -2779,7 +2779,7 @@ public:
}
}
void apply(const uchar * src, size_t src_step, uchar * dst, size_t dst_step)
void apply(const uchar * src, size_t src_step, uchar * dst, size_t dst_step) CV_OVERRIDE
{
#if defined USE_IPP_DFT
if (useIpp)
@ -3039,7 +3039,7 @@ protected:
}
};
class OcvDftBasicImpl : public hal::DFT1D
class OcvDftBasicImpl CV_FINAL : public hal::DFT1D
{
public:
OcvDftOptions opt;
@ -3194,7 +3194,7 @@ public:
}
}
void apply(const uchar *src, uchar *dst)
void apply(const uchar *src, uchar *dst) CV_OVERRIDE
{
opt.dft_func(opt, src, dst);
}
@ -3214,7 +3214,7 @@ struct ReplacementDFT1D : public hal::DFT1D
isInitialized = (res == CV_HAL_ERROR_OK);
return isInitialized;
}
void apply(const uchar *src, uchar *dst)
void apply(const uchar *src, uchar *dst) CV_OVERRIDE
{
if (isInitialized)
{
@ -3244,7 +3244,7 @@ struct ReplacementDFT2D : public hal::DFT2D
isInitialized = (res == CV_HAL_ERROR_OK);
return isInitialized;
}
void apply(const uchar *src, size_t src_step, uchar *dst, size_t dst_step)
void apply(const uchar *src, size_t src_step, uchar *dst, size_t dst_step) CV_OVERRIDE
{
if (isInitialized)
{
@ -3809,7 +3809,7 @@ public:
*ok = true;
}
virtual void operator()(const Range& range) const
virtual void operator()(const Range& range) const CV_OVERRIDE
{
if(*ok == false)
return;
@ -4048,7 +4048,7 @@ static bool ippi_DCT_32f(const uchar * src, size_t src_step, uchar * dst, size_t
namespace cv {
class OcvDctImpl : public hal::DCT2D
class OcvDctImpl CV_FINAL : public hal::DCT2D
{
public:
OcvDftOptions opt;
@ -4100,7 +4100,7 @@ public:
end_stage = 1;
}
}
void apply(const uchar *src, size_t src_step, uchar *dst, size_t dst_step)
void apply(const uchar *src, size_t src_step, uchar *dst, size_t dst_step) CV_OVERRIDE
{
CV_IPP_RUN(IPP_VERSION_X100 >= 700 && depth == CV_32F, ippi_DCT_32f(src, src_step, dst, dst_step, width, height, isInverse, isRowTransform))
@ -4196,7 +4196,7 @@ struct ReplacementDCT2D : public hal::DCT2D
isInitialized = (res == CV_HAL_ERROR_OK);
return isInitialized;
}
void apply(const uchar *src_data, size_t src_step, uchar *dst_data, size_t dst_step)
void apply(const uchar *src_data, size_t src_step, uchar *dst_data, size_t dst_step) CV_OVERRIDE
{
if (isInitialized)
{

@ -65,7 +65,7 @@ public:
tdist2(tdist2_), data(data_), dist(dist_), ci(ci_)
{ }
void operator()( const cv::Range& range ) const
void operator()( const cv::Range& range ) const CV_OVERRIDE
{
CV_TRACE_FUNCTION();
const int begin = range.start;
@ -171,7 +171,7 @@ public:
{
}
void operator()( const Range& range ) const
void operator()(const Range& range) const CV_OVERRIDE
{
CV_TRACE_FUNCTION();
const int begin = range.start;

@ -328,7 +328,7 @@ public:
*ok = (func != NULL);
}
void operator()( const cv::Range& range ) const
void operator()( const cv::Range& range ) const CV_OVERRIDE
{
CV_DbgAssert(*ok);

@ -123,11 +123,11 @@ BufferPoolController* MatAllocator::getBufferPoolController(const char* id) cons
return &dummy;
}
class StdMatAllocator : public MatAllocator
class StdMatAllocator CV_FINAL : public MatAllocator
{
public:
UMatData* allocate(int dims, const int* sizes, int type,
void* data0, size_t* step, int /*flags*/, UMatUsageFlags /*usageFlags*/) const
void* data0, size_t* step, int /*flags*/, UMatUsageFlags /*usageFlags*/) const CV_OVERRIDE
{
size_t total = CV_ELEM_SIZE(type);
for( int i = dims-1; i >= 0; i-- )
@ -154,13 +154,13 @@ public:
return u;
}
bool allocate(UMatData* u, int /*accessFlags*/, UMatUsageFlags /*usageFlags*/) const
bool allocate(UMatData* u, int /*accessFlags*/, UMatUsageFlags /*usageFlags*/) const CV_OVERRIDE
{
if(!u) return false;
return true;
}
void deallocate(UMatData* u) const
void deallocate(UMatData* u) const CV_OVERRIDE
{
if(!u)
return;

@ -14,53 +14,53 @@
namespace cv
{
class MatOp_Identity : public MatOp
class MatOp_Identity CV_FINAL : public MatOp
{
public:
MatOp_Identity() {}
virtual ~MatOp_Identity() {}
bool elementWise(const MatExpr& /*expr*/) const { return true; }
void assign(const MatExpr& expr, Mat& m, int type=-1) const;
bool elementWise(const MatExpr& /*expr*/) const CV_OVERRIDE { return true; }
void assign(const MatExpr& expr, Mat& m, int type=-1) const CV_OVERRIDE;
static void makeExpr(MatExpr& res, const Mat& m);
};
static MatOp_Identity g_MatOp_Identity;
class MatOp_AddEx : public MatOp
class MatOp_AddEx CV_FINAL : public MatOp
{
public:
MatOp_AddEx() {}
virtual ~MatOp_AddEx() {}
bool elementWise(const MatExpr& /*expr*/) const { return true; }
void assign(const MatExpr& expr, Mat& m, int type=-1) const;
bool elementWise(const MatExpr& /*expr*/) const CV_OVERRIDE { return true; }
void assign(const MatExpr& expr, Mat& m, int type=-1) const CV_OVERRIDE;
void add(const MatExpr& e1, const Scalar& s, MatExpr& res) const;
void subtract(const Scalar& s, const MatExpr& expr, MatExpr& res) const;
void multiply(const MatExpr& e1, double s, MatExpr& res) const;
void divide(double s, const MatExpr& e, MatExpr& res) const;
void add(const MatExpr& e1, const Scalar& s, MatExpr& res) const CV_OVERRIDE;
void subtract(const Scalar& s, const MatExpr& expr, MatExpr& res) const CV_OVERRIDE;
void multiply(const MatExpr& e1, double s, MatExpr& res) const CV_OVERRIDE;
void divide(double s, const MatExpr& e, MatExpr& res) const CV_OVERRIDE;
void transpose(const MatExpr& e1, MatExpr& res) const;
void abs(const MatExpr& expr, MatExpr& res) const;
void transpose(const MatExpr& e1, MatExpr& res) const CV_OVERRIDE;
void abs(const MatExpr& expr, MatExpr& res) const CV_OVERRIDE;
static void makeExpr(MatExpr& res, const Mat& a, const Mat& b, double alpha, double beta, const Scalar& s=Scalar());
};
static MatOp_AddEx g_MatOp_AddEx;
class MatOp_Bin : public MatOp
class MatOp_Bin CV_FINAL : public MatOp
{
public:
MatOp_Bin() {}
virtual ~MatOp_Bin() {}
bool elementWise(const MatExpr& /*expr*/) const { return true; }
void assign(const MatExpr& expr, Mat& m, int type=-1) const;
bool elementWise(const MatExpr& /*expr*/) const CV_OVERRIDE { return true; }
void assign(const MatExpr& expr, Mat& m, int type=-1) const CV_OVERRIDE;
void multiply(const MatExpr& e1, double s, MatExpr& res) const;
void divide(double s, const MatExpr& e, MatExpr& res) const;
void multiply(const MatExpr& e1, double s, MatExpr& res) const CV_OVERRIDE;
void divide(double s, const MatExpr& e, MatExpr& res) const CV_OVERRIDE;
static void makeExpr(MatExpr& res, char op, const Mat& a, const Mat& b, double scale=1);
static void makeExpr(MatExpr& res, char op, const Mat& a, const Scalar& s);
@ -68,14 +68,14 @@ public:
static MatOp_Bin g_MatOp_Bin;
class MatOp_Cmp : public MatOp
class MatOp_Cmp CV_FINAL : public MatOp
{
public:
MatOp_Cmp() {}
virtual ~MatOp_Cmp() {}
bool elementWise(const MatExpr& /*expr*/) const { return true; }
void assign(const MatExpr& expr, Mat& m, int type=-1) const;
bool elementWise(const MatExpr& /*expr*/) const CV_OVERRIDE { return true; }
void assign(const MatExpr& expr, Mat& m, int type=-1) const CV_OVERRIDE;
static void makeExpr(MatExpr& res, int cmpop, const Mat& a, const Mat& b);
static void makeExpr(MatExpr& res, int cmpop, const Mat& a, double alpha);
@ -83,20 +83,20 @@ public:
static MatOp_Cmp g_MatOp_Cmp;
class MatOp_GEMM : public MatOp
class MatOp_GEMM CV_FINAL : public MatOp
{
public:
MatOp_GEMM() {}
virtual ~MatOp_GEMM() {}
bool elementWise(const MatExpr& /*expr*/) const { return false; }
void assign(const MatExpr& expr, Mat& m, int type=-1) const;
bool elementWise(const MatExpr& /*expr*/) const CV_OVERRIDE { return false; }
void assign(const MatExpr& expr, Mat& m, int type=-1) const CV_OVERRIDE;
void add(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const;
void subtract(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const;
void multiply(const MatExpr& e, double s, MatExpr& res) const;
void add(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const CV_OVERRIDE;
void subtract(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const CV_OVERRIDE;
void multiply(const MatExpr& e, double s, MatExpr& res) const CV_OVERRIDE;
void transpose(const MatExpr& expr, MatExpr& res) const;
void transpose(const MatExpr& expr, MatExpr& res) const CV_OVERRIDE;
static void makeExpr(MatExpr& res, int flags, const Mat& a, const Mat& b,
double alpha=1, const Mat& c=Mat(), double beta=1);
@ -104,63 +104,63 @@ public:
static MatOp_GEMM g_MatOp_GEMM;
class MatOp_Invert : public MatOp
class MatOp_Invert CV_FINAL : public MatOp
{
public:
MatOp_Invert() {}
virtual ~MatOp_Invert() {}
bool elementWise(const MatExpr& /*expr*/) const { return false; }
void assign(const MatExpr& expr, Mat& m, int type=-1) const;
bool elementWise(const MatExpr& /*expr*/) const CV_OVERRIDE { return false; }
void assign(const MatExpr& expr, Mat& m, int type=-1) const CV_OVERRIDE;
void matmul(const MatExpr& expr1, const MatExpr& expr2, MatExpr& res) const;
void matmul(const MatExpr& expr1, const MatExpr& expr2, MatExpr& res) const CV_OVERRIDE;
static void makeExpr(MatExpr& res, int method, const Mat& m);
};
static MatOp_Invert g_MatOp_Invert;
class MatOp_T : public MatOp
class MatOp_T CV_FINAL : public MatOp
{
public:
MatOp_T() {}
virtual ~MatOp_T() {}
bool elementWise(const MatExpr& /*expr*/) const { return false; }
void assign(const MatExpr& expr, Mat& m, int type=-1) const;
bool elementWise(const MatExpr& /*expr*/) const CV_OVERRIDE { return false; }
void assign(const MatExpr& expr, Mat& m, int type=-1) const CV_OVERRIDE;
void multiply(const MatExpr& e1, double s, MatExpr& res) const;
void transpose(const MatExpr& expr, MatExpr& res) const;
void multiply(const MatExpr& e1, double s, MatExpr& res) const CV_OVERRIDE;
void transpose(const MatExpr& expr, MatExpr& res) const CV_OVERRIDE;
static void makeExpr(MatExpr& res, const Mat& a, double alpha=1);
};
static MatOp_T g_MatOp_T;
class MatOp_Solve : public MatOp
class MatOp_Solve CV_FINAL : public MatOp
{
public:
MatOp_Solve() {}
virtual ~MatOp_Solve() {}
bool elementWise(const MatExpr& /*expr*/) const { return false; }
void assign(const MatExpr& expr, Mat& m, int type=-1) const;
bool elementWise(const MatExpr& /*expr*/) const CV_OVERRIDE { return false; }
void assign(const MatExpr& expr, Mat& m, int type=-1) const CV_OVERRIDE;
static void makeExpr(MatExpr& res, int method, const Mat& a, const Mat& b);
};
static MatOp_Solve g_MatOp_Solve;
class MatOp_Initializer : public MatOp
class MatOp_Initializer CV_FINAL : public MatOp
{
public:
MatOp_Initializer() {}
virtual ~MatOp_Initializer() {}
bool elementWise(const MatExpr& /*expr*/) const { return false; }
void assign(const MatExpr& expr, Mat& m, int type=-1) const;
bool elementWise(const MatExpr& /*expr*/) const CV_OVERRIDE { return false; }
void assign(const MatExpr& expr, Mat& m, int type=-1) const CV_OVERRIDE;
void multiply(const MatExpr& e, double s, MatExpr& res) const;
void multiply(const MatExpr& e, double s, MatExpr& res) const CV_OVERRIDE;
static void makeExpr(MatExpr& res, int method, Size sz, int type, double alpha=1);
static void makeExpr(MatExpr& res, int method, int ndims, const int* sizes, int type, double alpha=1);

@ -4178,7 +4178,7 @@ public:
CV_Assert(reservedEntries_.empty());
}
public:
virtual T allocate(size_t size)
virtual T allocate(size_t size) CV_OVERRIDE
{
AutoLock locker(mutex_);
BufferEntry entry;
@ -4193,7 +4193,7 @@ public:
}
return entry.clBuffer_;
}
virtual void release(T buffer)
virtual void release(T buffer) CV_OVERRIDE
{
AutoLock locker(mutex_);
BufferEntry entry;
@ -4210,9 +4210,9 @@ public:
}
}
virtual size_t getReservedSize() const { return currentReservedSize; }
virtual size_t getMaxReservedSize() const { return maxReservedSize; }
virtual void setMaxReservedSize(size_t size)
virtual size_t getReservedSize() const CV_OVERRIDE { return currentReservedSize; }
virtual size_t getMaxReservedSize() const CV_OVERRIDE { return maxReservedSize; }
virtual void setMaxReservedSize(size_t size) CV_OVERRIDE
{
AutoLock locker(mutex_);
size_t oldMaxReservedSize = maxReservedSize;
@ -4236,7 +4236,7 @@ public:
_checkSizeOfReservedEntries();
}
}
virtual void freeAllReservedBuffers()
virtual void freeAllReservedBuffers() CV_OVERRIDE
{
AutoLock locker(mutex_);
typename std::list<BufferEntry>::const_iterator i = reservedEntries_.begin();
@ -4257,7 +4257,7 @@ struct CLBufferEntry
CLBufferEntry() : clBuffer_((cl_mem)NULL), capacity_(0) { }
};
class OpenCLBufferPoolImpl : public OpenCLBufferPoolBaseImpl<OpenCLBufferPoolImpl, CLBufferEntry, cl_mem>
class OpenCLBufferPoolImpl CV_FINAL : public OpenCLBufferPoolBaseImpl<OpenCLBufferPoolImpl, CLBufferEntry, cl_mem>
{
public:
typedef struct CLBufferEntry BufferEntry;
@ -4303,7 +4303,7 @@ struct CLSVMBufferEntry
size_t capacity_;
CLSVMBufferEntry() : clBuffer_(NULL), capacity_(0) { }
};
class OpenCLSVMBufferPoolImpl : public OpenCLBufferPoolBaseImpl<OpenCLSVMBufferPoolImpl, CLSVMBufferEntry, void*>
class OpenCLSVMBufferPoolImpl CV_FINAL : public OpenCLBufferPoolBaseImpl<OpenCLSVMBufferPoolImpl, CLSVMBufferEntry, void*>
{
public:
typedef struct CLSVMBufferEntry BufferEntry;
@ -4465,7 +4465,7 @@ private:
#define CV_OPENCL_DATA_PTR_ALIGNMENT 16
#endif
class OpenCLAllocator : public MatAllocator
class OpenCLAllocator CV_FINAL : public MatAllocator
{
mutable OpenCLBufferPoolImpl bufferPool;
mutable OpenCLBufferPoolImpl bufferPoolHostPtr;
@ -4525,7 +4525,7 @@ public:
}
UMatData* allocate(int dims, const int* sizes, int type,
void* data, size_t* step, int flags, UMatUsageFlags usageFlags) const
void* data, size_t* step, int flags, UMatUsageFlags usageFlags) const CV_OVERRIDE
{
if(!useOpenCL())
return defaultAllocate(dims, sizes, type, data, step, flags, usageFlags);
@ -4589,7 +4589,7 @@ public:
return u;
}
bool allocate(UMatData* u, int accessFlags, UMatUsageFlags usageFlags) const
bool allocate(UMatData* u, int accessFlags, UMatUsageFlags usageFlags) const CV_OVERRIDE
{
if(!u)
return false;
@ -4721,7 +4721,7 @@ public:
}
}*/
void deallocate(UMatData* u) const
void deallocate(UMatData* u) const CV_OVERRIDE
{
if(!u)
return;
@ -4905,7 +4905,7 @@ public:
}
// synchronized call (external UMatDataAutoLock, see UMat::getMat)
void map(UMatData* u, int accessFlags) const
void map(UMatData* u, int accessFlags) const CV_OVERRIDE
{
CV_Assert(u && u->handle);
@ -4988,7 +4988,7 @@ public:
}
}
void unmap(UMatData* u) const
void unmap(UMatData* u) const CV_OVERRIDE
{
if(!u)
return;
@ -5133,7 +5133,7 @@ public:
void download(UMatData* u, void* dstptr, int dims, const size_t sz[],
const size_t srcofs[], const size_t srcstep[],
const size_t dststep[]) const
const size_t dststep[]) const CV_OVERRIDE
{
if(!u)
return;
@ -5256,7 +5256,7 @@ public:
void upload(UMatData* u, const void* srcptr, int dims, const size_t sz[],
const size_t dstofs[], const size_t dststep[],
const size_t srcstep[]) const
const size_t srcstep[]) const CV_OVERRIDE
{
if(!u)
return;
@ -5408,7 +5408,7 @@ public:
void copy(UMatData* src, UMatData* dst, int dims, const size_t sz[],
const size_t srcofs[], const size_t srcstep[],
const size_t dstofs[], const size_t dststep[], bool _sync) const
const size_t dstofs[], const size_t dststep[], bool _sync) const CV_OVERRIDE
{
if(!src || !dst)
return;
@ -5596,7 +5596,7 @@ public:
}
}
BufferPoolController* getBufferPoolController(const char* id) const {
BufferPoolController* getBufferPoolController(const char* id) const CV_OVERRIDE {
#ifdef HAVE_OPENCL_SVM
if ((svm::checkForceSVMUmatUsage() && (id == NULL || strcmp(id, "OCL") == 0)) || (id != NULL && strcmp(id, "SVM") == 0))
{

@ -45,7 +45,7 @@
namespace cv
{
class FormattedImpl : public Formatted
class FormattedImpl CV_FINAL : public Formatted
{
enum { STATE_PROLOGUE, STATE_EPILOGUE, STATE_INTERLUDE,
STATE_ROW_OPEN, STATE_ROW_CLOSE, STATE_CN_OPEN, STATE_CN_CLOSE, STATE_VALUE, STATE_FINISHED,
@ -119,12 +119,12 @@ namespace cv
}
}
void reset()
void reset() CV_OVERRIDE
{
state = STATE_PROLOGUE;
}
const char* next()
const char* next() CV_OVERRIDE
{
switch(state)
{
@ -258,17 +258,17 @@ namespace cv
public:
FormatterBase() : prec32f(8), prec64f(16), multiline(true) {}
void set32fPrecision(int p)
void set32fPrecision(int p) CV_OVERRIDE
{
prec32f = p;
}
void set64fPrecision(int p)
void set64fPrecision(int p) CV_OVERRIDE
{
prec64f = p;
}
void setMultiline(bool ml)
void setMultiline(bool ml) CV_OVERRIDE
{
multiline = ml;
}
@ -279,11 +279,11 @@ namespace cv
int multiline;
};
class DefaultFormatter : public FormatterBase
class DefaultFormatter CV_FINAL : public FormatterBase
{
public:
Ptr<Formatted> format(const Mat& mtx) const
Ptr<Formatted> format(const Mat& mtx) const CV_OVERRIDE
{
char braces[5] = {'\0', '\0', ';', '\0', '\0'};
return makePtr<FormattedImpl>("[", "]", mtx, &*braces,
@ -291,11 +291,11 @@ namespace cv
}
};
class MatlabFormatter : public FormatterBase
class MatlabFormatter CV_FINAL : public FormatterBase
{
public:
Ptr<Formatted> format(const Mat& mtx) const
Ptr<Formatted> format(const Mat& mtx) const CV_OVERRIDE
{
char braces[5] = {'\0', '\0', ';', '\0', '\0'};
return makePtr<FormattedImpl>("", "", mtx, &*braces,
@ -303,11 +303,11 @@ namespace cv
}
};
class PythonFormatter : public FormatterBase
class PythonFormatter CV_FINAL : public FormatterBase
{
public:
Ptr<Formatted> format(const Mat& mtx) const
Ptr<Formatted> format(const Mat& mtx) const CV_OVERRIDE
{
char braces[5] = {'[', ']', ',', '[', ']'};
if (mtx.cols == 1)
@ -317,11 +317,11 @@ namespace cv
}
};
class NumpyFormatter : public FormatterBase
class NumpyFormatter CV_FINAL : public FormatterBase
{
public:
Ptr<Formatted> format(const Mat& mtx) const
Ptr<Formatted> format(const Mat& mtx) const CV_OVERRIDE
{
static const char* numpyTypes[] =
{
@ -336,11 +336,11 @@ namespace cv
}
};
class CSVFormatter : public FormatterBase
class CSVFormatter CV_FINAL : public FormatterBase
{
public:
Ptr<Formatted> format(const Mat& mtx) const
Ptr<Formatted> format(const Mat& mtx) const CV_OVERRIDE
{
char braces[5] = {'\0', '\0', '\0', '\0', '\0'};
return makePtr<FormattedImpl>(String(),
@ -349,11 +349,11 @@ namespace cv
}
};
class CFormatter : public FormatterBase
class CFormatter CV_FINAL : public FormatterBase
{
public:
Ptr<Formatted> format(const Mat& mtx) const
Ptr<Formatted> format(const Mat& mtx) const CV_OVERRIDE
{
char braces[5] = {'\0', '\0', ',', '\0', '\0'};
return makePtr<FormattedImpl>("{", "}", mtx, &*braces,

@ -238,7 +238,7 @@ namespace
~ParallelLoopBodyWrapper()
{
}
void operator()(const cv::Range& sr) const
void operator()(const cv::Range& sr) const CV_OVERRIDE
{
#ifdef OPENCV_TRACE
// TODO CV_TRACE_NS::details::setCurrentRegion(rootRegion);

@ -726,7 +726,7 @@ void TraceManagerThreadLocal::dumpStack(std::ostream& out, bool onlyFunctions) c
out << ss.str();
}
class AsyncTraceStorage : public TraceStorage
class AsyncTraceStorage CV_FINAL : public TraceStorage
{
mutable std::ofstream out;
public:
@ -744,7 +744,7 @@ public:
out.close();
}
bool put(const TraceMessage& msg) const
bool put(const TraceMessage& msg) const CV_OVERRIDE
{
if (msg.hasError)
return false;
@ -754,7 +754,7 @@ public:
}
};
class SyncTraceStorage : public TraceStorage
class SyncTraceStorage CV_FINAL : public TraceStorage
{
mutable std::ofstream out;
mutable cv::Mutex mutex;
@ -774,7 +774,7 @@ public:
out.close();
}
bool put(const TraceMessage& msg) const
bool put(const TraceMessage& msg) const CV_OVERRIDE
{
if (msg.hasError)
return false;

Loading…
Cancel
Save