#ifndef _TBB_ITT_NOTIFY
#define _TBB_ITT_NOTIFY
#include "tbb/tbb_stddef.h"
#if DO_ITT_NOTIFY
#if _WIN32||_WIN64
#ifndef UNICODE
#define UNICODE
#endif
#endif
#ifndef INTEL_ITTNOTIFY_API_PRIVATE
#define INTEL_ITTNOTIFY_API_PRIVATE
#endif
#include "tools_api/ittnotify.h"
#include "tools_api/legacy/ittnotify.h"
#if _WIN32||_WIN64
#undef _T
#undef __itt_event_create
#define __itt_event_create __itt_event_createA
#endif
#endif
#if !ITT_CALLER_NULL
#define ITT_CALLER_NULL ((__itt_caller)0)
#endif
namespace tbb {
#if (_WIN32||_WIN64) && !__MINGW32__
typedef wchar_t tchar;
#define _T(string_literal) L ## string_literal
#else
typedef char tchar;
#define _T(string_literal) string_literal
#endif
}
#if DO_ITT_NOTIFY
namespace tbb {
extern const tchar
*SyncType_GlobalLock,
*SyncType_Scheduler;
extern const tchar
*SyncObj_SchedulerInitialization,
*SyncObj_SchedulersList,
*SyncObj_WorkerLifeCycleMgmt,
*SyncObj_TaskStealingLoop,
*SyncObj_WorkerTaskPool,
*SyncObj_MasterTaskPool,
*SyncObj_TaskPoolSpinning,
*SyncObj_Mailbox,
*SyncObj_TaskReturnList,
*SyncObj_TaskStream,
*SyncObj_ContextsList
;
namespace internal {
void __TBB_EXPORTED_FUNC itt_set_sync_name_v3( void* obj, const tchar* name);
}
}
#define ITT_NOTIFY(name,obj) __itt_notify_##name(const_cast<void*>(static_cast<volatile void*>(obj)))
#define ITT_THREAD_SET_NAME(name) __itt_thread_set_name(name)
#define ITT_SYNC_CREATE(obj, type, name) __itt_sync_create((void*)(obj), type, name, 2)
#define ITT_SYNC_RENAME(obj, name) __itt_sync_rename(obj, name)
#define ITT_STACK_CREATE(obj) obj = __itt_stack_caller_create()
#if __TBB_TASK_GROUP_CONTEXT
#define ITT_STACK(precond, name, obj) (precond) ? __itt_stack_##name(obj) : ((void)0);
#else
#define ITT_STACK(precond, name, obj) ((void)0)
#endif
#else
#define ITT_NOTIFY(name,obj) ((void)0)
#define ITT_THREAD_SET_NAME(name) ((void)0)
#define ITT_SYNC_CREATE(obj, type, name) ((void)0)
#define ITT_SYNC_RENAME(obj, name) ((void)0)
#define ITT_STACK_CREATE(obj) ((void)0)
#define ITT_STACK(precond, name, obj) ((void)0)
#endif
namespace tbb {
namespace internal {
int __TBB_load_ittnotify();
}}
#endif