/
pccc
/
pccc-mlir
Обзор
Документация
Войти
/
pccc
/
pccc-mlir
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
master
offload/test/offloading/offloading_success.cpp
20 строк
427 B
obitotsky
fork mlir
19 июл 2026, 07:05
Верифицирован
19 июл 2026, 07:05
6422b87
Код
Авторство
О чём код?
// RUN: %libomptarget-compilexx-run-and-check-generic #include <omp.h> #include <stdio.h> int main(void) { int isHost = 0; #pragma omp target map(from : isHost) { isHost = omp_is_initial_device(); } if (isHost < 0) { printf("Runtime error, isHost=%d\n", isHost); } // CHECK: Target region executed on the device printf("Target region executed on the %s\n", isHost ? "host" : "device"); return isHost; }