cuda-api-wrappers
Thin C++-flavored wrappers for the CUDA Runtime API
cuda::module_t Class Reference

Wrapper class for a CUDA code module. More...

#include <module.hpp>

Public Member Functions

context_t context () const
 
device_t device () const
 
cuda::kernel_t get_kernel (const char *name) const
 Obtains a kernel constituting part of this module. More...
 
cuda::kernel_t get_kernel (const ::std::string &name) const
 Obtains a kernel constituting part of this module. More...
 
memory::region_t get_global_region (const char *name) const
 Get the mapping of a named memory region in this module to actual memory.
 
CUsurfref get_surface (const char *name) const
 A "plug" of a method regarding surfaces, which modules support but our wrappers don't really cater to the use of.
 
CUtexref get_texture_reference (const char *name) const
 A "plug" of a method regarding texture references. More...
 
 module_t (const module_t &)=delete
 
 module_t (module_t &&other) noexcept
 
module_toperator= (const module_t &)=delete
 
module_toperator= (module_t &&other) noexcept
 
module::handle_t handle () const
 Getters for the module object's raw constituent fields.
 
context::handle_t context_handle () const
 
device::id_t device_id () const
 

Detailed Description

Wrapper class for a CUDA code module.

Note
This class is a "reference type", not a "value type". Therefore, making changes to the module is a const-respecting operation on this class.

Member Function Documentation

◆ context()

context_t cuda::module_t::context ( ) const
inline
Returns
the context in which this module exists

◆ device()

device_t cuda::module_t::device ( ) const
inline
Returns
the device with which this module is associated

◆ get_kernel() [1/2]

cuda::kernel_t cuda::module_t::get_kernel ( const char *  name) const
inline

Obtains a kernel constituting part of this module.

Parameters
nameThe function name, in case of a C-style function, or the mangled function signature, in case of a C++-style function.
Returns
An enqueable kernel proxy object for the requested kernel.

◆ get_kernel() [2/2]

cuda::kernel_t cuda::module_t::get_kernel ( const ::std::string &  name) const
inline

Obtains a kernel constituting part of this module.

Parameters
nameThe function name, in case of a C-style function, or the mangled function signature, in case of a C++-style function.
Returns
An enqueable kernel proxy object for the requested kernel.

◆ get_texture_reference()

CUtexref cuda::module_t::get_texture_reference ( const char *  name) const
inline

A "plug" of a method regarding texture references.

TODO: Beef this up into a proper method and consider relations between texture references, texture objects and texture views


The documentation for this class was generated from the following file: