summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src
diff options
context:
space:
mode:
authorJoachim Protze <protze@itc.rwth-aachen.de>2018-02-28 17:36:18 +0000
committerJoachim Protze <protze@itc.rwth-aachen.de>2018-02-28 17:36:18 +0000
commitaa2022e74f50c537da62173c4f03fe54d59b0100 (patch)
tree0393014bd28b857fd2cd2926e0614e0701576ea5 /openmp/runtime/src
parent22c8f33a9b7ad09705287622a2638b014b85fbe3 (diff)
downloadbcm5719-llvm-aa2022e74f50c537da62173c4f03fe54d59b0100.tar.gz
bcm5719-llvm-aa2022e74f50c537da62173c4f03fe54d59b0100.zip
[OMPT] Fix ompt_get_task_info() and add tests for it
The thread_num parameter of ompt_get_task_info() was not being used previously, but need to be set. The print_task_type() function (form the task-types.c testcase) was merged into the print_ids() function (in callback.h). Testing of ompt_get_task_info() was added to the task-types.c testcase. It was not tested extensively previously. Differential Revision: https://reviews.llvm.org/D42472 llvm-svn: 326338
Diffstat (limited to 'openmp/runtime/src')
-rw-r--r--openmp/runtime/src/ompt-specific.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/openmp/runtime/src/ompt-specific.cpp b/openmp/runtime/src/ompt-specific.cpp
index 5488c6ede99..c284e3ef0e9 100644
--- a/openmp/runtime/src/ompt-specific.cpp
+++ b/openmp/runtime/src/ompt-specific.cpp
@@ -396,6 +396,9 @@ int __ompt_get_task_info_internal(int ancestor_level, int *type,
if (parallel_data) {
*parallel_data = team_info ? &(team_info->parallel_data) : NULL;
}
+ if (thread_num) {
+ *thread_num = __kmp_get_gtid();
+ }
return info ? 2 : 0;
}
return 0;
OpenPOWER on IntegriCloud