Blaze 3.9
Loading...
Searching...
No Matches
MatNoSIMDExpr.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_EXPRESSIONS_MATNOSIMDEXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_MATNOSIMDEXPR_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
71
72
73namespace blaze {
74
75//=================================================================================================
76//
77// CLASS DEFINITION
78//
79//=================================================================================================
80
81//*************************************************************************************************
92template< typename MT > // Matrix base type of the expression
94 : public NoSIMDExpr<MT>
95{};
96//*************************************************************************************************
97
98
99
100
101//=================================================================================================
102//
103// GLOBAL RESTRUCTURING FUNCTIONS
104//
105//=================================================================================================
106
107//*************************************************************************************************
117template< typename MT > // Matrix base type of the expression
118inline decltype(auto) nosimd( const MatMatAddExpr<MT>& matrix )
119{
121
122 return nosimd( (*matrix).leftOperand() ) + nosimd( (*matrix).rightOperand() );
123}
125//*************************************************************************************************
126
127
128//*************************************************************************************************
138template< typename MT > // Matrix base type of the expression
139inline decltype(auto) nosimd( const MatMatSubExpr<MT>& matrix )
140{
142
143 return nosimd( (*matrix).leftOperand() ) - nosimd( (*matrix).rightOperand() );
144}
146//*************************************************************************************************
147
148
149//*************************************************************************************************
159template< typename MT > // Matrix base type of the expression
160inline decltype(auto) nosimd( const SchurExpr<MT>& matrix )
161{
163
164 return nosimd( (*matrix).leftOperand() ) % nosimd( (*matrix).rightOperand() );
165}
167//*************************************************************************************************
168
169
170//*************************************************************************************************
180template< typename MT > // Matrix base type of the expression
181inline decltype(auto) nosimd( const MatMatMultExpr<MT>& matrix )
182{
184
185 return nosimd( (*matrix).leftOperand() ) * nosimd( (*matrix).rightOperand() );
186}
188//*************************************************************************************************
189
190
191//*************************************************************************************************
202template< typename MT > // Matrix base type of the expression
203inline decltype(auto) nosimd( const MatMatKronExpr<MT>& matrix )
204{
206
207 return kron( nosimd( (*matrix).leftOperand() ), nosimd( (*matrix).rightOperand() ) );
208}
210//*************************************************************************************************
211
212
213//*************************************************************************************************
223template< typename MT > // Matrix base type of the expression
224inline decltype(auto) nosimd( const VecTVecMultExpr<MT>& matrix )
225{
227
228 return nosimd( (*matrix).leftOperand() ) * nosimd( (*matrix).rightOperand() );
229}
231//*************************************************************************************************
232
233
234//*************************************************************************************************
244template< typename MT > // Matrix base type of the expression
245inline decltype(auto) nosimd( const MatScalarMultExpr<MT>& matrix )
246{
248
249 return nosimd( (*matrix).leftOperand() ) * (*matrix).rightOperand();
250}
252//*************************************************************************************************
253
254
255//*************************************************************************************************
265template< typename MT > // Matrix base type of the expression
266inline decltype(auto) nosimd( const MatScalarDivExpr<MT>& matrix )
267{
269
270 return nosimd( (*matrix).leftOperand() ) / (*matrix).rightOperand();
271}
273//*************************************************************************************************
274
275
276//*************************************************************************************************
286template< typename MT > // Matrix base type of the expression
287inline decltype(auto) nosimd( const MatMapExpr<MT>& matrix )
288{
290
291 return map( nosimd( (*matrix).operand() ), (*matrix).operation() );
292}
294//*************************************************************************************************
295
296
297//*************************************************************************************************
307template< typename MT > // Matrix base type of the expression
308inline decltype(auto) nosimd( const MatMatMapExpr<MT>& matrix )
309{
311
312 return map( nosimd( (*matrix).leftOperand() ), nosimd( (*matrix).rightOperand() ),
313 (*matrix).operation() );
314}
316//*************************************************************************************************
317
318
319//*************************************************************************************************
329template< typename MT > // Matrix base type of the expression
330inline decltype(auto) nosimd( const VecTVecMapExpr<MT>& matrix )
331{
333
334 return map( nosimd( (*matrix).leftOperand() ), nosimd( (*matrix).rightOperand() ),
335 (*matrix).operation() );
336}
338//*************************************************************************************************
339
340
341//*************************************************************************************************
351template< typename MT > // Matrix base type of the expression
352inline decltype(auto) nosimd( const MatEvalExpr<MT>& matrix )
353{
355
356 return eval( nosimd( (*matrix).operand() ) );
357}
359//*************************************************************************************************
360
361
362//*************************************************************************************************
373template< typename MT > // Matrix base type of the expression
374inline decltype(auto) nosimd( const MatSerialExpr<MT>& matrix )
375{
377
378 return serial( nosimd( (*matrix).operand() ) );
379}
381//*************************************************************************************************
382
383
384//*************************************************************************************************
394template< typename MT > // Matrix base type of the expression
395inline decltype(auto) nosimd( const MatNoAliasExpr<MT>& matrix )
396{
398
399 return noalias( nosimd( (*matrix).operand() ) );
400}
402//*************************************************************************************************
403
404
405//*************************************************************************************************
415template< typename MT > // Matrix base type of the expression
416inline decltype(auto) nosimd( const MatNoSIMDExpr<MT>& matrix )
417{
418 return *matrix;
419}
421//*************************************************************************************************
422
423
424//*************************************************************************************************
434template< typename MT > // Matrix base type of the expression
435inline decltype(auto) nosimd( const DeclSymExpr<MT>& matrix )
436{
438
439 return declsym( nosimd( (*matrix).operand() ) );
440}
442//*************************************************************************************************
443
444
445//*************************************************************************************************
455template< typename MT > // Matrix base type of the expression
456inline decltype(auto) nosimd( const DeclHermExpr<MT>& matrix )
457{
459
460 return declherm( nosimd( (*matrix).operand() ) );
461}
463//*************************************************************************************************
464
465
466//*************************************************************************************************
476template< typename MT > // Matrix base type of the expression
477inline decltype(auto) nosimd( const DeclLowExpr<MT>& matrix )
478{
480
481 return decllow( nosimd( (*matrix).operand() ) );
482}
484//*************************************************************************************************
485
486
487//*************************************************************************************************
497template< typename MT > // Matrix base type of the expression
498inline decltype(auto) nosimd( const DeclUniLowExpr<MT>& matrix )
499{
501
502 return declunilow( nosimd( (*matrix).operand() ) );
503}
505//*************************************************************************************************
506
507
508//*************************************************************************************************
518template< typename MT > // Matrix base type of the expression
519inline decltype(auto) nosimd( const DeclStrLowExpr<MT>& matrix )
520{
522
523 return declstrlow( nosimd( (*matrix).operand() ) );
524}
526//*************************************************************************************************
527
528
529//*************************************************************************************************
539template< typename MT > // Matrix base type of the expression
540inline decltype(auto) nosimd( const DeclUppExpr<MT>& matrix )
541{
543
544 return declupp( nosimd( (*matrix).operand() ) );
545}
547//*************************************************************************************************
548
549
550//*************************************************************************************************
560template< typename MT > // Matrix base type of the expression
561inline decltype(auto) nosimd( const DeclUniUppExpr<MT>& matrix )
562{
564
565 return decluniupp( nosimd( (*matrix).operand() ) );
566}
568//*************************************************************************************************
569
570
571//*************************************************************************************************
581template< typename MT > // Matrix base type of the expression
582inline decltype(auto) nosimd( const DeclStrUppExpr<MT>& matrix )
583{
585
586 return declstrupp( nosimd( (*matrix).operand() ) );
587}
589//*************************************************************************************************
590
591
592//*************************************************************************************************
602template< typename MT > // Matrix base type of the expression
603inline decltype(auto) nosimd( const DeclDiagExpr<MT>& matrix )
604{
606
607 return decldiag( nosimd( (*matrix).operand() ) );
608}
610//*************************************************************************************************
611
612
613//*************************************************************************************************
623template< typename MT > // Matrix base type of the expression
624inline decltype(auto) nosimd( const MatTransExpr<MT>& matrix )
625{
627
628 return trans( nosimd( (*matrix).operand() ) );
629}
631//*************************************************************************************************
632
633
634//*************************************************************************************************
644template< typename MT // Matrix base type of the expression
645 , size_t E > // Compile time expansion argument
646inline decltype(auto) nosimd( const VecExpandExpr<MT,E>& matrix )
647{
649
650 return expand<E>( nosimd( (*matrix).operand() ) );
651}
653//*************************************************************************************************
654
655
656//*************************************************************************************************
666template< typename MT > // Matrix base type of the expression
667inline decltype(auto) nosimd( const VecExpandExpr<MT>& matrix )
668{
670
671 return expand( nosimd( (*matrix).operand() ), (*matrix).expansion() );
672}
674//*************************************************************************************************
675
676
677//*************************************************************************************************
687template< typename MT // Matrix base type of the expression
688 , size_t R0 // Compile time row-wise repetitions
689 , size_t R1 > // Compile time column-wise repetitions
690inline decltype(auto) nosimd( const MatRepeatExpr<MT,R0,R1>& matrix )
691{
693
694 return repeat<R0,R1>( nosimd( (*matrix).operand() ) );
695}
697//*************************************************************************************************
698
699
700//*************************************************************************************************
710template< typename MT > // Matrix base type of the expression
711inline decltype(auto) nosimd( const MatRepeatExpr<MT>& matrix )
712{
714
715 return repeat( nosimd( (*matrix).operand() )
716 , (*matrix).template repetitions<0UL>()
717 , (*matrix).template repetitions<1UL>() );
718}
720//*************************************************************************************************
721
722} // namespace blaze
723
724#endif
Header file for the function trace functionality.
Header file for the DeclDiagExpr base class.
Header file for the DeclHermExpr base class.
Header file for the DeclLowExpr base class.
Header file for the DeclStrLowExpr base class.
Header file for the DeclStrUppExpr base class.
Header file for the DeclSymExpr base class.
Header file for the DeclUniLowExpr base class.
Header file for the DeclUniUppExpr base class.
Header file for the DeclUppExpr base class.
Header file for the MatEvalExpr base class.
Header file for the MatMapExpr base class.
Header file for the MatMatAddExpr base class.
Header file for the MatMatKronExpr base class.
Header file for the MatMatMapExpr base class.
Header file for the MatMatMultExpr base class.
Header file for the MatMatSubExpr base class.
Header file for the MatNoAliasExpr base class.
Header file for the MatRepeatExpr base class.
Header file for the MatScalarDivExpr base class.
Header file for the MatScalarMultExpr base class.
Header file for the MatSerialExpr base class.
Header file for the MatTransExpr base class.
Header file for the NoSIMDExpr base class.
Header file for the SchurExpr base class.
Header file for the VecExpandExpr base class.
Header file for the VecTVecMapExpr base class.
Header file for the VecTVecMultExpr 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) declstrupp(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as strictly upper.
Definition DMatDeclStrUppExpr.h:1003
decltype(auto) decldiag(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as diagonal.
Definition DMatDeclDiagExpr.h:978
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) declstrlow(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as strictly lower.
Definition DMatDeclStrLowExpr.h:1003
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) declupp(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as upper.
Definition DMatDeclUppExpr.h:1004
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
decltype(auto) decllow(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as lower.
Definition DMatDeclLowExpr.h:1004
decltype(auto) decluniupp(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as uniupper.
Definition DMatDeclUniUppExpr.h:1005
decltype(auto) declherm(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as Hermitian.
Definition DMatDeclHermExpr.h:1005
decltype(auto) declsym(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as symmetric.
Definition DMatDeclSymExpr.h:1005
decltype(auto) declunilow(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as unilower.
Definition DMatDeclUniLowExpr.h:1004
decltype(auto) expand(const DenseVector< VT, TF > &dv, size_t expansion)
Expansion of the given dense vector.
Definition DVecExpandExpr.h:746
#define BLAZE_FUNCTION_TRACE
Function trace macro.
Definition FunctionTrace.h:94
Base class for all decldiag expression templates.
Definition DeclDiagExpr.h:68
Base class for all declherm expression templates.
Definition DeclHermExpr.h:68
Base class for all decllow expression templates.
Definition DeclLowExpr.h:68
Base class for all declstrlow expression templates.
Definition DeclStrLowExpr.h:69
Base class for all declstrupp expression templates.
Definition DeclStrUppExpr.h:69
Base class for all declsym expression templates.
Definition DeclSymExpr.h:68
Base class for all declunilow expression templates.
Definition DeclUniLowExpr.h:69
Base class for all decluniupp expression templates.
Definition DeclUniUppExpr.h:69
Base class for all declupp expression templates.
Definition DeclUppExpr.h:68
Base class for all matrix evaluation expression templates.
Definition MatEvalExpr.h:69
Base class for all unary matrix map expression templates.
Definition MatMapExpr.h:68
Base class for all matrix/matrix addition expression templates.
Definition MatMatAddExpr.h:68
Base class for all matrix/matrix Kronecker expression templates.
Definition MatMatKronExpr.h:69
Base class for all binary matrix map expression templates.
Definition MatMatMapExpr.h:68
Base class for all matrix/matrix multiplication expression templates.
Definition MatMatMultExpr.h:71
Base class for all matrix no-alias expression templates.
Definition MatNoAliasExpr.h:68
Base class for all matrix no-SIMD expression templates.
Definition MatNoSIMDExpr.h:95
Base class for all matrix repeat expression templates.
Definition MatRepeatExpr.h:69
Base class for all matrix/scalar division expression templates.
Definition MatScalarDivExpr.h:75
Base class for all matrix/scalar multiplication expression templates.
Definition MatScalarMultExpr.h:77
Base class for all matrix serial evaluation expression templates.
Definition MatSerialExpr.h:69
Base class for all matrix transposition expression templates.
Definition MatTransExpr.h:69
Base class for all no-SIMD expression templates.
Definition NoSIMDExpr.h:68
Base class for all Schur product expression templates.
Definition SchurExpr.h:68
Base class for all vector expansion expression templates.
Definition VecExpandExpr.h:69
Base class for all outer map expression templates.
Definition VecTVecMapExpr.h:68
Base class for all outer product expression templates.
Definition VecTVecMultExpr.h:69