#include "tensorstore/contiguous_layout.h"
bool tensorstore::IsValidPermutation(
    
span<const DimensionIndex> permutation);

Returns true if permutation is a valid permutation of {0, 1, ..., permutation.size()-1}.