Files
llvm-project/offload/test/api/omp_get_num_procs.c
fineg74 1611a23a5b [OFFLOAD] Add spirv implementation for named barrier (#180393)
This change adds implementation for named barriers for SPIRV backend.
Since there is no built in API/intrinsics for named barrier in SPIRV,
the implementation loosely follows implementation for AMD
2026-03-27 20:14:09 +01:00

16 lines
276 B
C

// RUN: %libomptarget-compile-run-and-check-generic
#include <stdio.h>
int omp_get_num_procs(void);
int main() {
int num_procs;
#pragma omp target map(from : num_procs)
{ num_procs = omp_get_num_procs(); }
// CHECK: PASS
if (num_procs > 0)
printf("PASS\n");
}