compat.curand
#includecuRAND: random number generation on the device (from the xim payload)
#include <curand.h>
mcpp add compat.curand@10.3.10.19
Usage
From this repository's own test project — built and run by CI, not written for the website.
// The load path first, the device second.
//
// Reaching main is itself the assertion this member exists for: it means every
// DT_NEEDED of libcurand.so resolved through the farm compat.curand builds,
// including the C library stubs that the component's own `RUNPATH = $ORIGIN`
// would otherwise hide.
#include <cstdio>
// The adapters under test exist only on Linux, so the assertions do too. The
// file still compiles everywhere, which is what keeps it from rotting silently
// on the two platforms that do not exercise it.
#ifndef __linux__
int main() {
std::printf("not applicable on this platform\n");
return 0;
}
#else
#include <curand.h>
#include <cuda_runtime.h>
#include <cmath>
// …
tests/examples/cuda-curand/tests/curand.cpp · project tests/examples/cuda-curand
Build
- targets
curand (lib)- language
c++23- C standard
c11- import std
- no
- include dirs
mcpp_generated/curand/include
Sources (1)
mcpp_generated/curand_anchor.c
Versions
| Version | Platforms | Mirrors | sha256 |
|---|---|---|---|
10.3.10.19 latest |
Linux | source | b3e40c5bfed1… |