gpu.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2023-2025, NVIDIA CORPORATION.
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 #pragma once
9 
10 #include <cuda_runtime_api.h>
11 namespace raft_proto {
12 namespace detail {
13 
14 template <>
15 inline void cuda_check<device_type::gpu, cudaError_t>(cudaError_t const& err) noexcept(false)
16 {
17  if (err != cudaSuccess) {
18  cudaGetLastError();
19  throw bad_cuda_call(cudaGetErrorString(err));
20  }
21 }
22 
23 } // namespace detail
24 } // namespace raft_proto
Definition: buffer.hpp:24
Definition: exceptions.hpp:9