#include "tensorstore/chunk_layout.h"
struct tensorstore::ChunkLayout::GridOrigin
   
 : public MaybeHardConstraintSpan<Index>;

Specifies the base origin/offset of the chunk grid.

Example:

tensorstore::ChunkLayout constraints;

// Sets a hard constraint on the origin for dimensions 0 and 1
TENSORSTORE_RETURN_IF_ERROR(constraints.Set(
    tensorstore::ChunkLayout::GridOrigin{
        {5, 6, kImplicit}));
EXPECT_THAT(constraints.grid_origin(),
            ::testing::ElementsAre(5, 6, kImplicit));
EXPECT_EQ(tensorstore::DimensionSet::FromBools({1, 1, 0}),
          constraints.grid_origin().hard_constraint);

// Sets a soft constraint on the origin for dimensions 0 and 2
TENSORSTORE_RETURN_IF_ERROR(constraints.Set(
    tensorstore::ChunkLayout::GridOrigin{
        {9, kImplicit, 10}, /*hard_constraint=*/false}));
EXPECT_THAT(constraints.grid_origin(),
            ::testing::ElementsAre(5, 6, 10));
EXPECT_EQ(tensorstore::DimensionSet::FromBools({1, 1, 0}),
          constraints.grid_origin().hard_constraint);

Specifying the special value of kImplicit for a given dimension indicates no constraint.