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

Function IsPermutation

tensorflow/compiler/xla/util.cc:111–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111bool IsPermutation(absl::Span<const int64> permutation, int64 rank) {
112 if (rank != permutation.size()) {
113 return false;
114 }
115 absl::InlinedVector<int64, 8> trivial_permutation(rank);
116 absl::c_iota(trivial_permutation, 0);
117 return absl::c_is_permutation(permutation, trivial_permutation);
118}
119
120std::vector<int64> InversePermutation(
121 absl::Span<const int64> input_permutation) {

Callers 5

TransposeMethod · 0.85
InversePermutationFunction · 0.85
PermuteFunction · 0.85
InferTransposeShapeMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected