Three minor changes in this patch:
- added UNLIKELY hint to few rarely executed branches;
- replaced couple of run time checks with debug assertions;
- moved check of presence of ittnotify tool from inside the function call.
These three changes incrementally improve library performance on SpecOMP2012 376.kdtree test to 1.5% in total
(used Intel 19 compiler + libomp on 2x24-core Intel CLX system).
clang-format: please reformat the code
-#define KMP_ITT_TASKWAIT_STARTING(obj) \ - if (UNLIKELY(__itt_sync_create_ptr)) { \ - obj = __kmp_itt_taskwait_object(gtid); \ - if (obj != NULL) { \ - __kmp_itt_taskwait_starting(gtid, obj); \ - } \ - } -#define KMP_ITT_TASKWAIT_FINISHED(obj) \ - if (UNLIKELY(obj != NULL)) \ - __kmp_itt_taskwait_finished(gtid, obj);10 diff lines are omitted. See full path.