brintos

brintos / llvm-project-archived public Read only

0
0
Text · 688 B · 72fa0b2 Raw
27 lines · c
1// clang-format off2// RUN: %libomptarget-compile-generic3// RUN: env LIBOMPTARGET_INFO=16 \4// RUN:   %libomptarget-run-generic 2>&1 | %fcheck-generic --check-prefix=DEFAULT5 6// UNSUPPORTED: nvptx64-nvidia-cuda7// UNSUPPORTED: nvptx64-nvidia-cuda-LTO8// REQUIRES: gpu9 10int main() {11  int n = 1 << 20;12  int th = 12;13  int te = n / th;14// DEFAULT: 12 (MaxFlatWorkGroupSize:15#pragma omp target16#pragma omp teams loop num_teams(te), thread_limit(th)17  for (int i = 0; i < n; i++) {18  }19 20// DEFAULT: 13 (MaxFlatWorkGroupSize:21  #pragma omp target22  #pragma omp teams distribute parallel for simd num_teams(te), thread_limit(th+1) simdlen(64)23  for(int i = 0; i < n; i++) {24  }25  return 0;26}27