1 // RUN: %libomptarget-compileopt-and-run-generic
3 // UNSUPPORTED: amdgcn-amd-amdhsa
10 #define N (1024 * 1024 * 256)
12 int main(int argc
, char *argv
[]) {
13 int *data
= (int *)malloc(N
* sizeof(int));
14 double duration
= 0.0;
16 #pragma omp target map(from : data[0 : N]) map(from : duration)
18 double start
= omp_get_wtime();
19 for (int i
= 0; i
< N
; ++i
)
21 double end
= omp_get_wtime();
22 duration
= end
- start
;
24 assert(duration
> 0.0);