Blaze 3.9
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
46
47
48namespace blaze {
49
50//=================================================================================================
51//
52// CLASS DEFINITION
53//
54//=================================================================================================
55
56//*************************************************************************************************
68template< typename MT > // Matrix base type of the expression
70 : public MultExpr<MT>
71{};
72//*************************************************************************************************
73
74
75
76
77//=================================================================================================
78//
79// GLOBAL RESTRUCTURING BINARY ARITHMETIC OPERATORS
80//
81//=================================================================================================
82
83//*************************************************************************************************
97template< typename MT // Matrix base type of the left-hand side expression
98 , typename VT > // Type of the right-hand side dense vector
99inline decltype(auto)
100 operator*( const MatMatMultExpr<MT>& mat, const DenseVector<VT,false>& vec )
101{
103
104 return (*mat).leftOperand() * ( (*mat).rightOperand() * vec );
105}
107//*************************************************************************************************
108
109
110//*************************************************************************************************
124template< typename MT // Matrix base type of the left-hand side expression
125 , typename VT > // Type of the right-hand side sparse vector
126inline decltype(auto)
127 operator*( const MatMatMultExpr<MT>& mat, const SparseVector<VT,false>& vec )
128{
130
131 return (*mat).leftOperand() * ( (*mat).rightOperand() * vec );
132}
134//*************************************************************************************************
135
136
137//*************************************************************************************************
151template< typename VT // Type of the left-hand side dense vector
152 , typename MT > // Matrix base type of the right-hand side expression
153inline decltype(auto)
154 operator*( const DenseVector<VT,true>& vec, const MatMatMultExpr<MT>& mat )
155{
157
158 return ( vec * (*mat).leftOperand() ) * (*mat).rightOperand();
159}
161//*************************************************************************************************
162
163
164//*************************************************************************************************
178template< typename VT // Type of the left-hand side sparse vector
179 , typename MT > // Matrix base type of the right-hand side expression
180inline decltype(auto)
181 operator*( const SparseVector<VT,true>& vec, const MatMatMultExpr<MT>& mat )
182{
184
185 return ( vec * (*mat).leftOperand() ) * (*mat).rightOperand();
186}
188//*************************************************************************************************
189
190} // namespace blaze
191
192#endif
Header file for the function trace functionality.
Base class for N-dimensional dense vectors.
Definition: DenseVector.h:77
Header file for the MultExpr base class.
#define BLAZE_FUNCTION_TRACE
Function trace macro.
Definition: FunctionTrace.h:94
Header file for all forward declarations for expression class templates.
Base class for all matrix/matrix multiplication expression templates.
Definition: MatMatMultExpr.h:71
Base class for all multiplication expression templates.
Definition: MultExpr.h:70