One more question. Is it valid to use arr[MAX/2..MAX] on target?
#define MAX 20
void foo ()
{
int arr[MAX];
#pragma omp target map(from: arr[0:MAX/2])
{
int i;
for (i = 0; i < MAX; i++)
arr[i] = i;
}
}In this case GOMP_target gets sizes[0]==40 as input. Due to this, gomp_map_vars allocates 40 bytes of memory on target for 'arr', instead of 80 bytes. -- Ilya
