mirror of
https://github.com/autc04/Retro68.git
synced 2025-03-02 10:30:00 +00:00
24 lines
336 B
C
24 lines
336 B
C
#include <omp.h>
|
|
#include <stdlib.h>
|
|
|
|
void
|
|
foo ()
|
|
{
|
|
{
|
|
#pragma omp target parallel nowait thread_limit (4) num_threads (1)
|
|
if (omp_get_thread_limit () > 4)
|
|
abort ();
|
|
}
|
|
#pragma omp taskwait
|
|
}
|
|
|
|
int
|
|
main ()
|
|
{
|
|
#pragma omp target thread_limit (6)
|
|
if (omp_get_thread_limit () > 6)
|
|
abort ();
|
|
foo ();
|
|
return 0;
|
|
}
|