|
Uni20
Asynchronous tensor and runtime library.
|
Scoped read/write CUDA pointer access after a host-side synchronization. More...
#include <buffer.hpp>
Public Types | |
| using | element_type = T |
Public Member Functions | |
| BlockingWriteAccess (BlockingWriteAccess &&other) noexcept | |
| BlockingWriteAccess (BlockingWriteAccess const &)=delete | |
| T * | data () const noexcept |
| Return the typed device pointer for a blocking runtime operation. | |
| BlockingWriteAccess & | operator= (BlockingWriteAccess &&other) noexcept |
| BlockingWriteAccess & | operator= (BlockingWriteAccess const &)=delete |
| void | release () noexcept |
| End the scoped host-synchronized write access. | |
| void | release_with_completion (Completion completion) noexcept |
| Publish externally submitted device completion and end the scoped access. | |
| std::size_t | size () const noexcept |
| Return the number of typed elements in the allocation. | |
| 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. | |
| ~BlockingWriteAccess () | |
Friends | |
| class | CudaBuffer< T > |
Scoped read/write CUDA pointer access after a host-side synchronization.
Construction waits for all prior reader and writer completions. Release publishes no CUDA event because the guarded operation must have completed synchronously on the host.
| using uni20::cuda::BlockingWriteAccess< T >::element_type = T |
|
delete |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
Return the typed device pointer for a blocking runtime operation.
|
inlinenoexcept |
|
delete |
|
inlinenoexcept |
End the scoped host-synchronized write access.
|
inlinenoexcept |
Publish externally submitted device completion and end the scoped access.
Use this when a blocking host operation has finished consuming its host operands but leaves ordered device work outstanding.
|
inlinenoexcept |
Return the number of typed elements in the allocation.
|
inline |
Return the mutable CUDA buffer retained by this access object.
|
inline |
Return the read-only CUDA buffer retained by this access object.
|
friend |