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

Function ComposePermutations

tensorflow/compiler/xla/util.cc:130–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130std::vector<int64> ComposePermutations(absl::Span<const int64> p1,
131 absl::Span<const int64> p2) {
132 CHECK_EQ(p1.size(), p2.size());
133 std::vector<int64> output;
134 for (size_t i = 0; i < p1.size(); ++i) {
135 output.push_back(p1.at(p2.at(i)));
136 }
137 return output;
138}
139
140bool IsIdentityPermutation(absl::Span<const int64> permutation) {
141 for (int64 i = 0; i < permutation.size(); ++i) {

Calls 3

sizeMethod · 0.45
push_backMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected