mcpp index

compat.curand

#include

cuRAND: 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…