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 = xtl::mpl::eval_if_t<has_storage_type<E>, detail::expr_storage_type<E>, make_invalid_type<>>
 
using stepper = typename E::stepper
 
using const_stepper = typename E::const_stepper
 
using linear_iterator = typename E::linear_iterator
 
using const_linear_iterator = typename E::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))
 
auto linear_begin () -> decltype(std::declval< E >(). linear_begin())
 
auto linear_end () -> decltype(std::declval< E >(). linear_end())
 
auto linear_begin () const -> decltype(std::declval< xtl::constify_t< E > >(). linear_begin())
 
auto linear_end () const -> decltype(std::declval< xtl::constify_t< E > >(). linear_end())
 
auto linear_cbegin () const -> decltype(std::declval< xtl::constify_t< E > >(). linear_cbegin())
 
auto linear_cend () const -> decltype(std::declval< xtl::constify_t< E > >(). linear_cend())
 
auto linear_rbegin () -> decltype(std::declval< E >(). linear_rbegin())
 
auto linear_rend () -> decltype(std::declval< E >(). linear_rend())
 
auto linear_rbegin () const -> decltype(std::declval< xtl::constify_t< E > >(). linear_rbegin())
 
auto linear_rend () const -> decltype(std::declval< xtl::constify_t< E > >(). linear_rend())
 
auto linear_crbegin () const -> decltype(std::declval< xtl::constify_t< E > >(). linear_crbegin())
 
auto linear_crend () const -> decltype(std::declval< xtl::constify_t< E > >(). linear_crend())
 
template<class T = E>
std::enable_if_t< has_strides< T >::value, const inner_strides_type & > strides () const
 
template<class T = E>
std::enable_if_t< has_strides< T >::value, const inner_strides_type & > backstrides () const
 
template<class T = E>
std::enable_if_t< has_data_interface< T >::value, pointer > data () noexcept
 
template<class T = E>
std::enable_if_t< has_data_interface< T >::value, pointer > data () const noexcept
 
template<class T = E>
std::enable_if_t< has_data_interface< T >::value, size_type > data_offset () const noexcept
 
template<class T = E>
std::enable_if_t< has_data_interface< T >::value, typename T::storage_type & > storage () noexcept
 
template<class T = E>
std::enable_if_t< has_data_interface< T >::value, 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_typederived_cast () &noexcept
 Returns a reference to the actual derived type of the xexpression.
 
const derived_typederived_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 (xexpression &&)=default
 
xexpressionoperator= (const xexpression &)=default
 
xexpressionoperator= (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>
{
// 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));
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:1310
auto sin(E &&e) noexcept -> detail::xfunction_type_t< math::sin_fun, E >
Sine function.
Definition xmath.hpp:1295
xshared_expression< E > make_xshared(xexpression< E > &&expr)
Helper function to create shared expression from any xexpression.

Definition at line 508 of file xexpression.hpp.

Member Typedef Documentation

◆ backstrides_type

template<class E >
using xt::xshared_expression< E >::backstrides_type
Initial value:
xtl::mpl::
eval_if_t<has_strides<E>, detail::expr_backstrides_type<E>, get_strides_type<shape_type>>

Definition at line 527 of file xexpression.hpp.

◆ base_class

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

Definition at line 512 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 541 of file xexpression.hpp.

◆ const_linear_iterator

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

Definition at line 539 of file xexpression.hpp.

◆ const_pointer

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

Definition at line 518 of file xexpression.hpp.

◆ const_reference

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

Definition at line 516 of file xexpression.hpp.

◆ const_stepper

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

Definition at line 536 of file xexpression.hpp.

◆ difference_type

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

Definition at line 520 of file xexpression.hpp.

◆ inner_backstrides_type

template<class E >
using xt::xshared_expression< E >::inner_backstrides_type
Initial value:
xtl::mpl::
eval_if_t<has_strides<E>, detail::expr_inner_backstrides_type<E>, get_strides_type<shape_type>>

Definition at line 531 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 522 of file xexpression.hpp.

◆ inner_strides_type

template<class E >
using xt::xshared_expression< E >::inner_strides_type
Initial value:
xtl::mpl::
eval_if_t<has_strides<E>, detail::expr_inner_strides_type<E>, get_strides_type<shape_type>>

Definition at line 529 of file xexpression.hpp.

◆ linear_iterator

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

Definition at line 538 of file xexpression.hpp.

◆ pointer

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

Definition at line 517 of file xexpression.hpp.

◆ reference

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

Definition at line 515 of file xexpression.hpp.

◆ shape_type

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

Definition at line 523 of file xexpression.hpp.

◆ size_type

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

Definition at line 519 of file xexpression.hpp.

◆ stepper

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

Definition at line 535 of file xexpression.hpp.

◆ storage_type

template<class E >
using xt::xshared_expression< E >::storage_type = xtl::mpl::eval_if_t<has_storage_type<E>, detail::expr_storage_type<E>, make_invalid_type<>>

Definition at line 533 of file xexpression.hpp.

◆ strides_type

template<class E >
using xt::xshared_expression< E >::strides_type
Initial value:
xtl::mpl::
eval_if_t<has_strides<E>, detail::expr_strides_type<E>, get_strides_type<shape_type>>

Definition at line 525 of file xexpression.hpp.

◆ value_type

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

Definition at line 514 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 695 of file xexpression.hpp.

Member Function Documentation

◆ backstrides()

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

Definition at line 596 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 563 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 561 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 563 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 561 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 644 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 565 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 565 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 566 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 566 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 572 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 572 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 573 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 573 of file xexpression.hpp.

◆ data() [1/2]

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

Definition at line 608 of file xexpression.hpp.

◆ data() [2/2]

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

Definition at line 602 of file xexpression.hpp.

◆ data_offset()

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

Definition at line 614 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 556 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 632 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 638 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 564 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 562 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 564 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 562 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 650 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 559 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 558 of file xexpression.hpp.

◆ linear_begin() [1/2]

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

Definition at line 575 of file xexpression.hpp.

◆ linear_begin() [2/2]

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

Definition at line 577 of file xexpression.hpp.

◆ linear_cbegin()

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

Definition at line 579 of file xexpression.hpp.

◆ linear_cend()

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

Definition at line 580 of file xexpression.hpp.

◆ linear_crbegin()

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

Definition at line 586 of file xexpression.hpp.

◆ linear_crend()

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

Definition at line 587 of file xexpression.hpp.

◆ linear_end() [1/2]

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

Definition at line 576 of file xexpression.hpp.

◆ linear_end() [2/2]

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

Definition at line 578 of file xexpression.hpp.

◆ linear_rbegin() [1/2]

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

Definition at line 582 of file xexpression.hpp.

◆ linear_rbegin() [2/2]

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

Definition at line 584 of file xexpression.hpp.

◆ linear_rend() [1/2]

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

Definition at line 583 of file xexpression.hpp.

◆ linear_rend() [2/2]

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

Definition at line 585 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 550 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 570 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 568 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 570 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 568 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 571 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 569 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 571 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 569 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 555 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 557 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 669 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 656 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 676 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 662 of file xexpression.hpp.

◆ storage() [1/2]

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

Definition at line 626 of file xexpression.hpp.

◆ storage() [2/2]

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

Definition at line 620 of file xexpression.hpp.

◆ strides()

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

Definition at line 590 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 705 of file xexpression.hpp.

Member Data Documentation

◆ contiguous_layout

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

Definition at line 544 of file xexpression.hpp.

◆ static_layout

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

Definition at line 543 of file xexpression.hpp.


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