/
pccc
/
pccc-mlir
Обзор
Документация
Войти
/
pccc
/
pccc-mlir
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
master
offload/test/offloading/extern.c
28 строк
535 B
obitotsky
fork mlir
19 июл 2026, 07:05
Верифицирован
19 июл 2026, 07:05
6422b87
Код
Авторство
О чём код?
// clang-format off // RUN: %libomptarget-compile-generic -DVAR -c -o %t.o // RUN: %libomptarget-compile-generic %t.o && %libomptarget-run-generic | %fcheck-generic // clang-format on #ifdef VAR int x = 1; #else #include <stdio.h> #include <assert.h> extern int x; int main() { int value = 0; #pragma omp target map(from : value) value = x; assert(value == 1); x = 999; #pragma omp target update to(x) #pragma omp target map(from : value) value = x; assert(value == 999); // CHECK: PASS printf ("PASS\n"); } #endif