|
| ndarray_view_generic (const base &vw, const frame_format &format) |
|
| ndarray_view_generic (byte *start, const frame_format &format, const shape_type &shape, const strides_type &strides) |
|
const frame_format & | format () const noexcept |
|
decltype(auto) | slice (std::ptrdiff_t c, std::ptrdiff_t dimension) const |
|
decltype(auto) | operator[] (std::ptrdiff_t c) const |
|
decltype(auto) | operator() (std::ptrdiff_t start, std::ptrdiff_t end, std::ptrdiff_t step=1) const |
|
decltype(auto) | operator() (std::ptrdiff_t c) const |
|
decltype(auto) | operator() () const |
|
void | reset (const ndarray_view_generic &other) noexcept |
|
void | reset () noexcept |
|
bool | has_default_strides (std::size_t minimal_dimension=0) const noexcept |
| Check if view has default strides. More...
|
|
std::size_t | default_strides_padding (std::size_t minimal_dimension=0) const |
| Returns padding of the view which has default strides. More...
|
|
| ndarray_view () |
| Create null view. More...
|
|
| ndarray_view (pointer start, const shape_type &, const strides_type &) |
| Create view with explicitly specified start, shape and strides. More...
|
|
| ndarray_view (pointer start, const shape_type &shape) |
| Create view with explicitly specified start and shape, with default strides (without padding). More...
|
|
| ndarray_view (const ndarray_view< Dim, std::remove_const_t< byte >> &arr) |
| Copy-construct view. More...
|
|
bool | is_null () const noexcept |
|
| operator bool () const noexcept |
|
void | reset (const ndarray_view &other) noexcept |
|
void | reset () noexcept |
|
void | reset (pointer start, const shape_type &shape, const strides_type &strides) |
|
void | reset (pointer start, const shape_type &shape) |
|
const ndarray_view & | operator= (Arg &&arg) const |
|
const ndarray_view & | operator= (const ndarray_view &other) const |
|
coordinates_type | index_to_coordinates (const index_type &) const |
|
index_type | coordinates_to_index (const coordinates_type &) const |
|
pointer | coordinates_to_pointer (const coordinates_type &) const |
|
ndarray_view | section (const coordinates_type &start, const coordinates_type &end, const strides_type &steps=strides_type(1)) const |
| Cuboid section of view, with interval in each axis. More...
|
|
ndarray_view | section (const span_type &span, const strides_type &steps=strides_type(1)) const |
| Cuboid section of view, defined using ndspan object. More...
|
|
ndarray_view< Dim-1, byte > | slice (std::ptrdiff_t c, std::ptrdiff_t dimension) const |
| Create ndarray_view with one less dimension, by fixing coordinate of axis dimension to c . More...
|
|
decltype(auto) | operator[] (std::ptrdiff_t c) const |
| Subscript operator, creates slice on first dimension. More...
|
|
fcall_result | operator() (std::ptrdiff_t start, std::ptrdiff_t end, std::ptrdiff_t step=1) const |
|
fcall_result | operator() (std::ptrdiff_t c) const |
|
fcall_result | operator() () const |
|
reference | at (const coordinates_type &) const |
|
iterator | begin () const |
|
iterator | end () const |
|
void | assign (const ndarray_view< Dim, T2 > &) const |
|
void | assign (const ndarray_view< Dim, const byte > &other) const |
|
bool | compare (const ndarray_view< Dim, T2 > &) const |
|
bool | compare (const ndarray_view< Dim, const byte > &other) const |
|
bool | operator== (Arg &&arg) const |
|
bool | operator!= (Arg &&arg) const |
|
std::size_t | size () const |
|
pointer | start () const noexcept |
|
const shape_type & | shape () const noexcept |
|
const strides_type & | strides () const noexcept |
|
std::ptrdiff_t | contiguous_length () const noexcept |
|
span_type | full_span () const noexcept |
|
ndarray_view< New_dim, byte > | reshape (const ndsize< New_dim > &) const |
|
ndarray_view< 1+Dim, byte > | add_front_axis () const |
|
ndarray_view | swapaxis (std::size_t axis1, std::size_t axis2) const |
|
template<std::size_t Dim>
class mf::ndarray_view_generic< Dim >
Generic ndarray_view where lower dimension(s) are type-erased.
Elements of ndarray_view_generic<Dim>
represent entire k
-dimensional sections (called frame) of an anterior ndarray_view<Dim + k, Elem>
. This ndarray_view
must have default strides (possibly with padding) for the first k
dimensions. ndarray_view_generic
preserves type information of T
(std::type_info
, along with its sizeof
and alignof
), its actual alignment (last stride of anterior ndarray_view
), and number of elements per frame. Dimension and shape of frame is not preserved.
Generic ndarray view ndarray_view_generic<Dim>
is internally represented as ndarray_view<Dim + 1, byte>
. The last axis corresponds to the type-erased k
-dimensional frame, represented as raw byte array. Its shape and stride are the number and alignment of T
elements in the frame.
Subscripting results in another ndarray_view_generic
of lower dimension.