21 #include <rmm/detail/error.hpp>
22 #include <rmm/detail/export.hpp>
23 #include <rmm/error.hpp>
25 #include <cuda/std/span>
27 namespace RMM_NAMESPACE {
52 auto result = cudaMemPrefetchAsync(ptr, size, device.
value(), stream.
value());
55 if (result != cudaErrorInvalidValue && result != cudaSuccess) { RMM_CUDA_TRY(result); }
74 prefetch(data.data(), data.size_bytes(), device, stream);
Strongly-typed non-owning wrapper for CUDA streams with default constructor.
Definition: cuda_stream_view.hpp:39
cudaStream_t value() const noexcept
Get the wrapped stream.
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:70
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