[RISCV][VLOPT] Add vector narrowing integer right shift instructions to isSupportedIn...
[llvm-project.git] / offload / test / api / omp_get_device_num.c
blob31e13b0050d4127c3203e3d39c7bf2934d96c259
1 // RUN: %libomptarget-compile-run-and-check-generic
3 #include <omp.h>
4 #include <stdio.h>
6 int test_omp_get_device_num() {
7 /* checks that omp_get_device_num() == omp_get_num_devices() in the host */
8 int device_num = omp_get_device_num();
9 printf("device_num = %d\n", device_num);
11 #pragma omp target
14 return (device_num == omp_get_num_devices());
17 int main() {
18 int i;
19 int failed = 0;
21 if (!test_omp_get_device_num()) {
22 failed++;
24 if (failed)
25 printf("FAIL\n");
26 else
27 printf("PASS\n");
28 return failed;
31 // CHECK: PASS