xtensor
Loading...
Searching...
No Matches
xt::xshared_expression< E > Class Template Reference

Shared xexpressions. More...

#include <xexpression.hpp>

Inheritance diagram for xt::xshared_expression< E >:
xt::xexpression< xshared_expression< E > >

Public Types

using base_class = xexpression<xshared_expression<E>>
using value_type = typename E::value_type
using reference = typename E::reference
using const_reference = typename E::const_reference
using pointer = typename E::pointer
using const_pointer = typename E::const_pointer
using size_type = typename E::size_type
using difference_type = typename E::difference_type
using inner_shape_type = typename E::inner_shape_type
using shape_type = typename E::shape_type
using strides_type
using backstrides_type
using inner_strides_type
using inner_backstrides_type
using storage_type
using stepper = typename E::stepper
using const_stepper = typename E::const_stepper
using linear_iterator = decltype(xt::linear_begin(std::declval<E&>()))
using const_linear_iterator = decltype(xt::linear_begin(std::declval<const E&>()))
using reverse_linear_iterator = std::reverse_iterator<linear_iterator>
using const_reverse_linear_iterator = std::reverse_iterator<const_linear_iterator>
using bool_load_type = typename E::bool_load_type
Public Types inherited from xt::xexpression< xshared_expression< E > >
using derived_type

Public Member Functions

