|
MU Library
|
Pointer to a kernel output buffer. More...
#include <access.hpp>
Public Types | |
| using | element_type = T |
| using | kernel_buffer_direction = detail::output_buffer_direction |
| using | pointer = T * |
Public Member Functions | |
| constexpr | output_ptr () noexcept=default |
| constexpr | output_ptr (T *ptr) noexcept |
| constexpr | operator pointer () const noexcept |
| constexpr T & | operator* () const noexcept |
| constexpr pointer | operator-> () const noexcept |
| constexpr T & | operator[] (std::ptrdiff_t index) const noexcept |
Pointer to a kernel output buffer.
The typed Launcher treats the pointed-to contents as unnecessary when the kernel starts and synchronizes them back to the host after it finishes. Reading an element before the kernel has written it observes an unspecified value; reading a value after writing it is allowed, so this is not a strict write-only proxy.
Launcher calls still pass the original raw pointer (or an NDArray whose data pointer is adapted by the MU entry wrapper); this type belongs in the kernel signature only. Declare it by value, not by reference.
Definition at line 97 of file access.hpp.
| using mu::output_ptr< T >::element_type = T |
Definition at line 104 of file access.hpp.
| using mu::output_ptr< T >::kernel_buffer_direction = detail::output_buffer_direction |
Definition at line 105 of file access.hpp.
| using mu::output_ptr< T >::pointer = T* |
Definition at line 106 of file access.hpp.
|
constexprdefaultnoexcept |
|
inlineconstexprnoexcept |
Definition at line 109 of file access.hpp.
|
inlineconstexprnoexcept |
Definition at line 114 of file access.hpp.
|
inlineconstexprnoexcept |
Definition at line 119 of file access.hpp.
|
inlineconstexprnoexcept |
Definition at line 124 of file access.hpp.
|
inlineconstexprnoexcept |
Definition at line 129 of file access.hpp.