brintos

brintos / llvm-project-archived public Read only

0
0
Text · 465 B · 3b51115 Raw
28 lines · c
1// RUN: %libomp-compile-and-run2// Linking fails for icc 183// UNSUPPORTED: icc-184 5#include <stdio.h>6#include "omp_testsuite.h"7 8int test_omp_get_device_num()9{10  /* checks that omp_get_device_num */11  int device_num = omp_get_device_num();12 13  return (device_num == omp_get_num_devices());14}15 16int main()17{18  int i;19  int num_failed=0;20 21  for(i = 0; i < REPETITIONS; i++) {22    if(!test_omp_get_device_num()) {23      num_failed++;24    }25  }26  return num_failed;27}28