Blaze 3.9
VecNoSIMDExpr.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_EXPRESSIONS_VECNOSIMDEXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_VECNOSIMDEXPR_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
64
65
66namespace blaze {
67
68//=================================================================================================
69//
70// CLASS DEFINITION
71//
72//=================================================================================================
73
74//*************************************************************************************************
85template< typename VT > // Vector base type of the expression
87 : public NoSIMDExpr<VT>
88{};
89//*************************************************************************************************
90
91
92
93
94//=================================================================================================
95//
96// GLOBAL RESTRUCTURING FUNCTIONS
97//
98//=================================================================================================
99
100//*************************************************************************************************
110template< typename VT > // Vector base type of the expression
111inline decltype(auto) nosimd( const VecVecAddExpr<VT>& vector )
112{
114
115 return nosimd( (*vector).leftOperand() ) + nosimd( (*vector).rightOperand() );
116}
118//*************************************************************************************************
119
120
121//*************************************************************************************************
131template< typename VT > // Vector base type of the expression
132inline decltype(auto) nosimd( const VecVecSubExpr<VT>& vector )
133{
135
136 return nosimd( (*vector).leftOperand() ) - nosimd( (*vector).rightOperand() );
137}
139//*************************************************************************************************
140
141
142//*************************************************************************************************
152template< typename VT > // Vector base type of the expression
153inline decltype(auto) nosimd( const VecVecMultExpr<VT>& vector )
154{
156
157 return nosimd( (*vector).leftOperand() ) * nosimd( (*vector).rightOperand() );
158}
160//*************************************************************************************************
161
162
163//*************************************************************************************************
174template< typename VT > // Vector base type of the expression
175inline decltype(auto) nosimd( const VecVecKronExpr<VT>& vector )
176{
178
179 return kron( nosimd( (*vector).leftOperand() ), nosimd( (*vector).rightOperand() ) );
180}
182//*************************************************************************************************
183
184
185//*************************************************************************************************
195template< typename VT > // Vector base type of the expression
196inline decltype(auto) nosimd( const VecVecDivExpr<VT>& vector )
197{
199
200 return nosimd( (*vector).leftOperand() ) / nosimd( (*vector).rightOperand() );
201}
203//*************************************************************************************************
204
205
206//*************************************************************************************************
216template< typename VT > // Vector base type of the expression
217inline decltype(auto) nosimd( const CrossExpr<VT>& vector )
218{
220
221 return nosimd( (*vector).leftOperand() ) % nosimd( (*vector).rightOperand() );
222}
224//*************************************************************************************************
225
226
227//*************************************************************************************************
237template< typename VT > // Vector base type of the expression
238inline decltype(auto) nosimd( const VecScalarMultExpr<VT>& vector )
239{
241
242 return nosimd( (*vector).leftOperand() ) * (*vector).rightOperand();
243}
245//*************************************************************************************************
246
247
248//*************************************************************************************************
258template< typename VT > // Vector base type of the expression
259inline decltype(auto) nosimd( const VecScalarDivExpr<VT>& vector )
260{
262
263 return nosimd( (*vector).leftOperand() ) / (*vector).rightOperand();
264}
266//*************************************************************************************************
267
268
269//*************************************************************************************************
279template< typename VT > // Vector base type of the expression
280inline decltype(auto) nosimd( const VecMapExpr<VT>& vector )
281{
283
284 return map( nosimd( (*vector).operand() ), (*vector).operation() );
285}
287//*************************************************************************************************
288
289
290//*************************************************************************************************
300template< typename VT > // Vector base type of the expression
301inline decltype(auto) nosimd( const VecVecMapExpr<VT>& vector )
302{
304
305 return map( nosimd( (*vector).leftOperand() ), nosimd( (*vector).rightOperand() ),
306 (*vector).operation() );
307}
309//*************************************************************************************************
310
311
312//*************************************************************************************************
322template< typename VT > // Vector base type of the expression
323inline decltype(auto) nosimd( const VecEvalExpr<VT>& vector )
324{
326
327 return eval( nosimd( (*vector).operand() ) );
328}
330//*************************************************************************************************
331
332
333//*************************************************************************************************
344template< typename VT > // Vector base type of the expression
345inline decltype(auto) nosimd( const VecSerialExpr<VT>& vector )
346{
348
349 return serial( nosimd( (*vector).operand() ) );
350}
352//*************************************************************************************************
353
354
355//*************************************************************************************************
365template< typename VT > // Vector base type of the expression
366inline decltype(auto) nosimd( const VecNoAliasExpr<VT>& vector )
367{
369
370 return noalias( nosimd( (*vector).operand() ) );
371}
373//*************************************************************************************************
374
375
376//*************************************************************************************************
386template< typename VT > // Vector base type of the expression
387inline decltype(auto) nosimd( const VecNoSIMDExpr<VT>& vector )
388{
389 return *vector;
390}
392//*************************************************************************************************
393
394
395//*************************************************************************************************
406template< typename VT > // Vector base type of the expression
407inline decltype(auto) nosimd( const VecTransExpr<VT>& vector )
408{
410
411 return trans( nosimd( (*vector).operand() ) );
412}
414//*************************************************************************************************
415
416
417//*************************************************************************************************
428template< typename VT > // Vector base type of the expression
429inline decltype(auto) nosimd( const MatVecMultExpr<VT>& vector )
430{
432
433 return nosimd( (*vector).leftOperand() ) * nosimd( (*vector).rightOperand() );
434}
436//*************************************************************************************************
437
438
439//*************************************************************************************************
450template< typename VT > // Vector base type of the expression
451inline decltype(auto) nosimd( const TVecMatMultExpr<VT>& vector )
452{
454
455 return nosimd( (*vector).leftOperand() ) * nosimd( (*vector).rightOperand() );
456}
458//*************************************************************************************************
459
460
461//*************************************************************************************************
472template< typename VT // Vector base type of the expression
473 , ReductionFlag RF > // Reduction flag
474inline decltype(auto) nosimd( const MatReduceExpr<VT,RF>& vector )
475{
477
478 return reduce<RF>( nosimd( (*vector).operand() ), (*vector).operation() );
479}
481//*************************************************************************************************
482
483
484//*************************************************************************************************
494template< typename VT // Vector base type of the expression
495 , size_t R0 > // Compile time repetitions
496inline decltype(auto) nosimd( const VecRepeatExpr<VT,R0>& vector )
497{
499
500 return repeat<R0>( nosimd( (*vector).operand() ) );
501}
503//*************************************************************************************************
504
505
506//*************************************************************************************************
516template< typename VT > // Vector base type of the expression
517inline decltype(auto) nosimd( const VecRepeatExpr<VT>& vector )
518{
520
521 return repeat( nosimd( (*vector).operand() ), (*vector).template repetitions<0UL>() );
522}
524//*************************************************************************************************
525
526} // namespace blaze
527
528#endif
Header file for the function trace functionality.
Header file for the reduction flags.
size_t ReductionFlag
Type of the reduction flags.
Definition: ReductionFlag.h:57
Header file for the CrossExpr base class.
Header file for the MatReduceExpr base class.
Header file for the MatVecMultExpr base class.
Header file for the NoSIMDExpr base class.
Header file for the TVecMatMultExpr base class.
Header file for the VecEvalExpr base class.
Header file for the VecMapExpr base class.
Header file for the VecNoAliasExpr base class.
Header file for the VecRepeatExpr base class.
Header file for the VecScalarDivExpr base class.
Header file for the VecScalarMultExpr base class.
Header file for the VecSerialExpr base class.
Header file for the VecTransExpr base class.
Header file for the VecVecAddExpr base class.
Header file for the VecVecDivExpr base class.
Header file for the VecVecKronExpr base class.
Header file for the VecVecMapExpr base class.
Header file for the VecVecMultExpr base class.
Header file for the VecVecSubExpr base class.
decltype(auto) noalias(const DenseMatrix< MT, SO > &dm)
Forces the non-aliased evaluation of the given dense matrix expression dm.
Definition: DMatNoAliasExpr.h:679
decltype(auto) eval(const DenseMatrix< MT, SO > &dm)
Forces the evaluation of the given dense matrix expression dm.
Definition: DMatEvalExpr.h:790
decltype(auto) repeat(const DenseMatrix< MT, SO > &dm, size_t m, size_t n)
Repeats the given dense matrix.
Definition: DMatRepeatExpr.h:543
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:766
decltype(auto) map(const DenseMatrix< MT1, SO > &lhs, const DenseMatrix< MT2, SO > &rhs, OP op)
Elementwise evaluation of the given binary operation on each single element of the dense matrices lhs...
Definition: DMatDMatMapExpr.h:1144
decltype(auto) nosimd(const DenseMatrix< MT, SO > &dm)
Disables the SIMD evaluation of the given dense matrix expression dm.
Definition: DMatNoSIMDExpr.h:717
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:812
decltype(auto) kron(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the Kronecker product of two dense matrices ( ).
Definition: DMatDMatKronExpr.h:957
#define BLAZE_FUNCTION_TRACE
Function trace macro.
Definition: FunctionTrace.h:94
Base class for all no-SIMD expression templates.
Definition: NoSIMDExpr.h:68
Base class for all vector no-SIMD expression templates.
Definition: VecNoSIMDExpr.h:88
Base class for all vector/vector addition expression templates.
Definition: VecVecAddExpr.h:68