1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Implementation detector and selector for IPP and OpenCL;

IPP can be switched on and off on runtime;

Optional implementation collector was added (switched off by default in CMake). Gathers data of implementation used in functions and report this info through performance TS;

TS modifications for implementations control;
This commit is contained in:
Pavel Vlasov
2014-10-03 15:17:28 +04:00
parent 83ef276697
commit 45958eaabc
49 changed files with 4279 additions and 2799 deletions
+14 -2
View File
@@ -233,13 +233,25 @@ void convertAndUnrollScalar( const Mat& sc, int buftype, uchar* scbuf, size_t bl
struct CoreTLSData
{
CoreTLSData() : device(0), useOpenCL(-1)
{}
CoreTLSData() : device(0), useOpenCL(-1), useIPP(-1), useCollection(false)
{
#ifdef CV_COLLECT_IMPL_DATA
implFlags = 0;
#endif
}
RNG rng;
int device;
ocl::Queue oclQueue;
int useOpenCL; // 1 - use, 0 - do not use, -1 - auto/not initialized
int useIPP; // 1 - use, 0 - do not use, -1 - auto/not initialized
bool useCollection; // enable/disable impl data collection
#ifdef CV_COLLECT_IMPL_DATA
int implFlags;
std::vector<int> implCode;
std::vector<String> implFun;
#endif
};
extern TLSData<CoreTLSData> coreTlsData;