21 #include <rmm/detail/export.hpp>
22 #include <rmm/error.hpp>
24 #include <cuda/std/span>
26 namespace RMM_NAMESPACE {
51 auto result = cudaMemPrefetchAsync(ptr, size, device.
value(), stream.
value());
54 if (result != cudaErrorInvalidValue && result != cudaSuccess) { RMM_CUDA_TRY(result); }
73 prefetch(data.data(), data.size_bytes(), device, stream);
CUDA 流的强类型非拥有包装器,带有默认构造函数。
定义: cuda_stream_view.hpp:39
constexpr cudaStream_t value() const noexcept
获取被包装的流。
定义: cuda_stream_view.hpp:73
void prefetch(cuda::std::span< T const > data, rmm::cuda_device_id device, rmm::cuda_stream_view stream)
在指定的流上将内存范围预取到指定的设备。
定义: prefetch.hpp:69
CUDA 设备标识符的强类型。
定义: cuda_device.hpp:41
constexpr value_type value() const noexcept
被包装的整数值。
定义: cuda_device.hpp:57