Skip to content

Commit 9f09387

Browse files
authored
add no-copy hermitian transpose support to matmul (#1173)
1 parent 7f3e4b1 commit 9f09387

4 files changed

Lines changed: 449 additions & 71 deletions

File tree

include/matx/operators/hermitian.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ namespace matx
112112
#endif
113113

114114
__MATX_INLINE__ std::string str() const { return "hermitian(" + op_.str() + ")"; }
115+
__MATX_INLINE__ const auto& Input() const noexcept { return op_; }
116+
115117
__MATX_INLINE__ HermitianTransOp(const T1 &op) : op_(op) {
116118
MATX_LOG_TRACE("{} constructor: rank={}", str(), Rank());
117119
static_assert(Rank() >= 2, "Hermitian operation needs input with rank >= 2");

include/matx/operators/unary_operators.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ namespace matx
8787
return op_.str() + "(" + get_type_str(in1_) + ")";
8888
}
8989

90+
__MATX_INLINE__ const auto& Input() const noexcept {
91+
return in1_;
92+
}
93+
9094
__MATX_INLINE__ matxUnaryOp(const I1 &in1, const Op &op) : in1_(in1), op_(op) {
9195
MATX_LOG_TRACE("{} constructor: rank={}", str(), Rank());
9296
if constexpr (Rank() > 0) {

0 commit comments

Comments
 (0)