1 // REQUIRES: ompx_taskgraph
2 // RUN: %libomp-cxx-compile-and-run
10 // Compiler-generated code (emulation)
11 typedef struct ident
{
18 int __kmpc_global_thread_num(ident_t
*);
19 int __kmpc_start_record_task(ident_t
*, int, int, int);
20 void __kmpc_end_record_task(ident_t
*, int, int, int);
35 // no atomicity needed, can only be executed by 1 thread
36 // and no concurrency with other tasks possible
45 for (int iter
= 0; iter
< NT
; ++iter
) {
46 int gtid
= __kmpc_global_thread_num(nullptr);
47 int res
= __kmpc_start_record_task(nullptr, gtid
, /* kmp_tdg_flags */0, /* tdg_id */0);
49 #pragma omp task depend(out:y)
51 #pragma omp task depend(out:x)
53 #pragma omp task depend(in:x,y)
56 __kmpc_end_record_task(nullptr, gtid
, /* kmp_tdg_flags */0, /* tdg_id */0);
60 std::cout
<< "Passed" << std::endl
;