MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / from_permutation

Method from_permutation

src/shape.cpp:359–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357shape::shape(std::shared_ptr<shape_impl> pimpl) : impl(std::move(pimpl)) {}
358
359shape shape::from_permutation(type_t t,
360 const std::vector<std::size_t>& l,
361 const std::vector<int64_t>& perm)
362{
363 auto new_lens = reorder_dims(l, perm);
364 shape result = reorder_shape({t, new_lens}, invert_permutation(perm));
365 assert(result.lens() == l);
366 return result;
367}
368
369shape::type_t shape::type() const { return impl->m_type; }
370

Callers

nothing calls this directly

Calls 4

lensMethod · 0.80
reorder_shapeFunction · 0.70
invert_permutationFunction · 0.70
reorder_dimsFunction · 0.50

Tested by

no test coverage detected