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);
Strongly-typed non-owning wrapper for CUDA streams with default constructor.
Definition: cuda_stream_view.hpp:41
constexpr cudaStream_t value() const noexcept
Get the wrapped stream.
Definition: cuda_stream_view.hpp:75
void prefetch(cuda::std::span< T const > data, rmm::cuda_device_id device, rmm::cuda_stream_view stream)
Prefetch a span of memory to the specified device on the specified stream.
Definition: prefetch.hpp:69
Strong type for a CUDA device identifier.
Definition: cuda_device.hpp:38
constexpr value_type value() const noexcept
The wrapped integer value.
Definition: cuda_device.hpp:54