8#pragma omp parallel num_threads(10)
9 { printf(
"\ntarget: foo(): parallel num_threads(10)"); }
15 printf(
"\nmain: thread_limit = %d", omp_get_thread_limit());
18#pragma omp target thread_limit(tl)
20 printf(
"\ntarget: thread_limit = %d", omp_get_thread_limit());
24#pragma omp parallel reduction(+:count)
26 printf(
"\ntarget: parallel: count = %d",
count);
30#pragma omp parallel num_threads(2)
31 { printf(
"\ntarget: parallel num_threads(2)"); }
38#pragma omp parallel num_threads(10)
39 { printf(
"\ntarget: parallel num_threads(10)"); }
57 { printf(
"\ntarget: parallel with omp_set_num_thread(2)"); }
63 printf(
"\ntarget: thread_limit = %d", omp_get_thread_limit());
68#pragma omp target thread_limit(3)
70 printf(
"\nsecond target: thread_limit = %d", omp_get_thread_limit());
73#pragma omp parallel reduction(+:count)
75 printf(
"\nsecond target: parallel: count = %d",
count);
80 printf(
"\nmain: thread_limit = %d", omp_get_thread_limit());
82#pragma omp parallel num_threads(10)
83 { printf(
"\nmain: parallel num_threads(10)"); }
98#pragma omp target parallel thread_limit(2)
99 printf(
"\ntarget parallel thread_limit(2)");
104#pragma omp target parallel num_threads(2) thread_limit(3)
105 printf(
"\ntarget parallel num_threads(2) thread_limit(3)");
110#pragma omp target parallel num_threads(3) thread_limit(2)
111 printf(
"\ntarget parallel num_threads(3) thread_limit(2)");
117#pragma omp target parallel for thread_limit(2)
118 for (
int i = 0;
i < 5; ++
i)
119 printf(
"\ntarget parallel for thread_limit(2) : thread num = %d",
120 omp_get_thread_num());
129#pragma omp target parallel for simd thread_limit(2)
130 for (
int i = 0;
i < 5; ++
i)
131 printf(
"\ntarget parallel for simd thread_limit(2) : thread num = %d",
132 omp_get_thread_num());
142#pragma omp target simd thread_limit(2)
143 for (
int i = 0;
i < 5; ++
i)
144 printf(
"\ntarget simd thread_limit(2) : thread num = %d",
145 omp_get_thread_num());
154#pragma omp target parallel loop thread_limit(2)
155 for (
int i = 0;
i < 5; ++
i)
156 printf(
"\ntarget parallel loop thread_limit(2) : thread num = %d",
157 omp_get_thread_num());
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t count
#define omp_set_num_threads