xtensor
|
Public Types | |
using | base_type = xaccessible<D> |
using | inner_types = xcontainer_inner_types<D> |
using | xexpression_type = typename inner_types::xexpression_type |
using | undecay_expression = typename inner_types::undecay_expression |
using | value_type = typename xexpression_type::value_type |
using | reference = typename inner_types::reference |
using | const_reference = typename inner_types::const_reference |
using | pointer |
using | const_pointer = typename xexpression_type::const_pointer |
using | size_type = typename inner_types::size_type |
using | difference_type = typename xexpression_type::difference_type |
using | storage_getter = typename inner_types::storage_getter |
using | inner_storage_type = typename inner_types::inner_storage_type |
using | storage_type = std::remove_reference_t<inner_storage_type> |
using | shape_type = typename inner_types::shape_type |
using | strides_type = get_strides_t<shape_type> |
using | backstrides_type = strides_type |
using | inner_shape_type = shape_type |
using | inner_strides_type = strides_type |
using | inner_backstrides_type = backstrides_type |
using | undecay_shape = typename inner_types::undecay_shape |
using | simd_value_type = xt_simd::simd_type<value_type> |
using | bool_load_type = typename xexpression_type::bool_load_type |
Public Types inherited from xt::xaccessible< D > | |
using | base_type = xconst_accessible<D> |
using | derived_type = typename base_type::derived_type |
using | reference = typename base_type::reference |
using | size_type = typename base_type::size_type |
Public Types inherited from xt::xconst_accessible< D > | |
using | derived_type = D |
using | inner_types = xcontainer_inner_types<D> |
using | reference = typename inner_types::reference |
using | const_reference = typename inner_types::const_reference |
using | size_type = typename inner_types::size_type |
Public Member Functions | |
template<class... Args> | |
reference | operator() (Args... args) |
template<class... Args> | |
const_reference | operator() (Args... args) const |
template<class... Args> | |
reference | unchecked (Args... args) |
template<class... Args> | |
const_reference | unchecked (Args... args) const |
template<class It > | |
reference | element (It first, It last) |
template<class It > | |
const_reference | element (It first, It last) const |
template<class E = xexpression_type, class ST = storage_type> | |
std::enable_if_t< detail::provides_data_interface< E, ST >::value, pointer > | data () noexcept |
template<class E = xexpression_type, class ST = storage_type> | |
std::enable_if_t< detail::provides_data_interface< E, ST >::value, const_pointer > | data () const noexcept |
Constructor | |
template<class CTA , class SA > | |
xstrided_view_base (CTA &&e, SA &&shape, strides_type &&strides, size_type offset, layout_type layout) noexcept | |
Constructs an xstrided_view_base. | |
xstrided_view_base (xstrided_view_base &&rhs) | |
xstrided_view_base (const xstrided_view_base &rhs) | |
Size and shape | |
const inner_shape_type & | shape () const noexcept |
Returns the shape of the xtrided_view_base. | |
const inner_strides_type & | strides () const noexcept |
Returns the strides of the xtrided_view_base. | |
const inner_backstrides_type & | backstrides () const noexcept |
Returns the backstrides of the xtrided_view_base. | |
layout_type | layout () const noexcept |
Returns the layout of the xtrided_view_base. | |
bool | is_contiguous () const noexcept |
Data | |
reference | operator() () |
const_reference | operator() () const |
storage_type & | storage () noexcept |
Returns a reference to the buffer containing the elements of the view. | |
const storage_type & | storage () const noexcept |
Returns a constant reference to the buffer containing the elements of the view. | |
size_type | data_offset () const noexcept |
Returns the offset to the first element in the view. | |
xexpression_type & | expression () noexcept |
Returns a reference to the underlying expression of the view. | |
const xexpression_type & | expression () const noexcept |
Returns a constant reference to the underlying expression of the view. | |
template<class... Args> | |
auto | operator() (Args... args) -> reference |
Returns a reference to the element at the specified position in the view. | |
template<class... Args> | |
auto | operator() (Args... args) const -> const_reference |
Returns a constant reference to the element at the specified position in the view. | |
template<class... Args> | |
auto | unchecked (Args... args) -> reference |
Returns a reference to the element at the specified position in the view. | |
template<class... Args> | |
auto | unchecked (Args... args) const -> const_reference |
Returns a constant reference to the element at the specified position in the view. | |
template<class It > | |
auto | element (It first, It last) -> reference |
Returns a reference to the element at the specified position in the view. | |
template<class It > | |
auto | element (It first, It last) const -> const_reference |
Returns a constant reference to the element at the specified position in the view. | |
template<class E , class ST > | |
auto | data () noexcept -> std::enable_if_t< detail::provides_data_interface< E, ST >::value, pointer > |
Returns a pointer to the underlying array serving as element storage. | |
template<class E , class ST > | |
auto | data () const noexcept -> std::enable_if_t< detail::provides_data_interface< E, ST >::value, const_pointer > |
Returns a constant pointer to the underlying array serving as element storage. | |
Public Member Functions inherited from xt::xaccessible< D > | |
template<class... Args> | |
reference | at (Args... args) |
template<class S > | |
disable_integral_t< S, reference > | operator[] (const S &index) |
template<class I > | |
reference | operator[] (std::initializer_list< I > index) |
reference | operator[] (size_type i) |
template<class... Args> | |
reference | periodic (Args... args) |
reference | front () |
Returns a reference to the first element of the expression. | |
reference | back () |
Returns a reference to the last element of the expression. | |
template<class... Args> | |
auto | at (Args... args) -> reference |
Returns a reference to the element at the specified position in the expression, after dimension and bounds checking. | |
template<class S > | |
auto | operator[] (const S &index) -> disable_integral_t< S, reference > |
Returns a reference to the element at the specified position in the expression. | |
template<class I > | |
auto | operator[] (std::initializer_list< I > index) -> reference |
template<class... Args> | |
auto | periodic (Args... args) -> reference |
Returns a reference to the element at the specified position in the expression, after applying periodicity to the indices (negative and 'overflowing' indices are changed). | |
template<class... Args> | |
const_reference | at (Args... args) const |
template<class... Args> | |
auto | at (Args... args) const -> const_reference |
Returns a constant reference to the element at the specified position in the expression, after dimension and bounds checking. | |
const_reference | back () const |
Returns a constant reference to last the element of the expression. | |
const_reference | front () const |
Returns a constant reference to first the element of the expression. | |
template<class... Args> | |
const_reference | periodic (Args... args) const |
template<class... Args> | |
auto | periodic (Args... args) const -> const_reference |
Returns a constant reference to the element at the specified position in the expression, after applying periodicity to the indices (negative and 'overflowing' indices are changed). | |
Public Member Functions inherited from xt::xconst_accessible< D > | |
size_type | size () const noexcept |
Returns the size of the expression. | |
size_type | dimension () const noexcept |
Returns the number of dimensions of the expression. | |
size_type | shape (size_type index) const |
Returns the i-th dimension of the expression. | |
template<class... Args> | |
const_reference | at (Args... args) const |
template<class S > | |
disable_integral_t< S, const_reference > | operator[] (const S &index) const |
template<class I > | |
const_reference | operator[] (std::initializer_list< I > index) const |
const_reference | operator[] (size_type i) const |
template<class... Args> | |
const_reference | periodic (Args... args) const |
template<class... Args> | |
bool | in_bounds (Args... args) const |
Returns true only if the the specified position is a valid entry in the expression. | |
const_reference | front () const |
Returns a constant reference to first the element of the expression. | |
const_reference | back () const |
Returns a constant reference to last the element of the expression. | |
template<class... Args> | |
auto | at (Args... args) const -> const_reference |
Returns a constant reference to the element at the specified position in the expression, after dimension and bounds checking. | |
template<class S > | |
auto | operator[] (const S &index) const -> disable_integral_t< S, const_reference > |
Returns a constant reference to the element at the specified position in the expression. | |
template<class I > | |
auto | operator[] (std::initializer_list< I > index) const -> const_reference |
template<class... Args> | |
auto | periodic (Args... args) const -> const_reference |
Returns a constant reference to the element at the specified position in the expression, after applying periodicity to the indices (negative and 'overflowing' indices are changed). | |
Static Public Attributes | |
static constexpr bool | is_const = std::is_const<std::remove_reference_t<undecay_expression>>::value |
static constexpr layout_type | static_layout = inner_types::layout |
static constexpr bool | contiguous_layout |
Protected Types | |
using | offset_type = typename strides_type::value_type |
Protected Member Functions | |
template<class... Args> | |
offset_type | compute_index (Args... args) const |
template<class... Args> | |
offset_type | compute_unchecked_index (Args... args) const |
template<class It > | |
offset_type | compute_element_index (It first, It last) const |
Protected Member Functions inherited from xt::xaccessible< D > | |
xaccessible (const xaccessible &)=default | |
xaccessible & | operator= (const xaccessible &)=default |
xaccessible (xaccessible &&)=default | |
xaccessible & | operator= (xaccessible &&)=default |
Protected Member Functions inherited from xt::xconst_accessible< D > | |
xconst_accessible (const xconst_accessible &)=default | |
xconst_accessible & | operator= (const xconst_accessible &)=default |
xconst_accessible (xconst_accessible &&)=default | |
xconst_accessible & | operator= (xconst_accessible &&)=default |
Broadcasting | |
template<class O > | |
bool | broadcast_shape (O &shape, bool reuse_cache=false) const |
Broadcast the shape of the view to the specified parameter. | |
template<class O > | |
bool | has_linear_assign (const O &strides) const noexcept |
Checks whether the xstrided_view_base can be linearly assigned to an expression with the specified strides. | |
template<class... Args> | |
auto | compute_index (Args... args) const -> offset_type |
template<class... Args> | |
auto | compute_unchecked_index (Args... args) const -> offset_type |
template<class It > | |
auto | compute_element_index (It first, It last) const -> offset_type |
void | set_offset (size_type offset) |
Definition at line 96 of file xstrided_view_base.hpp.
using xt::xstrided_view_base< D >::backstrides_type = strides_type |
Definition at line 121 of file xstrided_view_base.hpp.
using xt::xstrided_view_base< D >::base_type = xaccessible<D> |
Definition at line 100 of file xstrided_view_base.hpp.
using xt::xstrided_view_base< D >::bool_load_type = typename xexpression_type::bool_load_type |
Definition at line 130 of file xstrided_view_base.hpp.
using xt::xstrided_view_base< D >::const_pointer = typename xexpression_type::const_pointer |
Definition at line 111 of file xstrided_view_base.hpp.
using xt::xstrided_view_base< D >::const_reference = typename inner_types::const_reference |
Definition at line 108 of file xstrided_view_base.hpp.
using xt::xstrided_view_base< D >::difference_type = typename xexpression_type::difference_type |
Definition at line 113 of file xstrided_view_base.hpp.
using xt::xstrided_view_base< D >::inner_backstrides_type = backstrides_type |
Definition at line 125 of file xstrided_view_base.hpp.
using xt::xstrided_view_base< D >::inner_shape_type = shape_type |
Definition at line 123 of file xstrided_view_base.hpp.
using xt::xstrided_view_base< D >::inner_storage_type = typename inner_types::inner_storage_type |
Definition at line 116 of file xstrided_view_base.hpp.
using xt::xstrided_view_base< D >::inner_strides_type = strides_type |
Definition at line 124 of file xstrided_view_base.hpp.
using xt::xstrided_view_base< D >::inner_types = xcontainer_inner_types<D> |
Definition at line 101 of file xstrided_view_base.hpp.
|
protected |
Definition at line 191 of file xstrided_view_base.hpp.
using xt::xstrided_view_base< D >::pointer |
Definition at line 109 of file xstrided_view_base.hpp.
Definition at line 107 of file xstrided_view_base.hpp.
Definition at line 119 of file xstrided_view_base.hpp.
using xt::xstrided_view_base< D >::simd_value_type = xt_simd::simd_type<value_type> |
Definition at line 129 of file xstrided_view_base.hpp.
Definition at line 112 of file xstrided_view_base.hpp.
using xt::xstrided_view_base< D >::storage_getter = typename inner_types::storage_getter |
Definition at line 115 of file xstrided_view_base.hpp.
using xt::xstrided_view_base< D >::storage_type = std::remove_reference_t<inner_storage_type> |
Definition at line 117 of file xstrided_view_base.hpp.
using xt::xstrided_view_base< D >::strides_type = get_strides_t<shape_type> |
Definition at line 120 of file xstrided_view_base.hpp.
using xt::xstrided_view_base< D >::undecay_expression = typename inner_types::undecay_expression |
Definition at line 103 of file xstrided_view_base.hpp.
using xt::xstrided_view_base< D >::undecay_shape = typename inner_types::undecay_shape |
Definition at line 127 of file xstrided_view_base.hpp.
using xt::xstrided_view_base< D >::value_type = typename xexpression_type::value_type |
Definition at line 106 of file xstrided_view_base.hpp.
using xt::xstrided_view_base< D >::xexpression_type = typename inner_types::xexpression_type |
Definition at line 102 of file xstrided_view_base.hpp.
|
inlinenoexcept |
Constructs an xstrided_view_base.
e | the underlying xexpression for this view |
shape | the shape of the view |
strides | the strides of the view |
offset | the offset of the first element in the underlying container |
layout | the layout of the view |
Definition at line 313 of file xstrided_view_base.hpp.
|
inline |
Definition at line 351 of file xstrided_view_base.hpp.
|
inline |
Definition at line 364 of file xstrided_view_base.hpp.
|
inlinenoexcept |
Returns the backstrides of the xtrided_view_base.
Definition at line 404 of file xstrided_view_base.hpp.
|
inline |
Broadcast the shape of the view to the specified parameter.
shape | the result shape |
reuse_cache | parameter for internal optimization |
Definition at line 641 of file xstrided_view_base.hpp.
|
inline |
Definition at line 679 of file xstrided_view_base.hpp.
|
inline |
Definition at line 663 of file xstrided_view_base.hpp.
|
inline |
Definition at line 671 of file xstrided_view_base.hpp.
|
inlinenoexcept |
Returns a constant pointer to the underlying array serving as element storage.
The first element of the view is at data() + data_offset().
Definition at line 594 of file xstrided_view_base.hpp.
|
inlinenoexcept |
Returns a pointer to the underlying array serving as element storage.
The first element of the view is at data() + data_offset().
Definition at line 582 of file xstrided_view_base.hpp.
|
inlinenoexcept |
Returns the offset to the first element in the view.
Definition at line 604 of file xstrided_view_base.hpp.
|
inline |
Returns a reference to the element at the specified position in the view.
first | iterator starting the sequence of indices |
last | iterator ending the sequence of indices The number of indices in the sequence should be equal to or greater than the the number of dimensions of the view.. |
Definition at line 537 of file xstrided_view_base.hpp.
|
inline |
Returns a constant reference to the element at the specified position in the view.
first | iterator starting the sequence of indices |
last | iterator ending the sequence of indices The number of indices in the sequence should be equal to or greater than the the number of dimensions of the view.. |
Definition at line 552 of file xstrided_view_base.hpp.
|
inlinenoexcept |
Returns a constant reference to the underlying expression of the view.
Definition at line 622 of file xstrided_view_base.hpp.
|
inlinenoexcept |
Returns a reference to the underlying expression of the view.
Definition at line 613 of file xstrided_view_base.hpp.
|
inlinenoexcept |
Checks whether the xstrided_view_base can be linearly assigned to an expression with the specified strides.
Definition at line 653 of file xstrided_view_base.hpp.
|
inlinenoexcept |
Definition at line 419 of file xstrided_view_base.hpp.
|
inlinenoexcept |
Returns the layout of the xtrided_view_base.
Definition at line 413 of file xstrided_view_base.hpp.
|
inline |
Definition at line 431 of file xstrided_view_base.hpp.
|
inline |
Definition at line 437 of file xstrided_view_base.hpp.
|
inline |
Returns a reference to the element at the specified position in the view.
args | a list of indices specifying the position in the view. Indices must be unsigned integers, the number of indices should be equal or greater than the number of dimensions of the view. |
Definition at line 450 of file xstrided_view_base.hpp.
|
inline |
Returns a constant reference to the element at the specified position in the view.
args | a list of indices specifying the position in the view. Indices must be unsigned integers, the number of indices should be equal or greater than the number of dimensions of the view. |
Definition at line 466 of file xstrided_view_base.hpp.
|
protected |
Definition at line 685 of file xstrided_view_base.hpp.
|
inlinenoexcept |
Returns the shape of the xtrided_view_base.
Definition at line 386 of file xstrided_view_base.hpp.
|
inlinenoexcept |
Returns a constant reference to the buffer containing the elements of the view.
Definition at line 571 of file xstrided_view_base.hpp.
|
inlinenoexcept |
Returns a reference to the buffer containing the elements of the view.
Definition at line 562 of file xstrided_view_base.hpp.
|
inlinenoexcept |
Returns the strides of the xtrided_view_base.
Definition at line 395 of file xstrided_view_base.hpp.
|
inline |
Returns a reference to the element at the specified position in the view.
args | a list of indices specifying the position in the view. Indices must be unsigned integers, the number of indices must be equal to the number of dimensions of the view, else the behavior is undefined. |
Definition at line 495 of file xstrided_view_base.hpp.
|
inline |
Returns a constant reference to the element at the specified position in the view.
args | a list of indices specifying the position in the view. Indices must be unsigned integers, the number of indices must be equal to the number of dimensions of the view, else the behavior is undefined. |
Definition at line 522 of file xstrided_view_base.hpp.
Definition at line 133 of file xstrided_view_base.hpp.
|
staticconstexpr |
Definition at line 104 of file xstrided_view_base.hpp.
|
staticconstexpr |
Definition at line 132 of file xstrided_view_base.hpp.