einsums::compute_graph::permute_view#
Note
Generated from the C++ headers by apiary --emit-cpp-docs-json.
Defined in header Einsums/ComputeGraph/View.hpp.
-
template<CoreBasicTensorConcept ParentT, size_t Rank>
requires HasCompileTimeRank<ParentT>
TensorView<typename std::remove_cvref_t<ParentT>::ValueType, Rank> &permute_view(ParentT &parent, const std::array<size_t, Rank> &perm)# Typed (compile-time rank) transpose / axis-permutation view.
Result axis i aliases parent axis
perm[i];permmust be a permutation of[0, Rank). Compile-time-rank counterpart to the runtimecg::permute_viewthat backs Python’s capture-aware.T. Records a graph-registered, parent-aliasing view that downstream typedcg::*ops (einsum, gemm, …) can consume, unlike a rawtranspose_view, whose shared data pointer is invisible to the graph.Rankis deduced from thepermarray (and asserted to equal the parent’s rank).with-capture: auto &At = cg::permute_view(A, std::array<size_t, 2>{1, 0}); // A^T cg::gemm(1.0, At, B, 0.0, C);