ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Member Functions | List of all members
container::op::transpose_op< Conjugate > Struct Template Reference

#include <linalg_op.h>

Collaboration diagram for container::op::transpose_op< Conjugate >:

Public Member Functions

void operator() (const Tensor &input, const std::vector< int > &permutation, Tensor &output)
 Perform the transpose operation on the input tensor.
 

Member Function Documentation

◆ operator()()

template<bool Conjugate>
void container::op::transpose_op< Conjugate >::operator() ( const Tensor input,
const std::vector< int > &  permutation,
Tensor output 
)

Perform the transpose operation on the input tensor.

Parameters
inputThe input tensor to be transposed.
permutationA vector representing the desired permutation of the dimensions. The elements of the vector indicate the new order of the dimensions, and the size of the vector must be equal to the rank of the input tensor.
outputThe output tensor that will store the result of the transpose operation. The output tensor should be pre-allocated and have the correct shape for the transpose result.
Returns
True if the transpose operation is successful; otherwise, false.
Note
The size and shape of the output tensor must match the new dimensions specified by the permutation vector. If the permutation is not valid or the output tensor is not pre-allocated with the correct shape, the function will return false.
Here is the call graph for this function:

The documentation for this struct was generated from the following files: