pinned_memory.hpp
1 /*
2  * Copyright (c) 2024, NVIDIA CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 #include <cudf/utilities/export.hpp>
20 
21 #include <rmm/resource_ref.hpp>
22 
23 #include <optional>
24 
25 namespace CUDF_EXPORT cudf {
26 
35 
42 
47  std::optional<size_t> pool_size;
49 };
50 
59 
67 void set_kernel_pinned_copy_threshold(size_t threshold);
68 
75 
84 
91 
92 } // namespace CUDF_EXPORT cudf
cuda::mr::async_resource_ref< cuda::mr::host_accessible, cuda::mr::device_accessible > host_device_async_resource_ref
cuDF interfaces
Definition: aggregation.hpp:35
void set_kernel_pinned_copy_threshold(size_t threshold)
Set the threshold size for using kernels for pinned memory copies.
void set_allocate_host_as_pinned_threshold(size_t threshold)
Set the threshold size for allocating host memory as pinned memory.
size_t get_allocate_host_as_pinned_threshold()
Get the threshold size for allocating host memory as pinned memory.
size_t get_kernel_pinned_copy_threshold()
Get the threshold size for using kernels for pinned memory copies.
bool config_default_pinned_memory_resource(pinned_mr_options const &opts)
Configure the size of the default pinned memory resource.
rmm::host_device_async_resource_ref set_pinned_memory_resource(rmm::host_device_async_resource_ref mr)
Set the rmm resource to be used for pinned memory allocations.
rmm::host_device_async_resource_ref get_pinned_memory_resource()
Get the rmm resource being used for pinned memory allocations.
Options to configure the default pinned memory resource.
std::optional< size_t > pool_size