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/system/SMP.h>
46 #include <blaze/util/Assert.h>
49 
50 
51 namespace blaze {
52 
53 //=================================================================================================
54 //
55 // GLOBAL FUNCTIONS
56 //
57 //=================================================================================================
58 
59 //*************************************************************************************************
62 template< typename VT1, bool TF1, typename VT2, bool TF2 >
63 inline void smpAssign( DenseVector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs );
64 
65 template< typename VT1, bool TF1, typename VT2, bool TF2 >
66 inline void smpAddAssign( DenseVector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs );
67 
68 template< typename VT1, bool TF1, typename VT2, bool TF2 >
69 inline void smpSubAssign( DenseVector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs );
70 
71 template< typename VT1, bool TF1, typename VT2, bool TF2 >
72 inline void smpMultAssign( DenseVector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs );
74 //*************************************************************************************************
75 
76 
77 //*************************************************************************************************
91 template< typename VT1 // Type of the left-hand side dense vector
92  , bool TF1 // Transpose flag of the left-hand side dense vector
93  , typename VT2 // Type of the right-hand side vector
94  , bool TF2 > // Transpose flag of the right-hand side vector
95 inline void smpAssign( DenseVector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs )
96 {
98 
99  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
100  assign( ~lhs, ~rhs );
101 }
102 //*************************************************************************************************
103 
104 
105 //*************************************************************************************************
119 template< typename VT1 // Type of the left-hand side dense vector
120  , bool TF1 // Transpose flag of the left-hand side dense vector
121  , typename VT2 // Type of the right-hand side vector
122  , bool TF2 > // Transpose flag of the right-hand side vector
123 inline void smpAddAssign( DenseVector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs )
124 {
126 
127  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
128  addAssign( ~lhs, ~rhs );
129 }
130 //*************************************************************************************************
131 
132 
133 //*************************************************************************************************
147 template< typename VT1 // Type of the left-hand side dense vector
148  , bool TF1 // Transpose flag of the left-hand side dense vector
149  , typename VT2 // Type of the right-hand side vector
150  , bool TF2 > // Transpose flag of the right-hand side vector
151 inline void smpSubAssign( DenseVector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs )
152 {
154 
155  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
156  subAssign( ~lhs, ~rhs );
157 }
158 //*************************************************************************************************
159 
160 
161 //*************************************************************************************************
175 template< typename VT1 // Type of the left-hand side dense vector
176  , bool TF1 // Transpose flag of the left-hand side dense vector
177  , typename VT2 // Type of the right-hand side vector
178  , bool TF2 > // Transpose flag of the right-hand side vector
179 inline void smpMultAssign( DenseVector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs )
180 {
182 
183  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
184  multAssign( ~lhs, ~rhs );
185 }
186 //*************************************************************************************************
187 
188 
189 
190 
191 //=================================================================================================
192 //
193 // COMPILE TIME CONSTRAINT
194 //
195 //=================================================================================================
196 
197 //*************************************************************************************************
199 namespace {
200 
203 
204 }
206 //*************************************************************************************************
207 
208 } // namespace blaze
209 
210 #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:152
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:179
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:122
Compile time assertion.
System settings for the shared-memory parallelization.
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:271
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
#define BLAZE_CPP_THREADS_PARALLEL_MODE
Compilation switch for the C++11 parallelization.This compilation switch enables/disables the paralle...
Definition: SMP.h:95
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:361
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:92
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:301
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:331
Base class for N-dimensional vectors.The Vector class is a base class for all arbitrarily sized (N-di...
Definition: Forward.h:151
#define BLAZE_OPENMP_PARALLEL_MODE
Compilation switch for the OpenMP parallelization.This compilation switch enables/disables the OpenMP...
Definition: SMP.h:67
#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.