template<class... Args>
auto operator() (Args... args) -> decltype(std::declval< E >()(args...))
auto shape () const -> decltype(std::declval< xtl::constify_t< E > >().shape())
auto dimension () const -> decltype(std::declval< xtl::constify_t< E > >().dimension())
auto size () const -> decltype(std::declval< xtl::constify_t< E > >().size())
auto layout () const -> decltype(std::declval< xtl::constify_t< E > >().layout())
auto is_contiguous () const -> decltype(std::declval< xtl::constify_t< E > >().is_contiguous())
template<layout_type L = ::xt::layout_type::row_major, class S>
auto begin (const S &shape) noexcept -> decltype(std::declval< E >().template begin< L >(shape))
template<layout_type L = ::xt::layout_type::row_major>
auto begin () noexcept -> decltype(std::declval< E >().template begin< L >())
template<layout_type L = ::xt::layout_type::row_major, class S>
auto end (const S &shape) noexcept -> decltype(std::declval< E >().template end< L >(shape))
template<layout_type L = ::xt::layout_type::row_major>
auto end () noexcept -> decltype(std::declval< E >().template end< L >())
template<layout_type L = ::xt::layout_type::row_major>
auto begin () const noexcept -> decltype(std::declval< xtl::constify_t< E > >().template begin< L >())
template<layout_type L = ::xt::layout_type::row_major, class S>
auto begin (const S &shape) const noexcept -> decltype(std::declval< xtl::constify_t< E > >().template begin< L >(shape))
template<layout_type L = ::xt::layout_type::row_major>
auto end () const noexcept -> decltype(std::declval< xtl::constify_t< E > >().template end< L >())
template<layout_type L = ::xt::layout_type::row_major, class S>
auto end (const S &shape) const noexcept -> decltype(std::declval< xtl::constify_t< E > >().template end< L >(shape))
template<layout_type L = ::xt::layout_type::row_major>
auto cbegin () const noexcept -> decltype(std::declval< xtl::constify_t< E > >().template cbegin< L >())
template<layout_type L = ::xt::layout_type::row_major, class S>
auto cbegin (const S &shape) const noexcept -> decltype(std::declval< xtl::constify_t< E > >().template cbegin< L >(shape))
template<layout_type L = ::xt::layout_type::row_major>
auto cend () const noexcept -> decltype(std::declval< xtl::constify_t< E > >().template cend< L >())
template<layout_type L = ::xt::layout_type::row_major, class S>
auto cend (const S &shape) const noexcept -> decltype(std::declval< xtl::constify_t< E > >().template cend< L >(shape))
template<layout_type L = ::xt::layout_type::row_major, class S>
auto rbegin (const S &shape) noexcept -> decltype(std::declval< E >().template rbegin< L >(shape))
template<layout_type L = ::xt::layout_type::row_major>
auto rbegin () noexcept -> decltype(std::declval< E >().template rbegin< L >())
template<layout_type L = ::xt::layout_type::row_major, class S>
auto rend (const S &shape) noexcept -> decltype(std::declval< E >().template rend< L >(shape))
template<layout_type L = ::xt::layout_type::row_major>
auto rend () noexcept -> decltype(std::declval< E >().template rend< L >())
template<layout_type L = ::xt::layout_type::row_major>
auto rbegin () const noexcept -> decltype(std::declval< xtl::constify_t< E > >().template rbegin< L >())
template<layout_type L = ::xt::layout_type::row_major, class S>
auto rbegin (const S &shape) const noexcept -> decltype(std::declval< xtl::constify_t< E > >().template rbegin< L >(shape))
template<layout_type L = ::xt::layout_type::row_major>
auto rend () const noexcept -> decltype(std::declval< xtl::constify_t< E > >().template rend< L >())
template<layout_type L = ::xt::layout_type::row_major, class S>
auto rend (const S &shape) const noexcept -> decltype(std::declval< xtl::constify_t< E > >().template rend< L >(shape))
template<layout_type L = ::xt::layout_type::row_major>
auto crbegin () const noexcept -> decltype(std::declval< xtl::constify_t< E > >().template crbegin< L >())
template<layout_type L = ::xt::layout_type::row_major, class S>
auto crbegin (const S &shape) const noexcept -> decltype(std::declval< xtl::constify_t< E > >().template crbegin< L >(shape))
template<layout_type L = ::xt::layout_type::row_major>
auto crend () const noexcept -> decltype(std::declval< xtl::constify_t< E > >().template crend< L >())
template<layout_type L = ::xt::layout_type::row_major, class S>
auto crend (const S &shape) const noexcept -> decltype(std::declval< xtl::constify_t< E > >().template crend< L >(shape))
linear_iterator linear_begin () noexcept
linear_iterator linear_end () noexcept
const_linear_iterator linear_begin () const noexcept
const_linear_iterator linear_end () const noexcept
const_linear_iterator linear_cbegin () const noexcept
const_linear_iterator linear_cend () const noexcept
reverse_linear_iterator linear_rbegin () noexcept
reverse_linear_iterator linear_rend () noexcept
const_reverse_linear_iterator linear_rbegin () const noexcept
const_reverse_linear_iterator linear_rend () const noexcept
const_reverse_linear_iterator linear_crbegin () const noexcept
const_reverse_linear_iterator linear_crend () const noexcept
template<class T = E>
std::enable_if_t< strided_expression< T >, const inner_strides_type & > strides () const
template<class T = E>
std::enable_if_t< strided_expression< T >, const inner_strides_type & > backstrides () const
template<class T = E>
std::enable_if_t< data_interface_expression< T >, pointer > data () noexcept
template<class T = E>
std::enable_if_t< data_interface_expression< T >, pointer > data () const noexcept
template<class T = E>
std::enable_if_t< data_interface_expression< T >, size_type > data_offset () const noexcept
template<class T = E>
std::enable_if_t< data_interface_expression< T >, typename T::storage_type & > storage () noexcept
template<class T = E>
std::enable_if_t< data_interface_expression< T >, const typename T::storage_type & > storage () const noexcept
template<class It>
reference element (It first, It last)
template<class It>
const_reference element (It first, It last) const
template<class S>
bool broadcast_shape (S &shape, bool reuse_cache=false) const
template<class S>
bool has_linear_assign (const S &strides) const noexcept
template<class S>
auto stepper_begin (const S &shape) noexcept -> decltype(std::declval< E >().stepper_begin(shape))
template<class S>
auto stepper_end (const S &shape, layout_type l) noexcept -> decltype(std::declval< E >().stepper_end(shape, l))
template<class S>
auto stepper_begin (const S &shape) const noexcept -> decltype(std::declval< const E >().stepper_begin(shape))
template<class S>
auto stepper_end (const S &shape, layout_type l) const noexcept -> decltype(std::declval< const E >().stepper_end(shape, l))
Downcast functions
 xshared_expression (const std::shared_ptr< E > &ptr)
 Constructor for xshared expression (note: usually the free function make_xshared is recommended).
