Loading...
Searching...
No Matches
prefetch.hpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3 * SPDX-License-Identifier: Apache-2.0
4 */
5
6#pragma once
7
8#include <rmm/cuda_device.hpp>
9#include <rmm/detail/error.hpp>
10#include <rmm/detail/export.hpp>
11#include <rmm/error.hpp>
12
13#include <cuda/std/span>
14#include <cuda/stream>
15
16RMM_NAMESPACE_BEGIN
17
23
37void prefetch(void const* ptr,
38 std::size_t size,
40 cuda::stream_ref stream);
41
53template <typename T>
54void prefetch(cuda::std::span<T const> data, rmm::cuda_device_id device, cuda::stream_ref stream)
55{
56 prefetch(data.data(), data.size_bytes(), device, stream);
57}
58 // end of group
60
61RMM_NAMESPACE_END
void prefetch(void const *ptr, std::size_t size, rmm::cuda_device_id device, cuda::stream_ref stream)
Prefetch memory to the specified device on the specified stream.
Strong type for a CUDA device identifier.
Definition cuda_device.hpp:27