1
0
mirror of https://github.com/OpenMP/Examples.git synced 2025-04-14 02:11:25 +01:00
2022-11-04 09:35:42 -07:00

20 lines
316 B
C

/*
* @@name: declare_target.1
* @@type: C
* @@operation: compile
* @@expect: success
* @@version: omp_5.1
*/
#pragma omp begin declare target
extern void fib(int N);
#pragma omp end declare target
#define THRESHOLD 1000000
void fib_wrapper(int n)
{
#pragma omp target if(n > THRESHOLD)
{
fib(n);
}
}