MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / InversePermutation

Function InversePermutation

tensorflow/compiler/xla/util.cc:120–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120std::vector<int64> InversePermutation(
121 absl::Span<const int64> input_permutation) {
122 DCHECK(IsPermutation(input_permutation, input_permutation.size()));
123 std::vector<int64> output_permutation(input_permutation.size(), -1);
124 for (size_t i = 0; i < input_permutation.size(); ++i) {
125 output_permutation.at(input_permutation.at(i)) = i;
126 }
127 return output_permutation;
128}
129
130std::vector<int64> ComposePermutations(absl::Span<const int64> p1,
131 absl::Span<const int64> p2) {

Callers 10

PermuteDimensionsMethod · 0.85
TESTFunction · 0.85
TransposeMethod · 0.85
UpdateOperandFunction · 0.85
CanonicalizeDotFunction · 0.85
InferTransposeShapeMethod · 0.85
GetShapeInfoFunction · 0.85
RunMethod · 0.85

Calls 3

IsPermutationFunction · 0.85
sizeMethod · 0.45
atMethod · 0.45

Tested by 1

TESTFunction · 0.68