LLVM OpenMP
22.0.0git
runtime
test
ompt
misc
unset_callback.c
Go to the documentation of this file.
1
// clang-format off
2
// RUN: %libomp-compile-and-run | FileCheck %s
3
// REQUIRES: ompt
4
// clang-format on
5
#include "
callback.h
"
6
#include "
omp_testsuite.h
"
7
#include <omp.h>
8
9
int
main
() {
10
go_parallel_nthreads
(1);
11
ompt_set_callback
(ompt_callback_parallel_begin, NULL);
12
go_parallel_nthreads
(1);
13
14
// clang-format off
15
// Check if libomp supports the callbacks for this test.
16
// CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_idle'
17
18
// CHECK: 0: NULL_POINTER=[[NULL:.*$]]
19
20
// CHECK: {{^}}[[THREAD_ID:[0-9]+]]: ompt_event_parallel_begin:
21
// CHECK: {{^}}[[THREAD_ID]]: ompt_event_parallel_end:
22
// CHECK-NOT: {{^}}[[THREAD_ID]]: ompt_event_parallel_begin:
23
// CHECK: {{^}}[[THREAD_ID]]: ompt_event_parallel_end:
24
// clang-format on
25
26
return
get_exit_value
();
27
}
callback.h
ompt_set_callback
static ompt_set_callback_t ompt_set_callback
Definition
callback.h:153
omp_testsuite.h
go_parallel_nthreads
static void go_parallel_nthreads(int nthreads)
Definition
omp_testsuite.h:37
get_exit_value
static int get_exit_value()
Definition
omp_testsuite.h:73
main
int main()
Definition
unset_callback.c:9
Generated on
for LLVM OpenMP by
1.14.0