SyTen

◆ transpose() [1/4]

template<Rank rank, typename Scalar , TransposeMethod method = TransposeMethod::Default, typename Indices = std::make_index_sequence<(rank < 2 ? 0 : (rank - 2))>>
void syten::transpose ( ConstSpan< Scalar > const  inp,
MutSpan< Scalar >  out,
ConstSpan< Index in_perm,
ConstSpan< Index in_dim,
Conj  do_conj = Conj::n(),
bool  do_checks = true 
)

Entry point for transposition of a continuous array into another array.

Template Parameters
rankmaximal number of indices
Scalarunderlying scalar type
methodtransposition method, default is heuristic based on tensor size
Indiceshelper argument to generate an index sequence (see syten::transpose_impl).
Parameters
inpsource array, row-major
outoutput array, row-major
in_permpermutation array, perm[i] = j says that the old leg j should be placed at position i+1 (all 1-indexed), at most size rank
in_diminput dimensions array, at most size rank
do_conjif Conj::y(), conjugate every element
do_checksif true, remove 1-dimensional indices and combine runs

References syten::SpanImpl::MutSpan< T >::begin(), syten::Cuda::conj_copy(), std::copy(), if_constexpr, rank(), syten::SpanImpl::MutSpan< T >::size(), SYTEN_ASSERT_MSG, and syten::YesNo< struct _prod_conj >::y().

Referenced by syten::Delinearise::cols_only(), syten::Eigen::eigenGen(), syten::Eigen::eigenSym(), exponentialTensorSym(), syten::Krylov::SolverPolicies::Exponential::get_coeffs(), syten::IdentityDenseTensorImpl::merge(), syten::DenseProduct::one_times_many(), pseudo_inverse_svd(), syten::Delinearise::rows(), syten::MPS::DMRG::LBOWorker::singleUpdate(), syten::Krylov::ClassicImpl::ExponentialSolver< Solver >::solve(), syten::DenseSolve::solve(), syten::SVD::svd(), and syten::MPS::TDVP::LBOWorker::sweep_single().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: