8 #ifndef CUDA_API_WRAPPERS_MULTI_WRAPPER_LIBRARY_KERNEL_HPP 9 #define CUDA_API_WRAPPERS_MULTI_WRAPPER_LIBRARY_KERNEL_HPP 11 #if CUDA_VERSION >= 12000 14 #include "../library.hpp" 15 #include "../kernels/in_library.hpp" 23 inline attribute_value_t get_attribute(
24 const library::kernel_t& library_kernel,
25 kernel::attribute_t attribute,
26 const device_t& device)
28 return detail_::get_attribute(library_kernel.handle(), device.id(), attribute);
31 inline void set_attribute(
32 const library::kernel_t& library_kernel,
33 kernel::attribute_t attribute,
34 const device_t& device,
35 attribute_value_t value)
37 detail_::set_attribute(library_kernel.handle(), device.id(), attribute, value);
40 cuda::kernel_t contextualize(
const kernel_t& kernel,
const context_t& context)
42 auto new_handle = detail_::contextualize(kernel.handle(), context.handle());
44 return wrap(context.device_id(), context.handle(), new_handle, do_not_hold_primary_context_refcount_unit);
53 #endif // CUDA_VERSION >= 12000 55 #endif // CUDA_API_WRAPPERS_MULTI_WRAPPER_LIBRARY_KERNEL_HPP Definitions and functionality wrapping CUDA APIs.
Definition: array.hpp:22
array_t< T, NumDimensions > wrap(device::id_t device_id, context::handle_t context_handle, handle_t handle, dimensions_t< NumDimensions > dimensions) noexcept
Wrap an existing CUDA array in an array_t instance.
Definition: array.hpp:264
A non-owning wrapper for CUDA kernels - whether they be __global__ functions compiled apriori...
Definition: kernel.hpp:159
A host-side binary object with embedded device code; a .o file.