#include "tensorstore/stack.h"
template <
    
typename Layers = std::vector<std::variant<Spec, TensorStore<>>>>
auto tensorstore::Stack(const Layers& layers,
                        
DimensionIndex stack_dimension,
                        
StackOpenOptions&& options);
template <
    
typename Layers = std::vector<std::variant<Spec, TensorStore<>>>,
    typename... Option>
  
requires IsCompatibleOptionSequence<StackOpenOptions, Option...>
auto tensorstore::Stack(const Layers& layers,
                        
DimensionIndex stack_dimension,
                        
Option&&... option);

Virtually stacks a sequence of TensorStore or Spec layers along a new dimension.

Parameters:
const Layers &layers

Sequence of layers to stack.

DimensionIndex stack_dimension

Dimension index along which to stack the layers.

StackOpenOptions &&options

Options for opening the stacked view.

Option&&... option

Individual option compatible with StackOpenOptions.

Returns:

The stacked TensorStore<Element, RankConstraint::Add(Rank, 1).rank, Mode> if the layer value type is TensorStore<Element, Rank, Mode>, or TensorStore<> otherwise.