#include "tensorstore/index_space/transform_array_constraints.h"
class tensorstore::TransformArrayConstraints;

Specifies constraints on the array returned from TransformArray.

This type is the algebraic product of IterationConstraints and MustAllocateConstraint.

A MustAllocateConstraint of must_allocate indicates that a newly allocated array is always returned, subject to the IterationConstraints. Otherwise, the returned array may point to the existing array if possible. (If may_allocate is specified but a new array is allocated, the newly allocated array is still subject to the IterationConstraints.)

Constructors

constexpr TransformArrayConstraints(
    
IterationConstraints iteration_constraint = {},
    
MustAllocateConstraint allocate_constraint = may_allocate);
constexpr TransformArrayConstraints(
    
LayoutOrderConstraint order_constraint,
    
RepeatedElementsConstraint repeat_constraint =
       
 include_repeated_elements
,
    
MustAllocateConstraint allocate_constraint = may_allocate);
constexpr TransformArrayConstraints(
    
UnspecifiedLayoutOrder order_constraint,
    
RepeatedElementsConstraint repeat_constraint =
       
 include_repeated_elements
,
    
MustAllocateConstraint allocate_constraint = may_allocate);
constexpr TransformArrayConstraints(
    
ContiguousLayoutOrder order_constraint,
    
RepeatedElementsConstraint repeat_constraint =
       
 include_repeated_elements
,
    
MustAllocateConstraint allocate_constraint = may_allocate);
constexpr TransformArrayConstraints(
    
LayoutOrderConstraint order_constraint,
    
MustAllocateConstraint allocate_constraint);
constexpr TransformArrayConstraints(
    
UnspecifiedLayoutOrder order_constraint,
    
MustAllocateConstraint allocate_constraint);
constexpr TransformArrayConstraints(
    
ContiguousLayoutOrder order_constraint,
    
MustAllocateConstraint allocate_constraint);
constexpr TransformArrayConstraints(
    
RepeatedElementsConstraint repeat_constraint,
    
MustAllocateConstraint allocate_constraint = may_allocate);
constexpr TransformArrayConstraints(
    
MustAllocateConstraint allocate_constraint);

Constructs from various combinations of constraints.

Accessors

constexpr IterationConstraints iteration_constraints() const;

Returns the iteration constraints.

constexpr LayoutOrderConstraint order_constraint() const;

Returns the order constraint.

constexpr RepeatedElementsConstraint
repeated_elements_constraint() const;

Returns the repeated elements constraint.

constexpr MustAllocateConstraint allocate_constraint() const;

Returns the allocation constraint.

Friend functions

friend constexpr bool
operator==(TransformArrayConstraints aTransformArrayConstraints b);
friend constexpr bool
operator!=(TransformArrayConstraints aTransformArrayConstraints b);

Compares two constraints.

enum class tensorstore::MustAllocateConstraint;

Specifies whether a new array must be allocated.