1 // RUN: %libomptarget-compile-and-run-generic
8 int d
= omp_get_default_device();
9 int id
= omp_get_initial_device();
14 if (d
< 0 || d
>= omp_get_num_devices())
17 p
= omp_target_alloc(130 * sizeof(int), d
);
21 for (i
= 0; i
< 128; i
++)
24 result
= omp_target_memset(p
, 0, 130 * sizeof(int), d
);
30 for (i
= 0; i
< 128; ++i
)
32 if (omp_target_memcpy_async(q2
, p
, 128 * sizeof(int), 0, sizeof(int), id
, d
,
38 for (i
= 0; i
< 128; ++i
)
42 omp_target_free(p
, d
);