MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / transposed_layout

Function transposed_layout

dnn/src/cuda/svd/opr_impl.cpp:23–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23TensorLayout transposed_layout(const TensorLayout& layout) {
24 megdnn_assert(layout.ndim >= 2);
25 std::vector<size_t> permutation(layout.ndim);
26 std::iota(permutation.begin(), permutation.end(), 0);
27 std::iter_swap(permutation.rbegin(), permutation.rbegin() + 1);
28 return layout.dimshuffle(permutation);
29}
30
31void transpose(
32 megdnn::cuda::HandleImpl* handle, const TensorND& src, const TensorND& dst) {

Callers 1

transposeFunction · 0.85

Calls 5

rbeginMethod · 0.80
dimshuffleMethod · 0.80
iotaFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected