Skip to content

Commit

Permalink
Update docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
romeric committed May 18, 2020
1 parent 5bffaaa commit 4d72429
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Fastor/expressions/linalg_ops/unary_ctrans_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ FASTOR_INLINE Tensor<T,J,I> ctranspose(const Tensor<T,I,J> &a) {
return out;
}

// For high order tensors
/* Tensor conjugate transpose for higher order tensors immediately returning a tensor */
template<typename T, size_t ... Rest, typename std::enable_if<sizeof...(Rest)>=3,bool>::type=0>
FASTOR_INLINE Tensor<T,Rest...>
ctranspose(const Tensor<T,Rest...> &a) {
Expand Down
8 changes: 5 additions & 3 deletions Fastor/expressions/linalg_ops/unary_trans_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,24 @@ struct UnaryTransOp: public AbstractTensor<UnaryTransOp<Expr, DIM0>,DIM0> {
expr_type _expr;
};


/* Tensor transpose returning a tensor expression */
template<typename Expr, size_t DIM0>
FASTOR_INLINE UnaryTransOp<Expr, DIM0>
trans(const AbstractTensor<Expr,DIM0> &src) {
return UnaryTransOp<Expr, DIM0>(src.self());
}


// For tensors
/* Tensor transpose immediately returning a tensor */
template<typename T, size_t I, size_t J>
FASTOR_INLINE Tensor<T,J,I> transpose(const Tensor<T,I,J> &a) {
Tensor<T,J,I> out;
_transpose<T,I,J>(a.data(),out.data());
return out;
}

// For high order tensors
/* Tensor transpose for higher order tensors immediately returning a tensor */
template<typename T, size_t ... Rest, typename std::enable_if<sizeof...(Rest)>=3,bool>::type=0>
FASTOR_INLINE Tensor<T,Rest...>
transpose(const Tensor<T,Rest...> &a) {
Expand All @@ -76,7 +78,7 @@ transpose(const Tensor<T,Rest...> &a) {
return out;
}

// Transpose for generic expressions is provided here
// Transpose for generic expressions
template<typename Expr, size_t DIM0>
FASTOR_INLINE
Tensor<
Expand Down

0 comments on commit 4d72429

Please sign in to comment.