summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src/ompt-specific.h
diff options
context:
space:
mode:
authorJonathan Peyton <jonathan.l.peyton@intel.com>2015-11-05 16:54:55 +0000
committerJonathan Peyton <jonathan.l.peyton@intel.com>2015-11-05 16:54:55 +0000
commit95246e7def0cf92b061338ca682c1f5e60f61a15 (patch)
tree39d0c641b81bf063b6b01d6cf3ecf1e330e5db6a /openmp/runtime/src/ompt-specific.h
parent27149cf32dfbffb3738e96bdfda858712c758125 (diff)
downloadbcm5719-llvm-95246e7def0cf92b061338ca682c1f5e60f61a15.tar.gz
bcm5719-llvm-95246e7def0cf92b061338ca682c1f5e60f61a15.zip
Improve OMPT initialization code
Use of #ifdef OMPT_DEBUG was causing messages to be generated under normal operation when the OpenMP library was compiled with KMP_DEBUG enabled. Elsewhere, KMP_DEBUG evaluates assertions, but never produces messages during normal operation. To avoid this inconsistency, set OMPT_DEBUG using a cmake variable LIBOMP_OMPT_DEBUG. While I was editing the associated ompt-specific.h and ompt-general.c files, make the spacing and comments consistent. Patch by John Mellor-Crummey Differential Revision: http://reviews.llvm.org/D14355 llvm-svn: 252173
Diffstat (limited to 'openmp/runtime/src/ompt-specific.h')
-rw-r--r--openmp/runtime/src/ompt-specific.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/openmp/runtime/src/ompt-specific.h b/openmp/runtime/src/ompt-specific.h
index bcbfdd3cf2d..e8f84a9a585 100644
--- a/openmp/runtime/src/ompt-specific.h
+++ b/openmp/runtime/src/ompt-specific.h
@@ -3,8 +3,18 @@
#include "kmp.h"
+/*****************************************************************************
+ * types
+ ****************************************************************************/
+
typedef kmp_info_t ompt_thread_t;
+
+
+/*****************************************************************************
+ * forward declarations
+ ****************************************************************************/
+
void __ompt_team_assign_id(kmp_team_t *team, ompt_parallel_id_t ompt_pid);
void __ompt_thread_assign_wait_id(void *variable);
@@ -34,15 +44,17 @@ ompt_task_id_t __ompt_get_task_id_internal(int depth);
ompt_frame_t *__ompt_get_task_frame_internal(int depth);
+
/*****************************************************************************
* macros
****************************************************************************/
-#define OMPT_DEBUG KMP_DEBUG
+
#define OMPT_HAVE_WEAK_ATTRIBUTE KMP_HAVE_WEAK_ATTRIBUTE
#define OMPT_HAVE_PSAPI KMP_HAVE_PSAPI
#define OMPT_STR_MATCH(haystack, needle) __kmp_str_match(haystack, 0, needle)
+
//******************************************************************************
// inline functions
//******************************************************************************
OpenPOWER on IntegriCloud