cuda-api-wrappers
Thin C++-flavored wrappers for the CUDA Runtime API
|
A wrapper class for host and/or device pointers, allowing easy access to CUDA's pointer attributes. More...
Go to the source code of this file.
Classes | |
class | cuda::memory::pointer_t< T > |
A convenience wrapper around a raw pointer "known" to the CUDA runtime and which thus has various kinds of associated information which this wrapper allows access to. More... | |
Namespaces | |
cuda | |
Definitions and functionality wrapping CUDA APIs. | |
cuda::memory | |
Representation, allocation and manipulation of CUDA-related memory, of different. | |
Enumerations | |
enum | cuda::memory::type_t : ::std::underlying_type< CUmemorytype >::type { host_ = CU_MEMORYTYPE_HOST, device_ = CU_MEMORYTYPE_DEVICE, array = CU_MEMORYTYPE_ARRAY, unified_ = CU_MEMORYTYPE_UNIFIED, managed_ = CU_MEMORYTYPE_UNIFIED, non_cuda = ~(::std::underlying_type<CUmemorytype>::type{0}) } |
The CUDA execution ecosystem involves different memory spaces in their relation to a GPU device or their treatment by the CUDA driver; this type distinguishes among them. | |
Functions | |
memory::type_t | cuda::memory::type_of (const void *ptr) |
Determine the type of memory at a given address vis-a-vis the CUDA ecosystem: Was it allocated by the CUDA driver? Does it reside solely on a GPU device'? Solely on the host? Movable between locations? etc. | |
context_t | cuda::memory::context_of (void const *ptr) |
Obtain (a non-owning wrapper for) the CUDA context with which a memory address is associated (e.g. More... | |
template<typename T > | |
pointer_t< T > | cuda::memory::pointer::wrap (T *ptr) noexcept |
Wraps an existing pointer in a pointer_t wrapper. More... | |
A wrapper class for host and/or device pointers, allowing easy access to CUDA's pointer attributes.
T*
's rather than pointer_t<T>
's. This may change in the future.
|
inlinenoexcept |
Wraps an existing pointer in a pointer_t wrapper.
ptr | a pointer - into either device or host memory - to be wrapped. |