long use_count () const noexcept
 Return the number of times this expression is referenced.
Public Member Functions inherited from xt::xexpression< xshared_expression< E > >
derived_type & derived_cast () &noexcept
 Returns a reference to the actual derived type of the xexpression.
const derived_type & derived_cast () const &noexcept
 Returns a constant reference to the actual derived type of the xexpression.
derived_type derived_cast () &&noexcept
 Returns a constant reference to the actual derived type of the xexpression.

Static Public Attributes

static constexpr layout_type static_layout = E::static_layout
static constexpr bool contiguous_layout = static_layout != layout_type::dynamic

Additional Inherited Members

Protected Member Functions inherited from xt::xexpression< xshared_expression< E > >
 xexpression (const xexpression &)=default
xexpression & operator= (const xexpression &)=default
 xexpression (xexpression &&)=default
xexpression & operator= (xexpression &&)=default

Detailed Description

template<class E>
class xt::xshared_expression< E >

Shared xexpressions.

Due to C++ lifetime constraints it's sometimes necessary to create shared expressions (akin to a shared pointer).

For example, when a temporary expression needs to be used twice in another expression, shared expressions can come to the rescue:

template <class E>
auto cos_plus_sin(xexpression<E>&& expr)
{
// THIS IS WRONG: forwarding rvalue twice not permitted!
// return xt::sin(std::forward<E>(expr)) + xt::cos(std::forward<E>(expr));
// THIS IS WRONG TOO: because second `expr` is taken as reference (which will be invalid)
// return xt::sin(std::forward<E>(expr)) + xt::cos(expr)
auto shared_expr = xt::make_xshared(std::forward<E>(expr));
auto result = xt::sin(shared_expr) + xt::cos(shared_expr);
std::cout << shared_expr.use_count() << std::endl; // Will print 3 because used twice in expression
return result; // all valid because expr lifetime managed by xshared_expression / shared_ptr.
}
auto cos(E &&e) noexcept -> detail::xfunction_type_t< math::cos_fun, E >
Cosine function.
Definition xmath.hpp:1272
auto sin(E &&e) noexcept -> detail::xfunction_type_t< math::sin_fun, E >
Sine function.
Definition xmath.hpp:1257
xshared_expression< E > make_xshared(xexpression< E > &&expr)
Helper function to create shared expression from any xexpression.

Definition at line 511 of file xexpression.hpp.

Member Typedef Documentation

◆ backstrides_type

template<class E>
using xt::xshared_expression< E >::backstrides_type
Initial value:
typename std::
conditional_t<strided_expression<E>, detail::expr_backstrides_type<E>, get_strides_type<shape_type>>::type

Definition at line 530 of file xexpression.hpp.

◆ base_class

template<class E>
using xt::xshared_expression< E >::base_class = xexpression<xshared_expression<E>>

Definition at line 515 of file xexpression.hpp.

◆ bool_load_type

template<class E>
using xt::xshared_expression< E >::bool_load_type = typename E::bool_load_type

Definition at line 549 of file xexpression.hpp.

◆ const_linear_iterator

template<class E>
using xt::xshared_expression< E >::const_linear_iterator = decltype(xt::linear_begin(std::declval<const E&>()))

Definition at line 545 of file xexpression.hpp.

◆ const_pointer

template<class E>
using xt::xshared_expression< E >::const_pointer = typename E::const_pointer

Definition at line 521 of file xexpression.hpp.

