1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Merge remote-tracking branch 'upstream/3.4' into merge-3.4

This commit is contained in:
Alexander Alekhin
2019-12-12 13:02:19 +03:00
34 changed files with 1109 additions and 202 deletions
+11 -1
View File
@@ -1815,6 +1815,15 @@ BOOL WINAPI DllMain(HINSTANCE, DWORD fdwReason, LPVOID lpReserved)
namespace {
#ifdef OPENCV_WITH_ITT
bool overrideThreadName()
{
static bool param = utils::getConfigurationParameterBool("OPENCV_TRACE_ITT_SET_THREAD_NAME", false);
return param;
}
#endif
static int g_threadNum = 0;
class ThreadID {
public:
@@ -1823,7 +1832,8 @@ public:
id(CV_XADD(&g_threadNum, 1))
{
#ifdef OPENCV_WITH_ITT
__itt_thread_set_name(cv::format("OpenCVThread-%03d", id).c_str());
if (overrideThreadName())
__itt_thread_set_name(cv::format("OpenCVThread-%03d", id).c_str());
#endif
}
};