All Classes Namespaces Functions Enumerations Enumerator Modules Pages
buffer.hpp
1 /*
2  * Copyright (c) 2021-2025, 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 #pragma once
17 
18 #include <vector>
19 
20 namespace kvikio {
21 
37 /*NOLINTNEXTLINE(readability-function-cognitive-complexity)*/
38 void buffer_register(void const* devPtr_base,
39  std::size_t size,
40  int flags = 0,
41  std::vector<int> const& errors_to_ignore = std::vector<int>());
42 
48 void buffer_deregister(void const* devPtr_base);
49 
64 void memory_register(void const* devPtr,
65  int flags = 0,
66  std::vector<int> const& errors_to_ignore = {});
67 
73 void memory_deregister(void const* devPtr);
74 
75 } // namespace kvikio
KvikIO namespace.
Definition: batch.hpp:27
void buffer_deregister(void const *devPtr_base)
deregister an already registered device memory from cuFile
void memory_register(void const *devPtr, int flags=0, std::vector< int > const &errors_to_ignore={})
Register device memory allocation which is part of devPtr. Use this together with FileHandle::pread()...
void buffer_register(void const *devPtr_base, std::size_t size, int flags=0, std::vector< int > const &errors_to_ignore=std::vector< int >())
register an existing cudaMalloced memory with cuFile to pin for GPUDirect Storage access.
void memory_deregister(void const *devPtr)
deregister an already registered device memory from cuFile.