cuda-api-wrappers
Thin C++-flavored wrappers for the CUDA Runtime API
|
Definitions and functionality related to CUDA devices (not including the device wrapper type cuda::device_t itself) More...
Namespaces | |
peer_to_peer | |
API functions and definitions relating to communications among peer CUDA GPU devices on the same system. | |
Classes | |
struct | compute_architecture_t |
A numeric designator of an architectural generation of CUDA devices. More... | |
struct | compute_capability_t |
A numeric designator of the computational capabilities of a CUDA device. More... | |
struct | pci_location_t |
Location "coordinates" for a CUDA device on a PCIe bus. More... | |
class | primary_context_t |
A class for holding the primary context of a CUDA device. More... | |
struct | properties_t |
A structure holding a collection various properties of a device. More... | |
Typedefs | |
using | limit_t = context::limit_t |
using | limit_value_t = context::limit_value_t |
using | shared_memory_bank_size_t = context::shared_memory_bank_size_t |
using | stream_priority_range_t = context::stream_priority_range_t |
using | multiprocessor_count_t = int |
Type of the number of mutiprocessors within a single GPU. | |
using | id_t = CUdevice |
Numeric ID of a CUDA device used by the CUDA Runtime API. More... | |
using | attribute_t = CUdevice_attribute |
CUDA devices have both "attributes" and "properties". More... | |
using | attribute_value_t = int |
All CUDA device attributes (cuda::device::attribute_t) have a value of this type. | |
using | flags_t = context::flags_t |
using | host_thread_sync_scheduling_policy_t = context::host_thread_sync_scheduling_policy_t |
Enumerations | |
enum | : device::id_t { default_device_id = 0 } |
Functions | |
device_t | wrap (id_t id) NOEXCEPT_IF_NDEBUG |
Returns a wrapper for the CUDA device with a given id. More... | |
device_t | get (id_t id) |
Returns a proxy for the CUDA device with a given id. More... | |
device_t | default_ () |
Obtains (a proxy for) the default CUDA device, being the device with the default CUDA device id. | |
device_t | cpu () |
A named constructor idiom for a "dummy" CUDA device representing the CPU. More... | |
device_t | get (pci_location_t pci_id) |
Obtain a proxy to a device using its PCI bus location. More... | |
device_t | get (const ::std::string &pci_id_str) |
Obtain a proxy to a device using a string with its PCI bus location. More... | |
constexpr compute_capability_t | make_compute_capability (unsigned combined) noexcept |
A named constructor idiom for {compute_capability_t}. More... | |
constexpr compute_capability_t | make_compute_capability (unsigned major, unsigned minor) noexcept |
A named constructor idiom for {compute_capability_t}. | |
device::id_t | count () |
Get the number of CUDA devices usable on the system (with the current CUDA library and kernel driver) More... | |
Definitions and functionality related to CUDA devices (not including the device wrapper type cuda::device_t itself)
using cuda::device::attribute_t = typedef CUdevice_attribute |
CUDA devices have both "attributes" and "properties".
This is the type for attribute identifiers/indices.
using cuda::device::host_thread_sync_scheduling_policy_t = typedef context::host_thread_sync_scheduling_policy_t |
using cuda::device::id_t = typedef CUdevice |
Numeric ID of a CUDA device used by the CUDA Runtime API.
anonymous enum : device::id_t |
|
inline |
Get the number of CUDA devices usable on the system (with the current CUDA library and kernel driver)
cuda::error | if the device count could not be obtained |
|
inline |
A named constructor idiom for a "dummy" CUDA device representing the CPU.
Returns a proxy for the CUDA device with a given id.
device_id | the ID for which to obtain the device proxy |
|
inline |
Obtain a proxy to a device using its PCI bus location.
pci_id | The domain-bus-device triplet locating the GPU on the PCI bus |
|
inline |
Obtain a proxy to a device using a string with its PCI bus location.
pci_id_str | A string listing of the GPU's location on the PCI bus |
|
noexcept |
A named constructor idiom for {compute_capability_t}.
combined | A combination of the major and minor version number, e.g. 91 for major 9, minor 1 |