compat.cuda-runtime
Host NVIDIA driver runtime adapter for mcpp Linux applications
mcpp add compat.cuda-runtime@2026.09.05
Usage
From this repository's own test project — built and run by CI, not written for the website.
// What compat.cuda-driver is asserted to do, and what it is not.
//
// A machine with no NVIDIA driver is a legitimate configuration and is what
// every runner in this repository is, so the test cannot require a device. It
// asserts the two properties that hold on both kinds of machine:
//
// 1. The package resolves, builds and links. That alone covers the failure
// this package exists to prevent, because the failure is a LINK-time one:
// an unversioned libcuda.so harvested into a directory mcpp puts on the
// link line would be picked up by -lcuda and bind the build to one
// machine's driver. The patterns are versioned precisely so that cannot
// happen, and a build that links proves it did not.
//
// 2. Where a driver is present, the farm reaches it. Guarded on the driver
// actually being there rather than skipped by a marker, so the assertion
// is real on a machine with a GPU and vacuous on one without, and neither
// case is reported as a pass of the other.
#include <cstdio>
// The adapter under test exists only on Linux, so the assertion does too. The
// file still compiles everywhere, which is what keeps it from rotting silently
// on the two platforms that do not exercise it.
// …
tests/examples/cuda-driver/tests/farm.cpp · project tests/examples/cuda-driver
Build
- targets
cuda_runtime (lib)- language
c++23- C standard
c11- import std
- no
Sources (1)
mcpp_generated/cuda_runtime_empty.c
Versions
| Version | Platforms | Mirrors | sha256 |
|---|---|---|---|
2026.09.05 latest |
Linux | source | b3e40c5bfed1… |