diff options
| author | Joachim Protze <protze@itc.rwth-aachen.de> | 2017-12-21 14:36:30 +0000 |
|---|---|---|
| committer | Joachim Protze <protze@itc.rwth-aachen.de> | 2017-12-21 14:36:30 +0000 |
| commit | f375f4b49a72cf11e512aeaf25c2944d3d0b0a67 (patch) | |
| tree | 8e7c9c02c338cb1b355ada3d6217bb1767de2526 /openmp/runtime/test/ompt/misc/api_calls.c | |
| parent | 636510a702ca5bdf938942e1b59f840c23435265 (diff) | |
| download | bcm5719-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/test/ompt/misc/api_calls.c')
| -rw-r--r-- | openmp/runtime/test/ompt/misc/api_calls.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/openmp/runtime/test/ompt/misc/api_calls.c b/openmp/runtime/test/ompt/misc/api_calls.c index f7f1e16aa6d..a41de086316 100644 --- a/openmp/runtime/test/ompt/misc/api_calls.c +++ b/openmp/runtime/test/ompt/misc/api_calls.c @@ -43,6 +43,9 @@ int main() printf("%" PRIu64 ": sched_getcpu()=%d\n", ompt_get_thread_data()->value, sched_getcpu()); printf("%" PRIu64 ": ompt_get_proc_id()=%d\n", ompt_get_thread_data()->value, ompt_get_proc_id()); + + printf("%" PRIu64 ": omp_get_num_procs()=%d\n", ompt_get_thread_data()->value, omp_get_num_procs()); + printf("%" PRIu64 ": ompt_get_num_procs()=%d\n", ompt_get_thread_data()->value, ompt_get_num_procs()); } // Check if libomp supports the callbacks for this test. @@ -61,6 +64,9 @@ int main() // CHECK: {{^}}[[MASTER_ID]]: sched_getcpu()=[[CPU_ID:[0-9]+]] // CHECK: {{^}}[[MASTER_ID]]: ompt_get_proc_id()=[[CPU_ID]] + // CHECK: {{^}}[[MASTER_ID]]: omp_get_num_procs()=[[NUM_PROCS:[-]?[0-9]+]] + // CHECK: {{^}}[[MASTER_ID]]: ompt_get_num_procs()=[[NUM_PROCS]] + return 0; } |

