-
#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
andMustAllocateConstraint
.A
MustAllocateConstraint
ofmust_allocate
indicates that a newly allocated array is always returned, subject to theIterationConstraints
. Otherwise, the returned array may point to the existing array if possible. (Ifmay_allocate
is specified but a new array is allocated, the newly allocated array is still subject to theIterationConstraints
.)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 a, TransformArrayConstraints b); -
friend constexpr bool
operator!=(TransformArrayConstraints a, TransformArrayConstraints b); Compares two constraints.
-
constexpr TransformArrayConstraints(
Related Types¶
- enum class tensorstore::MustAllocateConstraint;
Specifies whether a new array must be allocated.