cuda-api-wrappers
Thin C++-flavored wrappers for the CUDA Runtime API
link.hpp
Go to the documentation of this file.
1 
7 #ifndef MULTI_WRAPPER_IMPLS_LINK_HPP_
8 #define MULTI_WRAPPER_IMPLS_LINK_HPP_
9 
10 #include "../link.hpp"
11 #include "../device.hpp"
12 
13 namespace cuda {
14 
16 {
17  return cuda::device::get(device_id());
18 }
19 
21 {
22  static constexpr const bool dont_take_ownership { false };
23  return context::wrap(device_id(), context_handle_, dont_take_ownership);
24 }
25 
26 } // namespace cuda
27 
28 #endif //MULTI_WRAPPER_IMPLS_LINK_HPP_
Wrapper class for a CUDA context.
Definition: context.hpp:244
Definitions and functionality wrapping CUDA APIs.
Definition: array.hpp:22
device_t get(id_t id)
Returns a proxy for the CUDA device with a given id.
Definition: device.hpp:837
Wrapper class for a CUDA device.
Definition: device.hpp:135