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

21 lines
278 B
C

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