◆ const_reference

template<class E>
using xt::xshared_expression< E >::const_reference = typename E::const_reference

Definition at line 519 of file xexpression.hpp.

◆ const_reverse_linear_iterator

template<class E>
using xt::xshared_expression< E >::const_reverse_linear_iterator = std::reverse_iterator<const_linear_iterator>

Definition at line 547 of file xexpression.hpp.

◆ const_stepper

template<class E>
using xt::xshared_expression< E >::const_stepper = typename E::const_stepper

Definition at line 542 of file xexpression.hpp.

◆ difference_type

template<class E>
using xt::xshared_expression< E >::difference_type = typename E::difference_type

Definition at line 523 of file xexpression.hpp.

◆ inner_backstrides_type

template<class E>
using xt::xshared_expression< E >::inner_backstrides_type
Initial value:
typename std::conditional_t<
detail::expr_inner_backstrides_type<E>,

Definition at line 534 of file xexpression.hpp.

◆ inner_shape_type

template<class E>
using xt::xshared_expression< E >::inner_shape_type = typename E::inner_shape_type

Definition at line 525 of file xexpression.hpp.

◆ inner_strides_type

template<class E>
using xt::xshared_expression< E >::inner_strides_type
Initial value:
typename std::
conditional_t<strided_expression<E>, detail::expr_inner_strides_type<E>, get_strides_type<shape_type>>::type

Definition at line 532 of file xexpression.hpp.

◆ linear_iterator

template<class E>
using xt::xshared_expression< E >::linear_iterator = decltype(xt::linear_begin(std::declval<E&>()))

Definition at line 544 of file xexpression.hpp.

◆ pointer

template<class E>
using xt::xshared_expression< E >::pointer = typename E::pointer

Definition at line 520 of file xexpression.hpp.

◆ reference

template<class E>
using xt::xshared_expression< E >::reference = typename E::reference

Definition at line 518 of file xexpression.hpp.

◆ reverse_linear_iterator

template<class E>
using xt::xshared_expression< E >::reverse_linear_iterator = std::reverse_iterator<linear_iterator>

Definition at line 546 of file xexpression.hpp.

◆ shape_type

template<class E>
using xt::xshared_expression< E >::shape_type = typename E::shape_type

Definition at line 526 of file xexpression.hpp.

◆ size_type

template<class E>
using xt::xshared_expression< E >::size_type = typename E::size_type

Definition at line 522 of file xexpression.hpp.

◆ stepper

template<class E>
using xt::xshared_expression< E >::stepper = typename E::stepper

Definition at line 541 of file xexpression.hpp.

◆ storage_type

template<class E>
using xt::xshared_expression< E >::storage_type
Initial value:
typename std::
conditional_t<container_expression<E>, detail::expr_storage_type<E>, make_invalid_type<>>::type

Definition at line 538 of file xexpression.hpp.

◆ strides_type

template<class E>
using xt::xshared_expression< E >::strides_type
Initial value:
typename std::
conditional_t<strided_expression<E>, detail::expr_strides_type<E>, get_strides_type<shape_type>>::type

Definition at line 528 of file xexpression.hpp.

◆ value_type

template<class E>
using xt::xshared_expression< E >::value_type = typename E::value_type

Definition at line 517 of file xexpression.hpp.

Constructor & Destructor Documentation

◆ xshared_expression()

template<class E>
xt::xshared_expression< E >::xshared_expression ( const std::shared_ptr< E > & ptr)
inlineexplicit

Constructor for xshared expression (note: usually the free function make_xshared is recommended).

Parameters
ptrshared ptr that contains the expression
See also
make_xshared

Definition at line 749 of file xexpression.hpp.

Member Function Documentation

◆ backstrides()

template<class E>
template<class T = E>
std::enable_if_t< strided_expression< T >, const inner_strides_type & > xt::xshared_expression< E >::backstrides ( ) const
inline

Definition at line 650 of file xexpression.hpp.

