OpenMP-Examples/devices/sources/array_sections.4.c
2022-11-04 09:35:42 -07:00

22 lines
294 B
C

/*
* @@name: array_sections.4
* @@type: C
* @@operation: compile
* @@expect: success
* @@version: omp_4.0
*/
void foo ()
{
int A[30], *p;
#pragma omp target data map( A[0:10] )
{
p = &A[0];
#pragma omp target map( p[3:7] )
{
A[2] = 0;
p[8] = 0;
A[8] = 1;
}
}
}