[RISCV][VLOPT] Add vector narrowing integer right shift instructions to isSupportedIn...
[llvm-project.git] / offload / test / offloading / wtime.c
blob8a6e206061e21a3511f7184eaaca6f8ae363009b
1 // RUN: %libomptarget-compileopt-and-run-generic
3 // UNSUPPORTED: amdgcn-amd-amdhsa
5 #include <assert.h>
6 #include <omp.h>
7 #include <stdio.h>
8 #include <stdlib.h>
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)
20 data[i] = i;
21 double end = omp_get_wtime();
22 duration = end - start;
24 assert(duration > 0.0);
25 free(data);
26 return 0;