All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DenseVector.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_SMP_DEFAULT_DENSEVECTOR_H_
36 #define _BLAZE_MATH_SMP_DEFAULT_DENSEVECTOR_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 VT1, bool TF1, typename VT2, bool TF2 >
62 inline void smpAssign( DenseVector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs );
63 
64 template< typename VT1, bool TF1, typename VT2, bool TF2 >
65 inline void smpAddAssign( DenseVector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs );
66 
67 template< typename VT1, bool TF1, typename VT2, bool TF2 >
68 inline void smpSubAssign( DenseVector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs );
69 
70 template< typename VT1, bool TF1, typename VT2, bool TF2 >
71 inline void smpMultAssign( DenseVector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs );
73 //*************************************************************************************************
74 
75 
76 //*************************************************************************************************
90 template< typename VT1 // Type of the left-hand side dense vector
91  , bool TF1 // Transpose flag of the left-hand side dense vector
92  , typename VT2 // Type of the right-hand side vector
93  , bool TF2 > // Transpose flag of the right-hand side vector
94 inline void smpAssign( DenseVector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs )
95 {
97 
98  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
99  assign( ~lhs, ~rhs );
100 }
101 //*************************************************************************************************
102 
103 
104 //*************************************************************************************************
118 template< typename VT1 // Type of the left-hand side dense vector
119  , bool TF1 // Transpose flag of the left-hand side dense vector
120  , typename VT2 // Type of the right-hand side vector
121  , bool TF2 > // Transpose flag of the right-hand side vector
122 inline void smpAddAssign( DenseVector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs )
123 {
125 
126  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
127  addAssign( ~lhs, ~rhs );
128 }
129 //*************************************************************************************************
130 
131 
132 //*************************************************************************************************
146 template< typename VT1 // Type of the left-hand side dense vector
147  , bool TF1 // Transpose flag of the left-hand side dense vector
148  , typename VT2 // Type of the right-hand side vector
149  , bool TF2 > // Transpose flag of the right-hand side vector
150 inline void smpSubAssign( DenseVector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs )
151 {
153 
154  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
155  subAssign( ~lhs, ~rhs );
156 }
157 //*************************************************************************************************
158 
159 
160 //*************************************************************************************************
174 template< typename VT1 // Type of the left-hand side dense vector
175  , bool TF1 // Transpose flag of the left-hand side dense vector
176  , typename VT2 // Type of the right-hand side vector
177  , bool TF2 > // Transpose flag of the right-hand side vector
178 inline void smpMultAssign( DenseVector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs )
179 {
181 
182  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
183  multAssign( ~lhs, ~rhs );
184 }
185 //*************************************************************************************************
186 
187 
188 
189 
190 //=================================================================================================
191 //
192 // COMPILE TIME CONSTRAINT
193 //
194 //=================================================================================================
195 
196 //*************************************************************************************************
198 namespace {
199 
201 
202 }
204 //*************************************************************************************************
205 
206 } // namespace blaze
207 
208 #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
void smpMultAssign(DenseVector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs)
Default implementation of the SMP multiplication assignment of a vector to a dense vector...
Definition: DenseVector.h:178
Header file for the DenseVector base class.
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.
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
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
void multAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the multiplication assignment of a matrix to a matrix.
Definition: Matrix.h:269
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 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 N-dimensional vectors.The Vector class is a base class for all arbitrarily sized (N-di...
Definition: Forward.h:147
#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
#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
Header file for the Vector CRTP base class.
#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.