◆ begin() [1/4]

template<class E>
template<layout_type L = ::xt::layout_type::row_major>
auto xt::xshared_expression< E >::begin ( ) const -> decltype(std::declval< xtl::constify_t< E > >().template begin< L >())
inlinenoexcept

Definition at line 571 of file xexpression.hpp.

◆ begin() [2/4]

template<class E>
template<layout_type L = ::xt::layout_type::row_major>
auto xt::xshared_expression< E >::begin ( ) -> decltype(std::declval< E >().template begin< L >())
inlinenoexcept

Definition at line 569 of file xexpression.hpp.

◆ begin() [3/4]

template<class E>
template<layout_type L = ::xt::layout_type::row_major, class S>
auto xt::xshared_expression< E >::begin ( const S & shape) const -> decltype(std::declval< xtl::constify_t< E > >().template begin< L >(shape))
inlinenoexcept

Definition at line 571 of file xexpression.hpp.

◆ begin() [4/4]

template<class E>
template<layout_type L = ::xt::layout_type::row_major, class S>
auto xt::xshared_expression< E >::begin ( const S & shape) -> decltype(std::declval< E >().template begin< L >(shape))
inlinenoexcept

Definition at line 569 of file xexpression.hpp.

◆ broadcast_shape()

template<class E>
template<class S>
bool xt::xshared_expression< E >::broadcast_shape ( S & shape,
bool reuse_cache = false ) const
inline

Definition at line 698 of file xexpression.hpp.

◆ cbegin() [1/2]

template<class E>
template<layout_type L = ::xt::layout_type::row_major>
auto xt::xshared_expression< E >::cbegin ( ) const -> decltype(std::declval< xtl::constify_t< E > >().template cbegin< L >())
inlinenoexcept

Definition at line 573 of file xexpression.hpp.

◆ cbegin() [2/2]

template<class E>
template<layout_type L = ::xt::layout_type::row_major, class S>
auto xt::xshared_expression< E >::cbegin ( const S & shape) const -> decltype(std::declval< xtl::constify_t< E > >().template cbegin< L >(shape))
inlinenoexcept

Definition at line 573 of file xexpression.hpp.

◆ cend() [1/2]

template<class E>
template<layout_type L = ::xt::layout_type::row_major>
auto xt::xshared_expression< E >::cend ( ) const -> decltype(std::declval< xtl::constify_t< E > >().template cend< L >())
inlinenoexcept

Definition at line 574 of file xexpression.hpp.

◆ cend() [2/2]

template<class E>
template<layout_type L = ::xt::layout_type::row_major, class S>
auto xt::xshared_expression< E >::cend ( const S & shape) const -> decltype(std::declval< xtl::constify_t< E > >().template cend< L >(shape))
inlinenoexcept

Definition at line 574 of file xexpression.hpp.

◆ crbegin() [1/2]

template<class E>
template<layout_type L = ::xt::layout_type::row_major>
auto xt::xshared_expression< E >::crbegin ( ) const -> decltype(std::declval< xtl::constify_t< E > >().template crbegin< L >())
inlinenoexcept

Definition at line 580 of file xexpression.hpp.

◆ crbegin() [2/2]

template<class E>
template<layout_type L = ::xt::layout_type::row_major, class S>
auto xt::xshared_expression< E >::crbegin ( const S & shape) const -> decltype(std::declval< xtl::constify_t< E > >().template crbegin< L >(shape))
inlinenoexcept

Definition at line 580 of file xexpression.hpp.

◆ crend() [1/2]

template<class E>
template<layout_type L = ::xt::layout_type::row_major>
auto xt::xshared_expression< E >::crend ( ) const -> decltype(std::declval< xtl::constify_t< E > >().template crend< L >())
inlinenoexcept

Definition at line 581 of file xexpression.hpp.

◆ crend() [2/2]

