Files
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

27 lines
399 B
C++

// RUN: %libomptarget-compilexx-run-and-check-generic
// RUN: %libomptarget-compileoptxx-run-and-check-generic
#include <cassert>
#include <iostream>
int main(int argc, char *argv[]) {
int i = 0, j = 0;
#pragma omp target map(tofrom : i, j) nowait
{
i = 1;
j = 2;
}
#pragma omp taskwait
assert(i == 1);
assert(j == 2);
std::cout << "PASS\n";
return 0;
}
// CHECK: PASS