|
Uni20
Asynchronous tensor and runtime library.
|
Scoped read-only access to a CUDA buffer on one stream. More...
#include <buffer.hpp>
Public Types | |
| using | element_type = T |
Public Member Functions | |
| T const * | data () const noexcept |
| Return the typed device pointer for read-only CUDA work. | |
| ReadAccess & | operator= (ReadAccess &&other) noexcept |
| ReadAccess & | operator= (ReadAccess const &)=delete |
| ReadAccess (ReadAccess &&other) noexcept | |
| ReadAccess (ReadAccess const &)=delete | |
| void | release () noexcept |
| Publish this read 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 > const & | storage () const |
| Return the CUDA buffer retained by this access object. | |
| ~ReadAccess () | |
Friends | |
| class | CudaBuffer< T > |
Scoped read-only access to a CUDA buffer on one stream.
The constructor installs predecessor waits on the stream. The destructor records a reader completion at the current stream tail and publishes it back to the buffer.
| using uni20::cuda::ReadAccess< T >::element_type = T |
|
delete |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
Return the typed device pointer for read-only CUDA work.
|
inlinenoexcept |
|
delete |
|
inlinenoexcept |
Publish this read 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 CUDA buffer retained by this access object.
|
friend |