Joseph Huber 292eca41d9 [Libomptarget] Fix tests after previous patch
Summary:
The previous patch didn't remove these tests correctly.
2023-01-30 07:18:51 -06:00

27 lines
571 B
C

// RUN: %libomptarget-compileopt-run-and-check-generic
// UNSUPPORTED: amdgcn-amd-amdhsa
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#define N (1024 * 1024 * 256)
int main(int argc, char *argv[]) {
int *data = (int *)malloc(N * sizeof(int));
#pragma omp target map(from : data[0 : N])
{
double start = omp_get_wtime();
for (int i = 0; i < N; ++i)
data[i] = i;
double end = omp_get_wtime();
double duration = end - start;
printf("duration: %lfs\n", duration);
}
free(data);
return 0;
}
// CHECK: duration: {{.+[1-9]+}}