template<class E>
template<layout_type L = ::xt::layout_type::row_major, class S>
auto xt::xshared_expression< E >::crend ( const S & shape) const -> decltype(std::declval< xtl::constify_t< E > >().template crend< L >(shape))
inlinenoexcept

Definition at line 581 of file xexpression.hpp.

◆ data() [1/2]

template<class E>
template<class T = E>
std::enable_if_t< data_interface_expression< T >, pointer > xt::xshared_expression< E >::data ( ) const
inlinenoexcept

Definition at line 662 of file xexpression.hpp.

◆ data() [2/2]

template<class E>
template<class T = E>
std::enable_if_t< data_interface_expression< T >, pointer > xt::xshared_expression< E >::data ( )
inlinenoexcept

Definition at line 656 of file xexpression.hpp.

◆ data_offset()

template<class E>
template<class T = E>
std::enable_if_t< data_interface_expression< T >, size_type > xt::xshared_expression< E >::data_offset ( ) const
inlinenoexcept

Definition at line 668 of file xexpression.hpp.

◆ dimension()

template<class E>
auto xt::xshared_expression< E >::dimension ( ) const -> decltype(std::declval< xtl::constify_t< E > >().dimension())
inline

Definition at line 564 of file xexpression.hpp.

◆ element() [1/2]

template<class E>
template<class It>
reference xt::xshared_expression< E >::element ( It first,
It last )
inline

Definition at line 686 of file xexpression.hpp.

◆ element() [2/2]

template<class E>
template<class It>
const_reference xt::xshared_expression< E >::element ( It first,
It last ) const
inline

Definition at line 692 of file xexpression.hpp.

◆ end() [1/4]

template<class E>
template<layout_type L = ::xt::layout_type::row_major>
auto xt::xshared_expression< E >::end ( ) const -> decltype(std::declval< xtl::constify_t< E > >().template end< L >())
inlinenoexcept

Definition at line 572 of file xexpression.hpp.

◆ end() [2/4]

template<class E>
template<layout_type L = ::xt::layout_type::row_major>
auto xt::xshared_expression< E >::end ( ) -> decltype(std::declval< E >().template end< L >())
inlinenoexcept

Definition at line 570 of file xexpression.hpp.

◆ end() [3/4]

template<class E>
template<layout_type L = ::xt::layout_type::row_major, class S>
auto xt::xshared_expression< E >::end ( const S & shape) const -> decltype(std::declval< xtl::constify_t< E > >().template end< L >(shape))
inlinenoexcept

Definition at line 572 of file xexpression.hpp.

◆ end() [4/4]

template<class E>
template<layout_type L = ::xt::layout_type::row_major, class S>
auto xt::xshared_expression< E >::end ( const S & shape) -> decltype(std::declval< E >().template end< L >(shape))
inlinenoexcept

Definition at line 570 of file xexpression.hpp.

◆ has_linear_assign()

template<class E>
template<class S>
bool xt::xshared_expression< E >::has_linear_assign ( const S & strides) const
inlinenoexcept

Definition at line 704 of file xexpression.hpp.

◆ is_contiguous()

template<class E>
auto xt::xshared_expression< E >::is_contiguous ( ) const -> decltype(std::declval< xtl::constify_t< E > >().is_contiguous())
inline

Definition at line 567 of file xexpression.hpp.

◆ layout()

template<class E>
auto xt::xshared_expression< E >::layout ( ) const -> decltype(std::declval< xtl::constify_t< E > >().layout())
inline

Definition at line 566 of file xexpression.hpp.

◆ linear_begin() [1/2]

template<class E>
const_linear_iterator xt::xshared_expression< E >::linear_begin ( ) const
inlinenoexcept

Definition at line 593 of file xexpression.hpp.

◆ linear_begin() [2/2]

template<class E>
linear_iterator xt::xshared_expression< E >::linear_begin ( )
inlinenoexcept

Definition at line 583 of file xexpression.hpp.

◆ linear_cbegin()

