#include "tensorstore/chunk_layout.h"
absl::Status tensorstore::ChunkLayout::GetChunkTemplate(
    
Usage usage,
    
MutableBoxView<> box) const;

Sets box to the precise write/read chunk template.

For the purpose of this method, only hard constraints on grid_origin() and (*this)[usage].shape() are considered; soft constraints are ignored.

For any dimension i where grid_origin().hard_constraint[i] == false or (*this)[usage].shape().hard_constraint[i] == false, box[i] is set to IndexInterval::Infinite().

Parameters:
Usage usage

Must be either kWrite or kRead.

out
MutableBoxView<> box

Set to the chunk template.

Error absl::StatusCode::kInvalidArgument:

if box.rank() != rank().

Error absl::StatusCode::kInvalidArgument:

if hard constraints on grid_origin and the chunk shape would lead to an invalid box.