compat.curand
#includecuRAND: random number generation on the device (from the xim payload)
#include <curand.h>
mcpp add compat.curand@10.3.10.19
用法
来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。
// 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 · 项目 tests/examples/cuda-curand
构建
- targets
curand (lib)- language
c++23- C standard
c11- import std
- no
- include dirs
mcpp_generated/curand/include
源文件 (1)
mcpp_generated/curand_anchor.c
版本
| 版本 | 平台 | 镜像 | sha256 |
|---|---|---|---|
10.3.10.19 最新 |
Linux | 源站 | b3e40c5bfed1… |