xtensor
Loading...
Searching...
No Matches
xt::select_layout< L, S > Struct Template Reference

Compute a layout based on a layout and a shape type. More...

#include <xshape.hpp>

Static Public Attributes

static constexpr std::ptrdiff_t static_dimension = xt::static_dimension<S>::value
 
static constexpr bool is_any
 
static constexpr layout_type value = is_any ? layout_type::any : L
 

Detailed Description

template<layout_type L, class S>
struct xt::select_layout< L, S >

Compute a layout based on a layout and a shape type.

The main functionality of this function is that it reduces vectors to xt::layout_type::any so that assigning a row major 1D container to another row_major container becomes free.

Definition at line 263 of file xshape.hpp.

Member Data Documentation

◆ is_any

template<layout_type L, class S >
constexpr bool xt::select_layout< L, S >::is_any
staticconstexpr
Initial value:
= static_dimension != -1 && static_dimension <= 1

Definition at line 266 of file xshape.hpp.

◆ static_dimension

template<layout_type L, class S >
constexpr std::ptrdiff_t xt::select_layout< L, S >::static_dimension = xt::static_dimension<S>::value
staticconstexpr

Definition at line 265 of file xshape.hpp.

◆ value

template<layout_type L, class S >
constexpr layout_type xt::select_layout< L, S >::value = is_any ? layout_type::any : L
staticconstexpr

Definition at line 268 of file xshape.hpp.


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