mirror of
https://github.com/OpenMP/Examples.git
synced 2025-04-04 05:41:33 +01:00
22 lines
398 B
C
22 lines
398 B
C
/*
|
|
* @@name: apply_syntax.1
|
|
* @@type: C
|
|
* @@operation: compile
|
|
* @@expect: success
|
|
* @@version: omp_6.0
|
|
*/
|
|
void construct_unroll(double A[100])
|
|
{
|
|
#pragma omp unroll
|
|
#pragma omp tile sizes(4)
|
|
for (int i = 0; i < 100; ++i)
|
|
A[i] = A[i] + 1;
|
|
}
|
|
|
|
void apply_unroll(double A[100])
|
|
{
|
|
#pragma omp tile sizes(4) apply(grid: unroll)
|
|
for (int i = 0; i < 100; ++i)
|
|
A[i] = A[i] + 1;
|
|
}
|