interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

branch main Branches Tags History

CUDApp / src / omega_core_binding.h

18 lines · 930 bytes Raw Blame History
1/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */
2#ifndef OMEGA_CORE_BINDING_H
3#define OMEGA_CORE_BINDING_H
4#include <stdint.h>
5#if defined(OMEGA_GPU_NO_POSIX) && !__STDC_HOSTED__
6/* MIGRATION-PENDING: the pinned bridge-freest refuses om/core/sha256.om and fmtnum.om with error 24
7 * (unsupported freest scalar capability), so -ffreestanding objects (build/gpu_fs) keep the C core
8 * (sha256.c and omega_gpu_fmt.c select it under OMEGA_GPU_NO_POSIX) and must not reach this binding.
9 * Hosted links that only set OMEGA_GPU_NO_POSIX (test-gpu-native-runtime) link the hosted binding. */
10#error "omega_core_binding.h has no freestanding binding yet; the C core is used in -ffreestanding objects"
11#else
12#include "cudapp_native.h"
13#include <stdlib.h>
14#define CORE_CALL(name, ...) omega_##name(__VA_ARGS__)
15#define CORE_STOP() abort()
16#endif
17#define CORE_VOID(name, ...) CORE_CALL(name, &(uint64_t){0}, __VA_ARGS__)
18#endif