|
Uni20
Asynchronous tensor and runtime library.
|
Accessor that evaluates a generator at the logical index encoded by an offset. More...
#include <generated_accessor.hpp>
Public Types | |
| using | data_handle_type = generated_data_handle |
| using | element_type = value_type const |
| using | extents_type = Extents |
| using | generator_type = Generator |
| using | index_type = typename extents_type::index_type |
| using | offset_policy = generated_accessor |
| using | offset_type = std::size_t |
| using | reference = value_type |
| using | value_type = std::remove_cv_t< ElementType > |
Public Member Functions | |
| UNI20_HOST_DEVICE constexpr reference | access (data_handle_type handle, offset_type offset) const |
| Generate the value at a handle-relative synthetic offset. | |
| UNI20_HOST_DEVICE constexpr auto | extents () const noexcept -> extents_type const & |
| Return the extents used to decode generated offsets. | |
| UNI20_HOST_DEVICE constexpr | generated_accessor ()=default |
| UNI20_HOST_DEVICE constexpr | generated_accessor (extents_type extents, generator_type generator) |
| Construct an accessor from the original extents and generator state. | |
| UNI20_HOST_DEVICE constexpr auto | generator () const noexcept -> generator_type const & |
| Return the stored generator state. | |
| UNI20_HOST_DEVICE constexpr data_handle_type | offset (data_handle_type handle, offset_type offset) const noexcept |
| Advance a generated handle while preserving its original index space. | |
Accessor that evaluates a generator at the logical index encoded by an offset.
| ElementType | Scalar value returned by the generator. |
| Extents | Mdspan extents used to decode linear offsets. |
| Generator | Callable accepting an index array and returning an element value. |
| using uni20::generated_accessor< ElementType, Extents, Generator >::data_handle_type = generated_data_handle |
| using uni20::generated_accessor< ElementType, Extents, Generator >::element_type = value_type const |
| using uni20::generated_accessor< ElementType, Extents, Generator >::extents_type = Extents |
| using uni20::generated_accessor< ElementType, Extents, Generator >::generator_type = Generator |
| using uni20::generated_accessor< ElementType, Extents, Generator >::index_type = typename extents_type::index_type |
| using uni20::generated_accessor< ElementType, Extents, Generator >::offset_policy = generated_accessor |
| using uni20::generated_accessor< ElementType, Extents, Generator >::offset_type = std::size_t |
| using uni20::generated_accessor< ElementType, Extents, Generator >::reference = value_type |
| using uni20::generated_accessor< ElementType, Extents, Generator >::value_type = std::remove_cv_t<ElementType> |
|
constexprdefault |
|
inlineconstexpr |
Construct an accessor from the original extents and generator state.
|
inlineconstexpr |
Generate the value at a handle-relative synthetic offset.
|
inlineconstexprnoexcept |
Return the extents used to decode generated offsets.
|
inlineconstexprnoexcept |
Return the stored generator state.
|
inlineconstexprnoexcept |
Advance a generated handle while preserving its original index space.