summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src/ompt-general.cpp
diff options
context:
space:
mode:
authorJoachim Protze <protze@itc.rwth-aachen.de>2017-12-21 14:36:30 +0000
committerJoachim Protze <protze@itc.rwth-aachen.de>2017-12-21 14:36:30 +0000
commitf375f4b49a72cf11e512aeaf25c2944d3d0b0a67 (patch)
tree8e7c9c02c338cb1b355ada3d6217bb1767de2526 /openmp/runtime/src/ompt-general.cpp
parent636510a702ca5bdf938942e1b59f840c23435265 (diff)
downloadbcm5719-llvm-f375f4b49a72cf11e512aeaf25c2944d3d0b0a67.tar.gz
bcm5719-llvm-f375f4b49a72cf11e512aeaf25c2944d3d0b0a67.zip
[OMPT] Add missing ompt_get_num_procs function
This function is defined in OpenMP-TR6 section 4.1.5.1.6 The functions was not implemented yet. Since ompt-functions can only be called after the runtime was initialized and has loaded a tool, it can assume the runtime to be initialized. In contrast to omp_get_num_procs which needs to check whether the runtime is initialized. Differential Revision: https://reviews.llvm.org/D40949 llvm-svn: 321269
Diffstat (limited to 'openmp/runtime/src/ompt-general.cpp')
-rw-r--r--openmp/runtime/src/ompt-general.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/openmp/runtime/src/ompt-general.cpp b/openmp/runtime/src/ompt-general.cpp
index 9f21214f808..7e1c67a7c26 100644
--- a/openmp/runtime/src/ompt-general.cpp
+++ b/openmp/runtime/src/ompt-general.cpp
@@ -491,6 +491,15 @@ OMPT_API_ROUTINE int ompt_get_task_info(int ancestor_level, int *type,
}
/*****************************************************************************
+ * num_procs
+ ****************************************************************************/
+
+OMPT_API_ROUTINE int ompt_get_num_procs(void) {
+// copied from kmp_ftn_entry.h (but modified: OMPT can only be called when runtime is initialized)
+ return __kmp_avail_proc;
+}
+
+/*****************************************************************************
* places
****************************************************************************/
OpenPOWER on IntegriCloud