|
Uni20
Asynchronous tensor and runtime library.
|
Non-owning opaque view into one logical CUDA buffer. More...
#include <cuda_storage.hpp>
Public Types | |
| using | buffer_reference = std::conditional_t< std::is_const_v< element_type >, buffer_type const &, buffer_type & > |
| using | buffer_type = CudaBuffer< value_type > |
| using | element_type = ElementType |
| using | value_type = std::remove_const_t< element_type > |
Public Member Functions | |
| auto | buffer () const -> buffer_reference |
| Return the CUDA buffer whose completion ledger governs access. | |
| constexpr | CudaBufferView () noexcept=default |
| constexpr | CudaBufferView (buffer_reference buffer) noexcept |
| Construct a view at the beginning of a CUDA buffer. | |
| template<class OtherElement > requires (std::is_const_v<element_type> && !std::is_const_v<OtherElement> && std::same_as<std::remove_const_t<OtherElement>, value_type>) | |
| constexpr | CudaBufferView (CudaBufferView< OtherElement > other) noexcept |
| Convert a mutable view into a read-only view. | |
| constexpr std::size_t | element_offset () const noexcept |
| Return this view's element offset from the logical buffer start. | |
| constexpr CudaBufferView | offset_by (std::size_t offset) const noexcept |
| Return a view advanced by an element offset. | |
| constexpr | operator bool () const noexcept |
| Return whether this view identifies a CUDA buffer. | |
Friends | |
| template<class > | |
| class | CudaBufferView |
| constexpr bool | operator== (CudaBufferView const &, CudaBufferView const &)=default |
Non-owning opaque view into one logical CUDA buffer.
The view carries completion-domain identity and an element offset, but deliberately exposes no raw device pointer or host-side value conversion. CUDA lowering must first acquire synchronized access to buffer() on an operation stream.
| using uni20::cuda::CudaBufferView< ElementType >::buffer_reference = std::conditional_t<std::is_const_v<element_type>, buffer_type const&, buffer_type&> |
| using uni20::cuda::CudaBufferView< ElementType >::buffer_type = CudaBuffer<value_type> |
| using uni20::cuda::CudaBufferView< ElementType >::element_type = ElementType |
| using uni20::cuda::CudaBufferView< ElementType >::value_type = std::remove_const_t<element_type> |
|
constexprdefaultnoexcept |
|
inlineexplicitconstexprnoexcept |
Construct a view at the beginning of a CUDA buffer.
|
inlineconstexprnoexcept |
Convert a mutable view into a read-only view.
|
inline |
Return the CUDA buffer whose completion ledger governs access.
|
inlineconstexprnoexcept |
Return this view's element offset from the logical buffer start.
|
inlineconstexprnoexcept |
Return a view advanced by an element offset.
std::size_t.
|
inlineexplicitconstexprnoexcept |
Return whether this view identifies a CUDA buffer.
|
friend |