All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DenseMatrix.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_SMP_DEFAULT_DENSEMATRIX_H_
36 #define _BLAZE_MATH_SMP_DEFAULT_DENSEMATRIX_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
45 #include <blaze/util/Assert.h>
48 
49 
50 namespace blaze {
51 
52 //=================================================================================================
53 //
54 // GLOBAL FUNCTIONS
55 //
56 //=================================================================================================
57 
58 //*************************************************************************************************
61 template< typename MT1, bool SO1, typename MT2, bool SO2 >
62 inline void smpAssign( DenseMatrix<MT1,SO1>& lhs, const Matrix<MT2,SO2>& rhs );
63 
64 template< typename MT1, bool SO1, typename MT2, bool SO2 >
65 inline void smpAddAssign( DenseMatrix<MT1,SO1>& lhs, const Matrix<MT2,SO2>& rhs );
66 
67 template< typename MT1, bool SO1, typename MT2, bool SO2 >
68 inline void smpSubAssign( DenseMatrix<MT1,SO1>& lhs, const Matrix<MT2,SO2>& rhs );
70 //*************************************************************************************************
71 
72 
73 //*************************************************************************************************
87 template< typename MT1 // Type of the left-hand side dense matrix
88  , bool SO1 // Storage order of the left-hand side dense matrix
89  , typename MT2 // Type of the right-hand side matrix
90  , bool SO2 > // Storage order of the right-hand side matrix
91 inline void smpAssign( DenseMatrix<MT1,SO1>& lhs, const Matrix<MT2,SO2>& rhs )
92 {
94 
95  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == (~rhs).rows() , "Invalid number of rows" );
96  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == (~rhs).columns(), "Invalid number of columns" );
97 
98  assign( ~lhs, ~rhs );
99 }
100 //*************************************************************************************************
101 
102 
103 //*************************************************************************************************
117 template< typename MT1 // Type of the left-hand side dense matrix
118  , bool SO1 // Storage order of the left-hand side dense matrix
119  , typename MT2 // Type of the right-hand side matrix
120  , bool SO2 > // Storage order of the right-hand side matrix
121 inline void smpAddAssign( DenseMatrix<MT1,SO1>& lhs, const Matrix<MT2,SO2>& rhs )
122 {
124 
125  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == (~rhs).rows() , "Invalid number of rows" );
126  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == (~rhs).columns(), "Invalid number of columns" );
127 
128  addAssign( ~lhs, ~rhs );
129 }
130 //*************************************************************************************************
131 
132 
133 //*************************************************************************************************
147 template< typename MT1 // Type of the left-hand side dense matrix
148  , bool SO1 // Storage order of the left-hand side dense matrix
149  , typename MT2 // Type of the right-hand side matrix
150  , bool SO2 > // Storage order of the right-hand side matrix
151 inline void smpSubAssign( DenseMatrix<MT1,SO1>& lhs, const Matrix<MT2,SO2>& rhs )
152 {
154 
155  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == (~rhs).rows() , "Invalid number of rows" );
156  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == (~rhs).columns(), "Invalid number of columns" );
157 
158  subAssign( ~lhs, ~rhs );
159 }
160 //*************************************************************************************************
161 
162 
163 
164 
165 //=================================================================================================
166 //
167 // COMPILE TIME CONSTRAINT
168 //
169 //=================================================================================================
170 
171 //*************************************************************************************************
173 namespace {
174 
176 
177 }
179 //*************************************************************************************************
180 
181 } // namespace blaze
182 
183 #endif
void smpSubAssign(DenseMatrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:151
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:70
void smpAddAssign(DenseMatrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:121
Compile time assertion.
Header file for the DenseMatrix base class.
void assign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the assignment of a matrix to a matrix.
Definition: Matrix.h:179
void smpAssign(DenseMatrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:91
Header file for the Matrix base class.
Header file for run time assertion macros.
void addAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the addition assignment of a matrix to a matrix.
Definition: Matrix.h:209
void subAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the subtraction assignment of a matrix to matrix.
Definition: Matrix.h:239
Base class for matrices.The Matrix class is a base class for all dense and sparse matrix classes with...
Definition: Forward.h:85
#define BLAZE_OPENMP_PARALLEL_MODE
Compilation switch for the OpenMP parallelization.This compilation switch enables/disables the OpenMP...
Definition: OpenMP.h:65
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:157
size_t columns(const Matrix< MT, SO > &m)
Returns the current number of columns of the matrix.
Definition: Matrix.h:154
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.In case of an invalid compile time expression, a compilation error is cr...
Definition: StaticAssert.h:143
size_t rows(const Matrix< MT, SO > &m)
Returns the current number of rows of the matrix.
Definition: Matrix.h:138
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
Header file for the FunctionTrace class.