template<class E>
const_linear_iterator xt::xshared_expression< E >::linear_cbegin ( ) const
inlinenoexcept

Definition at line 603 of file xexpression.hpp.

◆ linear_cend()

template<class E>
const_linear_iterator xt::xshared_expression< E >::linear_cend ( ) const
inlinenoexcept

Definition at line 608 of file xexpression.hpp.

◆ linear_crbegin()

template<class E>
const_reverse_linear_iterator xt::xshared_expression< E >::linear_crbegin ( ) const
inlinenoexcept

Definition at line 633 of file xexpression.hpp.

◆ linear_crend()

template<class E>
const_reverse_linear_iterator xt::xshared_expression< E >::linear_crend ( ) const
inlinenoexcept

Definition at line 638 of file xexpression.hpp.

◆ linear_end() [1/2]

template<class E>
const_linear_iterator xt::xshared_expression< E >::linear_end ( ) const
inlinenoexcept

Definition at line 598 of file xexpression.hpp.

◆ linear_end() [2/2]

template<class E>
linear_iterator xt::xshared_expression< E >::linear_end ( )
inlinenoexcept

Definition at line 588 of file xexpression.hpp.

◆ linear_rbegin() [1/2]

template<class E>
const_reverse_linear_iterator xt::xshared_expression< E >::linear_rbegin ( ) const
inlinenoexcept

Definition at line 623 of file xexpression.hpp.

◆ linear_rbegin() [2/2]

template<class E>
reverse_linear_iterator xt::xshared_expression< E >::linear_rbegin ( )
inlinenoexcept

Definition at line 613 of file xexpression.hpp.

◆ linear_rend() [1/2]

template<class E>
const_reverse_linear_iterator xt::xshared_expression< E >::linear_rend ( ) const
inlinenoexcept

Definition at line 628 of file xexpression.hpp.

◆ linear_rend() [2/2]

template<class E>
reverse_linear_iterator xt::xshared_expression< E >::linear_rend ( )
inlinenoexcept

Definition at line 618 of file xexpression.hpp.

◆ operator()()

template<class E>
template<class... Args>
auto xt::xshared_expression< E >::operator() ( Args... args) -> decltype(std::declval< E >()(args...))
inline

Definition at line 558 of file xexpression.hpp.

◆ rbegin() [1/4]

template<class E>
template<layout_type L = ::xt::layout_type::row_major>
auto xt::xshared_expression< E >::rbegin ( ) const -> decltype(std::declval< xtl::constify_t< E > >().template rbegin< L >())
inlinenoexcept

Definition at line 578 of file xexpression.hpp.

◆ rbegin() [2/4]

template<class E>
template<layout_type L = ::xt::layout_type::row_major>
auto xt::xshared_expression< E >::rbegin ( ) -> decltype(std::declval< E >().template rbegin< L >())
inlinenoexcept

Definition at line 576 of file xexpression.hpp.

◆ rbegin() [3/4]

template<class E>
template<layout_type L = ::xt::layout_type::row_major, class S>
auto xt::xshared_expression< E >::rbegin ( const S & shape) const -> decltype(std::declval< xtl::constify_t< E > >().template rbegin< L >(shape))
inlinenoexcept

Definition at line 578 of file xexpression.hpp.

◆ rbegin() [4/4]

template<class E>
template<layout_type L = ::xt::layout_type::row_major, class S>
auto xt::xshared_expression< E >::rbegin ( const S & shape) -> decltype(std::declval< E >().template rbegin< L >(shape))
inlinenoexcept

Definition at line 576 of file xexpression.hpp.

◆ rend() [1/4]

template<class E>
template<layout_type L = ::xt::layout_type::row_major>
auto xt::xshared_expression< E >::rend ( ) const -> decltype(std::declval< xtl::constify_t< E > >().template rend< L >())
inlinenoexcept

Definition at line 579 of file xexpression.hpp.

◆ rend() [2/4]

