#include "tensorstore/contiguous_layout.h"
void tensorstore::InvertPermutation(DimensionIndex rank,
                                    
const DimensionIndexperm,
                                    
DimensionIndexinverse_perm);

Sets inverse_perm to the inverse permutation of perm.

Parameters:
in
const DimensionIndex *perm

Pointer to array of length rank.

out
DimensionIndex *inverse_perm

Pointer to array of length rank.

Dchecks:

IsValidPermutation({perm, rank}).