|
Uni20
Asynchronous tensor and runtime library.
|
Scoped read/write access to a CUDA buffer on one stream. More...
#include <buffer.hpp>
Public Types | |
| using | element_type = T |
Public Member Functions | |
| T * | data () const noexcept |
| Return the typed device pointer for mutating CUDA work. | |
| WriteAccess & | operator= (WriteAccess &&other) noexcept |
| WriteAccess & | operator= (WriteAccess const &)=delete |
| void | release () noexcept |
| Publish this write completion and end the scoped access. | |
| void | release_after_synchronization () noexcept |
| End access after the caller has synchronized the operation stream. | |
| void | release_with_completion (Completion completion) noexcept |
| Publish a caller-recorded completion and end scoped access. | |
| std::size_t | size () const noexcept |
| Return the number of typed elements in the view. | |
| std::size_t | size_bytes () const noexcept |
| Return the number of bytes in the view. | |
| CudaBuffer< T > & | storage () |
| Return the mutable CUDA buffer retained by this access object. | |
| CudaBuffer< T > const & | storage () const |
| Return the read-only CUDA buffer retained by this access object. | |
| WriteAccess (WriteAccess &&other) noexcept | |
| WriteAccess (WriteAccess const &)=delete | |
| ~WriteAccess () | |
Friends | |
| class | CudaBuffer< T > |
Scoped read/write access to a CUDA buffer on one stream.
The constructor installs predecessor waits on the stream. The destructor records an exclusive-writer completion at the current stream tail and publishes it back to the buffer.
| using uni20::cuda::WriteAccess< T >::element_type = T |
|
delete |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
Return the typed device pointer for mutating CUDA work.
|
inlinenoexcept |
|
delete |
|
inlinenoexcept |
Publish this write completion and end the scoped access.
|
inlinenoexcept |
End access after the caller has synchronized the operation stream.
|
inlinenoexcept |
Publish a caller-recorded completion and end scoped access.
|
inlinenoexcept |
Return the number of typed elements in the view.
|
inlinenoexcept |
Return the number of bytes in the view.
|
inline |
Return the mutable CUDA buffer retained by this access object.
|
inline |
Return the read-only CUDA buffer retained by this access object.
|
friend |