template<class E>
template<layout_type L = ::xt::layout_type::row_major>
auto xt::xshared_expression< E >::rend ( ) -> decltype(std::declval< E >().template rend< L >())
inlinenoexcept

Definition at line 577 of file xexpression.hpp.

◆ rend() [3/4]

template<class E>
template<layout_type L = ::xt::layout_type::row_major, class S>
auto xt::xshared_expression< E >::rend ( const S & shape) const -> decltype(std::declval< xtl::constify_t< E > >().template rend< L >(shape))
inlinenoexcept

Definition at line 579 of file xexpression.hpp.

◆ rend() [4/4]

template<class E>
template<layout_type L = ::xt::layout_type::row_major, class S>
auto xt::xshared_expression< E >::rend ( const S & shape) -> decltype(std::declval< E >().template rend< L >(shape))
inlinenoexcept

Definition at line 577 of file xexpression.hpp.

◆ shape()

template<class E>
auto xt::xshared_expression< E >::shape ( ) const -> decltype(std::declval< xtl::constify_t< E > >().shape())
inline

Definition at line 563 of file xexpression.hpp.

◆ size()

template<class E>
auto xt::xshared_expression< E >::size ( ) const -> decltype(std::declval< xtl::constify_t< E > >().size())
inline

Definition at line 565 of file xexpression.hpp.

◆ stepper_begin() [1/2]

template<class E>
template<class S>
auto xt::xshared_expression< E >::stepper_begin ( const S & shape) const -> decltype(std::declval< const E >().stepper_begin(shape))
inlinenoexcept

Definition at line 723 of file xexpression.hpp.

◆ stepper_begin() [2/2]

template<class E>
template<class S>
auto xt::xshared_expression< E >::stepper_begin ( const S & shape) -> decltype(std::declval< E >().stepper_begin(shape))
inlinenoexcept

Definition at line 710 of file xexpression.hpp.

◆ stepper_end() [1/2]

template<class E>
template<class S>
auto xt::xshared_expression< E >::stepper_end ( const S & shape,
layout_type l ) const -> decltype(std::declval< const E >().stepper_end(shape, l))
inlinenoexcept

Definition at line 730 of file xexpression.hpp.

◆ stepper_end() [2/2]

template<class E>
template<class S>
auto xt::xshared_expression< E >::stepper_end ( const S & shape,
layout_type l ) -> decltype(std::declval< E >().stepper_end(shape, l))
inlinenoexcept

Definition at line 716 of file xexpression.hpp.

◆ storage() [1/2]

template<class E>
template<class T = E>
std::enable_if_t< data_interface_expression< T >, const typename T::storage_type & > xt::xshared_expression< E >::storage ( ) const
inlinenoexcept

Definition at line 680 of file xexpression.hpp.

◆ storage() [2/2]

template<class E>
template<class T = E>
std::enable_if_t< data_interface_expression< T >, typename T::storage_type & > xt::xshared_expression< E >::storage ( )
inlinenoexcept

Definition at line 674 of file xexpression.hpp.

◆ strides()

template<class E>
template<class T = E>
std::enable_if_t< strided_expression< T >, const inner_strides_type & > xt::xshared_expression< E >::strides ( ) const
inline

Definition at line 644 of file xexpression.hpp.

◆ use_count()

template<class E>
long xt::xshared_expression< E >::use_count ( ) const
inlinenoexcept

Return the number of times this expression is referenced.

Internally calls the use_count() function of the std::shared_ptr.

Definition at line 759 of file xexpression.hpp.

Member Data Documentation

◆ contiguous_layout

template<class E>
bool xt::xshared_expression< E >::contiguous_layout = static_layout != layout_type::dynamic
staticconstexpr

Definition at line 552 of file xexpression.hpp.

◆ static_layout

template<class E>
layout_type xt::xshared_expression< E >::static_layout = E::static_layout
staticconstexpr

Definition at line 551 of file xexpression.hpp.


The documentation for this class was generated from the following file: