Evaluation functions.
More...
|
template<class T> |
auto | xt::eval (T &&t) -> std::enable_if_t< detail::is_container< std::decay_t< T > >::value, T && > |
| Force evaluation of xexpression.
|
|
template<layout_type L = layout_type::any, class E> |
auto | xt::as_strided (E &&e) -> std::enable_if_t< has_data_interface< std::decay_t< E > >::value &&detail::has_same_layout< L, E >(), E && > |
| Force evaluation of xexpression not providing a data interface and convert to the required layout.
|
|
Evaluation functions.
Defined in xtensor/xeval.hpp
◆ as_strided()
auto xt::as_strided |
( |
E && | e | ) |
-> std::enable_if_t<has_data_interface<std::decay_t<E>>::value && detail::has_same_layout<L, E>(), E&&>
|
|
inline |
Force evaluation of xexpression not providing a data interface and convert to the required layout.
auto cast(E &&e) noexcept -> detail::xfunction_type_t< typename detail::cast< R >::functor, E >
Element-wise static_cast.
auto as_strided(E &&e) -> std::enable_if_t< has_data_interface< std::decay_t< E > >::value &&detail::has_same_layout< L, E >(), E && >
Force evaluation of xexpression not providing a data interface and convert to the required layout.
xarray_container< uvector< T, A >, L, xt::svector< typename uvector< T, A >::size_type, 4, SA, true > > xarray
Alias template on xarray_container with default parameters for data container type and shape / stride...
- Warning
- This function should be used in a local context only. Returning the value returned by this function could lead to a dangling reference.
- Returns
- The expression when it already provides a data interface with the correct layout, an evaluated xt::xarray or xt::xtensor depending on shape type otherwise.
Definition at line 149 of file xeval.hpp.
◆ eval()
template<class T>
auto xt::eval |
( |
T && | t | ) |
-> std::enable_if_t<detail::is_container<std::decay_t<T>>::value, T&&>
|
|
inline |
Force evaluation of xexpression.
auto eval(T &&t) -> std::enable_if_t< detail::is_container< std::decay_t< T > >::value, T && >
Force evaluation of xexpression.
- Returns
- xt::xarray or xt::xtensor depending on shape type
Definition at line 46 of file xeval.hpp.