EstervQrCode 2.0.0
Library for qr code manipulation
Loading...
Searching...
No Matches
parallel_backend.hpp
1// This file is part of OpenCV project.
2// It is subject to the license terms in the LICENSE file found in the top-level directory
3// of this distribution and at http://opencv.org/license.html.
4
5#ifndef OPENCV_CORE_PARALLEL_BACKEND_HPP
6#define OPENCV_CORE_PARALLEL_BACKEND_HPP
7
8#include "opencv2/core/cvdef.h"
9#include <memory>
10
11namespace cv { namespace parallel {
12#ifndef CV_API_CALL
13#define CV_API_CALL
14#endif
15
57{
58public:
59 virtual ~ParallelForAPI();
60
61 typedef void (CV_API_CALL *FN_parallel_for_body_cb_t)(int start, int end, void* data);
62
63 virtual void parallel_for(int tasks, FN_parallel_for_body_cb_t body_callback, void* callback_data) = 0;
64
65 virtual int getThreadNum() const = 0;
66
67 virtual int getNumThreads() const = 0;
68
69 virtual int setNumThreads(int nThreads) = 0;
70
71 virtual const char* getName() const = 0;
72};
73
80CV_EXPORTS void setParallelForBackend(const std::shared_ptr<ParallelForAPI>& api, bool propagateNumThreads = true);
81
86CV_EXPORTS_W bool setParallelForBackend(const std::string& backendName, bool propagateNumThreads = true);
87
89}} // namespace
90#endif // OPENCV_CORE_PARALLEL_BACKEND_HPP
Definition parallel_backend.hpp:57
virtual int getThreadNum() const =0
virtual int getNumThreads() const =0
virtual void parallel_for(int tasks, FN_parallel_for_body_cb_t body_callback, void *callback_data)=0
virtual int setNumThreads(int nThreads)=0
virtual const char * getName() const =0
double double end
Definition core_c.h:1381
double start
Definition core_c.h:1381
void * data
Definition core_c.h:427
CV_EXPORTS void setParallelForBackend(const std::shared_ptr< ParallelForAPI > &api, bool propagateNumThreads=true)
Replace OpenCV parallel_for backend.
#define CV_EXPORTS
Definition cvdef.h:435
#define CV_EXPORTS_W
Definition cvdef.h:472
"black box" representation of the file storage associated with a file on disk.
Definition calib3d.hpp:441