Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
expressions
MatMatMultExpr.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_EXPRESSIONS_MATMATMULTEXPR_H_
36
#define _BLAZE_MATH_EXPRESSIONS_MATMATMULTEXPR_H_
37
38
39
//*************************************************************************************************
40
// Includes
41
//*************************************************************************************************
42
43
#include <
blaze/math/expressions/Forward.h
>
44
#include <
blaze/math/expressions/MultExpr.h
>
45
#include <
blaze/util/FunctionTrace.h
>
46
47
48
namespace
blaze {
49
50
//=================================================================================================
51
//
52
// CLASS DEFINITION
53
//
54
//=================================================================================================
55
56
//*************************************************************************************************
68
template
<
typename
MT >
// Matrix base type of the expression
69
struct
MatMatMultExpr
70
:
public
MultExpr
<MT>
71
{};
72
//*************************************************************************************************
73
74
75
76
77
//=================================================================================================
78
//
79
// GLOBAL RESTRUCTURING BINARY ARITHMETIC OPERATORS
80
//
81
//=================================================================================================
82
83
//*************************************************************************************************
97
template
<
typename
MT
// Matrix base type of the left-hand side expression
98
,
typename
VT >
// Type of the right-hand side dense vector
99
inline
decltype
(
auto
)
100
operator
*(
const
MatMatMultExpr<MT>
& mat,
const
DenseVector<VT,false>
& vec )
101
{
102
BLAZE_FUNCTION_TRACE
;
103
104
return
(*mat).leftOperand() * ( (*mat).rightOperand() * vec );
105
}
107
//*************************************************************************************************
108
109
110
//*************************************************************************************************
124
template
<
typename
MT
// Matrix base type of the left-hand side expression
125
,
typename
VT >
// Type of the right-hand side sparse vector
126
inline
decltype
(
auto
)
127
operator
*(
const
MatMatMultExpr<MT>& mat,
const
SparseVector<VT,false>& vec )
128
{
129
BLAZE_FUNCTION_TRACE
;
130
131
return
(*mat).leftOperand() * ( (*mat).rightOperand() * vec );
132
}
134
//*************************************************************************************************
135
136
137
//*************************************************************************************************
151
template
<
typename
VT
// Type of the left-hand side dense vector
152
,
typename
MT >
// Matrix base type of the right-hand side expression
153
inline
decltype
(
auto
)
154
operator
*(
const
DenseVector<VT,true>
& vec,
const
MatMatMultExpr<MT>
& mat )
155
{
156
BLAZE_FUNCTION_TRACE
;
157
158
return
( vec * (*mat).leftOperand() ) * (*mat).rightOperand();
159
}
161
//*************************************************************************************************
162
163
164
//*************************************************************************************************
178
template
<
typename
VT
// Type of the left-hand side sparse vector
179
,
typename
MT >
// Matrix base type of the right-hand side expression
180
inline
decltype
(
auto
)
181
operator
*(
const
SparseVector<VT,true>
& vec,
const
MatMatMultExpr<MT>
& mat )
182
{
183
BLAZE_FUNCTION_TRACE
;
184
185
return
( vec * (*mat).leftOperand() ) * (*mat).rightOperand();
186
}
188
//*************************************************************************************************
189
190
}
// namespace blaze
191
192
#endif
FunctionTrace.h
Header file for the function trace functionality.
blaze::DenseVector
Base class for N-dimensional dense vectors.
Definition
DenseVector.h:77
blaze::SparseVector
Base class for sparse vectors.
Definition
SparseVector.h:72
MultExpr.h
Header file for the MultExpr base class.
BLAZE_FUNCTION_TRACE
#define BLAZE_FUNCTION_TRACE
Function trace macro.
Definition
FunctionTrace.h:94
Forward.h
Header file for all forward declarations for expression class templates.
blaze::MatMatMultExpr
Base class for all matrix/matrix multiplication expression templates.
Definition
MatMatMultExpr.h:71
blaze::MultExpr
Base class for all multiplication expression templates.
Definition
MultExpr.h:70
Generated by
1.18.0