All Classes Files Functions Enumerations Enumerator 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(const void* devPtr_base,
39  std::size_t size,
40  int flags = 0,
41  const std::vector<int>& errors_to_ignore = std::vector<int>());
42 
48 void buffer_deregister(const void* devPtr_base);
49 
64 void memory_register(const void* devPtr,
65  int flags = 0,
66  const std::vector<int>& errors_to_ignore = {});
67 
73 void memory_deregister(const void* devPtr);
74 
75 } // namespace kvikio