514 using value_type =
typename E::value_type;
515 using reference =
typename E::reference;
516 using const_reference =
typename E::const_reference;
517 using pointer =
typename E::pointer;
518 using const_pointer =
typename E::const_pointer;
519 using size_type =
typename E::size_type;
520 using difference_type =
typename E::difference_type;
522 using inner_shape_type =
typename E::inner_shape_type;
523 using shape_type =
typename E::shape_type;
525 using strides_type = xtl::mpl::
527 using backstrides_type = xtl::mpl::
529 using inner_strides_type = xtl::mpl::
531 using inner_backstrides_type = xtl::mpl::
533 using storage_type = xtl::mpl::eval_if_t<has_storage_type<E>, detail::expr_storage_type<E>,
make_invalid_type<>>;
535 using stepper =
typename E::stepper;
536 using const_stepper =
typename E::const_stepper;
538 using linear_iterator =
typename E::linear_iterator;
539 using const_linear_iterator =
typename E::const_linear_iterator;
541 using bool_load_type =
typename E::bool_load_type;
543 static constexpr layout_type static_layout = E::static_layout;
549 template <
class...
Args>
550 auto operator()(
Args...
args) ->
decltype(std::declval<E>()(
args...))
552 return m_ptr->operator()(
args...);
555 XTENSOR_FORWARD_CONST_METHOD(shape)
556 XTENSOR_FORWARD_CONST_METHOD(dimension)
557 XTENSOR_FORWARD_CONST_METHOD(size)
558 XTENSOR_FORWARD_CONST_METHOD(layout)
559 XTENSOR_FORWARD_CONST_METHOD(is_contiguous)
561 XTENSOR_FORWARD_ITERATOR_METHOD(begin)
562 XTENSOR_FORWARD_ITERATOR_METHOD(end)
563 XTENSOR_FORWARD_CONST_ITERATOR_METHOD(begin)
564 XTENSOR_FORWARD_CONST_ITERATOR_METHOD(end)
565 XTENSOR_FORWARD_CONST_ITERATOR_METHOD(cbegin)
566 XTENSOR_FORWARD_CONST_ITERATOR_METHOD(cend)
568 XTENSOR_FORWARD_ITERATOR_METHOD(rbegin)
569 XTENSOR_FORWARD_ITERATOR_METHOD(rend)
570 XTENSOR_FORWARD_CONST_ITERATOR_METHOD(rbegin)
571 XTENSOR_FORWARD_CONST_ITERATOR_METHOD(rend)
572 XTENSOR_FORWARD_CONST_ITERATOR_METHOD(crbegin)
573 XTENSOR_FORWARD_CONST_ITERATOR_METHOD(crend)
575 XTENSOR_FORWARD_METHOD(linear_begin)
576 XTENSOR_FORWARD_METHOD(linear_end)
577 XTENSOR_FORWARD_CONST_METHOD(linear_begin)
578 XTENSOR_FORWARD_CONST_METHOD(linear_end)
579 XTENSOR_FORWARD_CONST_METHOD(linear_cbegin)
580 XTENSOR_FORWARD_CONST_METHOD(linear_cend)
582 XTENSOR_FORWARD_METHOD(linear_rbegin)
583 XTENSOR_FORWARD_METHOD(linear_rend)
584 XTENSOR_FORWARD_CONST_METHOD(linear_rbegin)
585 XTENSOR_FORWARD_CONST_METHOD(linear_rend)
586 XTENSOR_FORWARD_CONST_METHOD(linear_crbegin)
587 XTENSOR_FORWARD_CONST_METHOD(linear_crend)
589 template <
class T = E>
590 std::enable_if_t<has_strides<T>::value,
const inner_strides_type&> strides()
const
592 return m_ptr->strides();
595 template <
class T = E>
596 std::enable_if_t<has_strides<T>::value,
const inner_strides_type&> backstrides()
const
598 return m_ptr->backstrides();
601 template <
class T = E>
602 std::enable_if_t<has_data_interface<T>::value, pointer> data()
noexcept
604 return m_ptr->data();
607 template <
class T = E>
608 std::enable_if_t<has_data_interface<T>::value, pointer> data()
const noexcept
610 return m_ptr->data();
613 template <
class T = E>
614 std::enable_if_t<has_data_interface<T>::value, size_type> data_offset()
const noexcept
616 return m_ptr->data_offset();
619 template <
class T = E>
620 std::enable_if_t<has_data_interface<T>::value,
typename T::storage_type&> storage()
noexcept
622 return m_ptr->storage();
625 template <
class T = E>
626 std::enable_if_t<has_data_interface<T>::value,
const typename T::storage_type&> storage()
const noexcept
628 return m_ptr->storage();
644 bool broadcast_shape(
S& shape,
bool reuse_cache =
false)
const
650 bool has_linear_assign(
const S& strides)
const noexcept
652 return m_ptr->has_linear_assign(
strides);
656 auto stepper_begin(
const S& shape)
noexcept ->
decltype(std::declval<E>().stepper_begin(shape))
658 return m_ptr->stepper_begin(shape);
663 ->
decltype(std::declval<E>().stepper_end(shape,
l))
665 return m_ptr->stepper_end(shape,
l);
669 auto stepper_begin(
const S& shape)
const noexcept
670 ->
decltype(std::declval<const E>().stepper_begin(shape))
672 return static_cast<const E*
>(m_ptr.get())->stepper_begin(shape);
676 auto stepper_end(
const S& shape,
layout_type l)
const noexcept
677 ->
decltype(std::declval<const E>().stepper_end(shape,
l))
679 return static_cast<const E*
>(m_ptr.get())->stepper_end(shape,
l);
684 std::shared_ptr<E> m_ptr;