Blaze 3.9
DMatDeclUniUppExpr.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_EXPRESSIONS_DMATDECLUNIUPPEXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_DMATDECLUNIUPPEXPR_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <iterator>
45#include <blaze/math/Aliases.h>
67#include <blaze/util/Assert.h>
68#include <blaze/util/EnableIf.h>
72#include <blaze/util/mpl/If.h>
73#include <blaze/util/Types.h>
75
76
77namespace blaze {
78
79//=================================================================================================
80//
81// CLASS DMATDECLUNIUPPEXPR
82//
83//=================================================================================================
84
85//*************************************************************************************************
92template< typename MT // Type of the dense matrix
93 , bool SO > // Storage order
95 : public DeclUniUppExpr< DenseMatrix< DMatDeclUniUppExpr<MT,SO>, SO > >
96 , public Declaration<MT>
97{
98 private:
99 //**Type definitions****************************************************************************
101
103 BLAZE_CREATE_GET_TYPE_MEMBER_TYPE_TRAIT( GetConstIterator, ConstIterator, INVALID_TYPE );
104 //**********************************************************************************************
105
106 //**Serial evaluation strategy******************************************************************
108
114 static constexpr bool useAssign = RequiresEvaluation_v<MT>;
115
118 template< typename MT2 >
119 static constexpr bool UseAssign_v = useAssign;
121 //**********************************************************************************************
122
123 //**Parallel evaluation strategy****************************************************************
125
131 template< typename MT2 >
132 static constexpr bool UseSMPAssign_v = ( MT2::smpAssignable && useAssign );
134 //**********************************************************************************************
135
136 public:
137 //**Type definitions****************************************************************************
140
143
149
152
154 using ConstIterator = GetConstIterator_t<MT>;
155
157 using Operand = If_t< IsExpression_v<MT>, const MT, const MT& >;
158 //**********************************************************************************************
159
160 //**Compilation flags***************************************************************************
162 static constexpr bool simdEnabled = MT::simdEnabled;
163
165 static constexpr bool smpAssignable = MT::smpAssignable;
166 //**********************************************************************************************
167
168 //**SIMD properties*****************************************************************************
170 static constexpr size_t SIMDSIZE = SIMDTrait<ElementType>::size;
171 //**********************************************************************************************
172
173 //**Constructor*********************************************************************************
178 explicit inline DMatDeclUniUppExpr( const MT& dm ) noexcept
179 : dm_( dm ) // Dense matrix of the decluniupp expression
180 {
181 BLAZE_INTERNAL_ASSERT( isSquare( *dm ), "Non-square matrix detected" );
182 }
183 //**********************************************************************************************
184
185 //**Access operator*****************************************************************************
192 inline ReturnType operator()( size_t i, size_t j ) const {
193 BLAZE_INTERNAL_ASSERT( i < dm_.rows() , "Invalid row access index" );
194 BLAZE_INTERNAL_ASSERT( j < dm_.columns(), "Invalid column access index" );
195 return dm_(i,j);
196 }
197 //**********************************************************************************************
198
199 //**At function*********************************************************************************
207 inline ReturnType at( size_t i, size_t j ) const {
208 if( i >= dm_.rows() ) {
209 BLAZE_THROW_OUT_OF_RANGE( "Invalid row access index" );
210 }
211 if( j >= dm_.columns() ) {
212 BLAZE_THROW_OUT_OF_RANGE( "Invalid column access index" );
213 }
214 return (*this)(i,j);
215 }
216 //**********************************************************************************************
217
218 //**Load function*******************************************************************************
225 BLAZE_ALWAYS_INLINE auto load( size_t i, size_t j ) const noexcept {
226 BLAZE_INTERNAL_ASSERT( i < dm_.columns(), "Invalid row access index" );
227 BLAZE_INTERNAL_ASSERT( j < dm_.rows() , "Invalid column access index" );
228 BLAZE_INTERNAL_ASSERT( !SO || ( i % SIMDSIZE == 0UL ), "Invalid row access index" );
229 BLAZE_INTERNAL_ASSERT( SO || ( j % SIMDSIZE == 0UL ), "Invalid column access index" );
230 return dm_.load(i,j);
231 }
232 //**********************************************************************************************
233
234 //**Low-level data access***********************************************************************
239 inline const ElementType* data() const noexcept {
240 return dm_.data();
241 }
242 //**********************************************************************************************
243
244 //**Begin function******************************************************************************
250 inline ConstIterator begin( size_t i ) const {
251 return ConstIterator( dm_.begin(i) );
252 }
253 //**********************************************************************************************
254
255 //**End function********************************************************************************
261 inline ConstIterator end( size_t i ) const {
262 return ConstIterator( dm_.end(i) );
263 }
264 //**********************************************************************************************
265
266 //**Rows function*******************************************************************************
271 inline size_t rows() const noexcept {
272 return dm_.rows();
273 }
274 //**********************************************************************************************
275
276 //**Columns function****************************************************************************
281 inline size_t columns() const noexcept {
282 return dm_.columns();
283 }
284 //**********************************************************************************************
285
286 //**Operand access******************************************************************************
291 inline Operand operand() const noexcept {
292 return dm_;
293 }
294 //**********************************************************************************************
295
296 //**********************************************************************************************
302 template< typename T >
303 inline bool canAlias( const T* alias ) const noexcept {
304 return dm_.canAlias( alias );
305 }
306 //**********************************************************************************************
307
308 //**********************************************************************************************
314 template< typename T >
315 inline bool isAliased( const T* alias ) const noexcept {
316 return dm_.isAliased( alias );
317 }
318 //**********************************************************************************************
319
320 //**********************************************************************************************
325 inline bool isAligned() const noexcept {
326 return dm_.isAligned();
327 }
328 //**********************************************************************************************
329
330 //**********************************************************************************************
335 inline bool canSMPAssign() const noexcept {
336 return dm_.canSMPAssign();
337 }
338 //**********************************************************************************************
339
340 private:
341 //**Member variables****************************************************************************
343 //**********************************************************************************************
344
345 //**Assignment to dense matrices****************************************************************
357 template< typename MT2 // Type of the target dense matrix
358 , bool SO2 > // Storage order of the target dense matrix
359 friend inline auto assign( DenseMatrix<MT2,SO2>& lhs, const DMatDeclUniUppExpr& rhs )
361 {
363
364 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
365 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
366
367 assign( *lhs, rhs.dm_ );
368 }
370 //**********************************************************************************************
371
372 //**Assignment to sparse matrices***************************************************************
384 template< typename MT2 // Type of the target sparse matrix
385 , bool SO2 > // Storage order of the target dense matrix
386 friend inline auto assign( SparseMatrix<MT2,SO2>& lhs, const DMatDeclUniUppExpr& rhs )
388 {
390
391 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
392 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
393
394 assign( *lhs, rhs.dm_ );
395 }
397 //**********************************************************************************************
398
399 //**Addition assignment to dense matrices*******************************************************
411 template< typename MT2 // Type of the target dense matrix
412 , bool SO2 > // Storage order of the target dense matrix
413 friend inline auto addAssign( DenseMatrix<MT2,SO2>& lhs, const DMatDeclUniUppExpr& rhs )
414 -> EnableIf_t< UseAssign_v<MT2> >
415 {
417
418 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
419 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
420
421 addAssign( *lhs, rhs.dm_ );
422 }
424 //**********************************************************************************************
425
426 //**Addition assignment to sparse matrices******************************************************
438 template< typename MT2 // Type of the target sparse matrix
439 , bool SO2 > // Storage order of the target dense matrix
440 friend inline auto addAssign( SparseMatrix<MT2,SO2>& lhs, const DMatDeclUniUppExpr& rhs )
441 -> EnableIf_t< UseAssign_v<MT2> >
442 {
444
445 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
446 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
447
448 addAssign( *lhs, rhs.dm_ );
449 }
451 //**********************************************************************************************
452
453 //**Subtraction assignment to dense matrices****************************************************
465 template< typename MT2 // Type of the target dense matrix
466 , bool SO2 > // Storage order of the target dense matrix
467 friend inline auto subAssign( DenseMatrix<MT2,SO2>& lhs, const DMatDeclUniUppExpr& rhs )
468 -> EnableIf_t< UseAssign_v<MT2> >
469 {
471
472 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
473 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
474
475 subAssign( *lhs, rhs.dm_ );
476 }
478 //**********************************************************************************************
479
480 //**Subtraction assignment to sparse matrices***************************************************
492 template< typename MT2 // Type of the target sparse matrix
493 , bool SO2 > // Storage order of the target dense matrix
494 friend inline auto subAssign( SparseMatrix<MT2,SO2>& lhs, const DMatDeclUniUppExpr& rhs )
495 -> EnableIf_t< UseAssign_v<MT2> >
496 {
498
499 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
500 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
501
502 subAssign( *lhs, rhs.dm_ );
503 }
505 //**********************************************************************************************
506
507 //**Schur product assignment to dense matrices**************************************************
519 template< typename MT2 // Type of the target dense matrix
520 , bool SO2 > // Storage order of the target dense matrix
521 friend inline auto schurAssign( DenseMatrix<MT2,SO2>& lhs, const DMatDeclUniUppExpr& rhs )
522 -> EnableIf_t< UseAssign_v<MT2> >
523 {
525
526 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
527 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
528
529 schurAssign( *lhs, rhs.dm_ );
530 }
532 //**********************************************************************************************
533
534 //**Schur product assignment to sparse matrices*************************************************
546 template< typename MT2 // Type of the target sparse matrix
547 , bool SO2 > // Storage order of the target dense matrix
548 friend inline auto schurAssign( SparseMatrix<MT2,SO2>& lhs, const DMatDeclUniUppExpr& rhs )
549 -> EnableIf_t< UseAssign_v<MT2> >
550 {
552
553 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
554 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
555
556 schurAssign( *lhs, rhs.dm_ );
557 }
559 //**********************************************************************************************
560
561 //**Multiplication assignment to dense matrices*************************************************
573 template< typename MT2 // Type of the target dense matrix
574 , bool SO2 > // Storage order of the target dense matrix
575 friend inline auto multAssign( DenseMatrix<MT2,SO2>& lhs, const DMatDeclUniUppExpr& rhs )
576 -> EnableIf_t< UseAssign_v<MT2> >
577 {
579
580 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
581 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
582
583 multAssign( *lhs, rhs.dm_ );
584 }
586 //**********************************************************************************************
587
588 //**Multiplication assignment to sparse matrices************************************************
600 template< typename MT2 // Type of the target sparse matrix
601 , bool SO2 > // Storage order of the target dense matrix
602 friend inline auto multAssign( SparseMatrix<MT2,SO2>& lhs, const DMatDeclUniUppExpr& rhs )
603 -> EnableIf_t< UseAssign_v<MT2> >
604 {
606
607 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
608 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
609
610 multAssign( *lhs, rhs.dm_ );
611 }
613 //**********************************************************************************************
614
615 //**SMP assignment to dense matrices************************************************************
627 template< typename MT2 // Type of the target dense matrix
628 , bool SO2 > // Storage order of the target dense matrix
629 friend inline auto smpAssign( DenseMatrix<MT2,SO2>& lhs, const DMatDeclUniUppExpr& rhs )
630 -> EnableIf_t< UseSMPAssign_v<MT2> >
631 {
633
634 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
635 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
636
637 smpAssign( *lhs, rhs.dm_ );
638 }
640 //**********************************************************************************************
641
642 //**SMP assignment to sparse matrices***********************************************************
654 template< typename MT2 // Type of the target sparse matrix
655 , bool SO2 > // Storage order of the target dense matrix
656 friend inline auto smpAssign( SparseMatrix<MT2,SO2>& lhs, const DMatDeclUniUppExpr& rhs )
657 -> EnableIf_t< UseSMPAssign_v<MT2> >
658 {
660
661 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
662 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
663
664 smpAssign( *lhs, rhs.dm_ );
665 }
667 //**********************************************************************************************
668
669 //**SMP addition assignment to dense matrices***************************************************
681 template< typename MT2 // Type of the target dense matrix
682 , bool SO2 > // Storage order of the target dense matrix
683 friend inline auto smpAddAssign( DenseMatrix<MT2,SO2>& lhs, const DMatDeclUniUppExpr& rhs )
684 -> EnableIf_t< UseSMPAssign_v<MT2> >
685 {
687
688 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
689 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
690
691 smpAddAssign( *lhs, rhs.dm_ );
692 }
694 //**********************************************************************************************
695
696 //**SMP addition assignment to sparse matrices**************************************************
708 template< typename MT2 // Type of the target sparse matrix
709 , bool SO2 > // Storage order of the target dense matrix
710 friend inline auto smpAddAssign( SparseMatrix<MT2,SO2>& lhs, const DMatDeclUniUppExpr& rhs )
711 -> EnableIf_t< UseSMPAssign_v<MT2> >
712 {
714
715 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
716 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
717
718 smpAddAssign( *lhs, rhs.dm_ );
719 }
721 //**********************************************************************************************
722
723 //**SMP subtraction assignment to dense matrices************************************************
735 template< typename MT2 // Type of the target dense matrix
736 , bool SO2 > // Storage order of the target dense matrix
737 friend inline auto smpSubAssign( DenseMatrix<MT2,SO2>& lhs, const DMatDeclUniUppExpr& rhs )
738 -> EnableIf_t< UseSMPAssign_v<MT2> >
739 {
741
742 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
743 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
744
745 smpSubAssign( *lhs, rhs.dm_ );
746 }
748 //**********************************************************************************************
749
750 //**SMP subtraction assignment to sparse matrices***********************************************
762 template< typename MT2 // Type of the target sparse matrix
763 , bool SO2 > // Storage order of the target dense matrix
764 friend inline auto smpSubAssign( SparseMatrix<MT2,SO2>& lhs, const DMatDeclUniUppExpr& rhs )
765 -> EnableIf_t< UseSMPAssign_v<MT2> >
766 {
768
769 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
770 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
771
772 smpSubAssign( *lhs, rhs.dm_ );
773 }
775 //**********************************************************************************************
776
777 //**SMP Schur product assignment to dense matrices**********************************************
789 template< typename MT2 // Type of the target dense matrix
790 , bool SO2 > // Storage order of the target dense matrix
791 friend inline auto smpSchurAssign( DenseMatrix<MT2,SO2>& lhs, const DMatDeclUniUppExpr& rhs )
792 -> EnableIf_t< UseSMPAssign_v<MT2> >
793 {
795
796 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
797 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
798
799 smpSchurAssign( *lhs, rhs.dm_ );
800 }
802 //**********************************************************************************************
803
804 //**SMP Schur product assignment to sparse matrices*********************************************
816 template< typename MT2 // Type of the target sparse matrix
817 , bool SO2 > // Storage order of the target dense matrix
818 friend inline auto smpSchurAssign( SparseMatrix<MT2,SO2>& lhs, const DMatDeclUniUppExpr& rhs )
819 -> EnableIf_t< UseSMPAssign_v<MT2> >
820 {
822
823 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
824 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
825
826 smpSchurAssign( *lhs, rhs.dm_ );
827 }
829 //**********************************************************************************************
830
831 //**SMP multiplication assignment to dense matrices*********************************************
844 template< typename MT2 // Type of the target dense matrix
845 , bool SO2 > // Storage order of the target dense matrix
846 friend inline auto smpMultAssign( DenseMatrix<MT2,SO2>& lhs, const DMatDeclUniUppExpr& rhs )
847 -> EnableIf_t< UseSMPAssign_v<MT2> >
848 {
850
851 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
852 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
853
854 smpMultAssign( *lhs, rhs.dm_ );
855 }
857 //**********************************************************************************************
858
859 //**SMP multiplication assignment to sparse matrices********************************************
872 template< typename MT2 // Type of the target sparse matrix
873 , bool SO2 > // Storage order of the target dense matrix
874 friend inline auto smpMultAssign( SparseMatrix<MT2,SO2>& lhs, const DMatDeclUniUppExpr& rhs )
875 -> EnableIf_t< UseSMPAssign_v<MT2> >
876 {
878
879 BLAZE_INTERNAL_ASSERT( (*lhs).rows() == rhs.rows() , "Invalid number of rows" );
880 BLAZE_INTERNAL_ASSERT( (*lhs).columns() == rhs.columns(), "Invalid number of columns" );
881
882 smpMultAssign( *lhs, rhs.dm_ );
883 }
885 //**********************************************************************************************
886
887 //**Compile time checks*************************************************************************
894 //**********************************************************************************************
895};
896//*************************************************************************************************
897
898
899
900
901//=================================================================================================
902//
903// GLOBAL FUNCTIONS
904//
905//=================================================================================================
906
907//*************************************************************************************************
918template< typename MT // Type of the dense matrix
919 , bool SO // Storage order
920 , DisableIf_t< IsUniUpper_v<MT> || IsLower_v<MT> >* = nullptr >
921inline const DMatDeclUniUppExpr<MT,SO> decluniupp_backend( const DenseMatrix<MT,SO>& dm )
922{
924
925 BLAZE_INTERNAL_ASSERT( isSquare( *dm ), "Non-square matrix detected" );
926
927 return DMatDeclUniUppExpr<MT,SO>( *dm );
928}
930//*************************************************************************************************
931
932
933//*************************************************************************************************
944template< typename MT // Type of the dense matrix
945 , bool SO // Storage order
946 , EnableIf_t< !IsUniUpper_v<MT> && IsLower_v<MT> >* = nullptr >
947inline const IdentityMatrix<ElementType_t<MT>,SO> decluniupp_backend( const DenseMatrix<MT,SO>& dm )
948{
950
951 BLAZE_INTERNAL_ASSERT( isSquare( *dm ), "Non-square matrix detected" );
952
953 return IdentityMatrix<ElementType_t<MT>,SO>( (*dm).rows() );
954}
956//*************************************************************************************************
957
958
959//*************************************************************************************************
970template< typename MT // Type of the dense matrix
971 , bool SO // Storage order
972 , EnableIf_t< IsUniUpper_v<MT> >* = nullptr >
973inline const MT& decluniupp_backend( const DenseMatrix<MT,SO>& dm )
974{
976
977 BLAZE_INTERNAL_ASSERT( isSquare( *dm ), "Non-square matrix detected" );
978
979 return *dm;
980}
982//*************************************************************************************************
983
984
985//*************************************************************************************************
1003template< typename MT // Type of the dense matrix
1004 , bool SO > // Storage order
1005inline decltype(auto) decluniupp( const DenseMatrix<MT,SO>& dm )
1006{
1008
1011
1012 if( !isSquare( *dm ) ) {
1013 BLAZE_THROW_INVALID_ARGUMENT( "Invalid uniupper matrix specification" );
1014 }
1015
1016 return decluniupp_backend( *dm );
1017}
1018//*************************************************************************************************
1019
1020
1021
1022
1023//=================================================================================================
1024//
1025// HASCONSTDATAACCESS SPECIALIZATIONS
1026//
1027//=================================================================================================
1028
1029//*************************************************************************************************
1031template< typename MT, bool SO >
1032struct HasConstDataAccess< DMatDeclUniUppExpr<MT,SO> >
1033 : public HasConstDataAccess<MT>
1034{};
1036//*************************************************************************************************
1037
1038
1039
1040
1041//=================================================================================================
1042//
1043// ISALIGNED SPECIALIZATIONS
1044//
1045//=================================================================================================
1046
1047//*************************************************************************************************
1049template< typename MT, bool SO >
1050struct IsAligned< DMatDeclUniUppExpr<MT,SO> >
1051 : public IsAligned<MT>
1052{};
1054//*************************************************************************************************
1055
1056
1057
1058
1059//=================================================================================================
1060//
1061// ISUNIUPPER SPECIALIZATIONS
1062//
1063//=================================================================================================
1064
1065//*************************************************************************************************
1067template< typename MT, bool SO >
1068struct IsUniUpper< DMatDeclUniUppExpr<MT,SO> >
1069 : public TrueType
1070{};
1072//*************************************************************************************************
1073
1074} // namespace blaze
1075
1076#endif
Header file for auxiliary alias declarations.
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.
Definition: Aliases.h:470
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.
Definition: Aliases.h:450
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition: Aliases.h:190
typename T::OppositeType OppositeType_t
Alias declaration for nested OppositeType type definitions.
Definition: Aliases.h:310
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.
Definition: Aliases.h:550
Header file for run time assertion macros.
Header file for the decluniupp trait.
Header file for the EnableIf class template.
Header file for the function trace functionality.
Header file for the GetMemberType type trait.
Header file for the HasConstDataAccess type trait.
Header file for the If class template.
Header file for the IntegralConstant class template.
Utility type for generic codes.
Header file for the IsAligned type trait.
Header file for the IsExpression type trait class.
Header file for the IsLower type trait.
Header file for the IsUniUpper type trait.
Constraint on the data type.
Header file for the SIMD trait.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Header file for the implementation of the base template of the UniUpperMatrix.
Expression object for the explicit uniupper declaration of dense matrices.
Definition: DMatDeclUniUppExpr.h:97
DMatDeclUniUppExpr(const MT &dm) noexcept
Constructor for the DMatDeclUniUppExpr class.
Definition: DMatDeclUniUppExpr.h:178
Operand operand() const noexcept
Returns the dense matrix operand.
Definition: DMatDeclUniUppExpr.h:291
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DMatDeclUniUppExpr.h:281
OppositeType_t< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatDeclUniUppExpr.h:145
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row/column i.
Definition: DMatDeclUniUppExpr.h:250
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: DMatDeclUniUppExpr.h:165
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition: DMatDeclUniUppExpr.h:162
ElementType_t< MT > ElementType
Resulting element type.
Definition: DMatDeclUniUppExpr.h:147
ResultType_t< MT > RT
Result type of the dense matrix expression.
Definition: DMatDeclUniUppExpr.h:100
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatDeclUniUppExpr.h:192
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DMatDeclUniUppExpr.h:335
static constexpr bool useAssign
Compilation switch for the serial evaluation strategy of the uniupper declaration expression.
Definition: DMatDeclUniUppExpr.h:114
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DMatDeclUniUppExpr.h:207
If_t< RequiresEvaluation_v< MT >, const ResultType, const DMatDeclUniUppExpr & > CompositeType
Data type for composite expression templates.
Definition: DMatDeclUniUppExpr.h:151
DeclUniUppTrait_t< RT > ResultType
Result type for expression template evaluations.
Definition: DMatDeclUniUppExpr.h:144
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: DMatDeclUniUppExpr.h:146
BLAZE_ALWAYS_INLINE auto load(size_t i, size_t j) const noexcept
Access to the SIMD elements of the matrix.
Definition: DMatDeclUniUppExpr.h:225
BLAZE_CREATE_GET_TYPE_MEMBER_TYPE_TRAIT(GetConstIterator, ConstIterator, INVALID_TYPE)
Definition of the GetConstIterator type trait.
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DMatDeclUniUppExpr.h:315
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DMatDeclUniUppExpr.h:303
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row/column i.
Definition: DMatDeclUniUppExpr.h:261
const ElementType * data() const noexcept
Low-level data access to the matrix elements.
Definition: DMatDeclUniUppExpr.h:239
GetConstIterator_t< MT > ConstIterator
Iterator over the elements of the dense matrix.
Definition: DMatDeclUniUppExpr.h:154
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DMatDeclUniUppExpr.h:271
ReturnType_t< MT > ReturnType
Return type for expression template evaluations.
Definition: DMatDeclUniUppExpr.h:148
If_t< IsExpression_v< MT >, const MT, const MT & > Operand
Composite data type of the dense matrix expression.
Definition: DMatDeclUniUppExpr.h:157
Operand dm_
Dense matrix of the decluniupp expression.
Definition: DMatDeclUniUppExpr.h:342
static constexpr size_t SIMDSIZE
The number of elements packed within a single SIMD element.
Definition: DMatDeclUniUppExpr.h:170
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatDeclUniUppExpr.h:325
Base class for dense matrices.
Definition: DenseMatrix.h:82
SIMD characteristics of data types.
Definition: SIMDTrait.h:297
Base class for sparse matrices.
Definition: SparseMatrix.h:77
Constraint on the data type.
Constraint on the data type.
Header file for the DeclUniUppExpr base class.
Header file for the Declaration base class.
Header file for the DenseMatrix base class.
decltype(auto) decluniupp(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as uniupper.
Definition: DMatDeclUniUppExpr.h:1005
#define BLAZE_CONSTRAINT_MUST_NOT_BE_STRICTLY_TRIANGULAR_MATRIX_TYPE(T)
Constraint on the data type.
Definition: StrictlyTriangular.h:81
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.
Definition: DenseMatrix.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UNIUPPER_MATRIX_TYPE(T)
Constraint on the data type.
Definition: UniUpper.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UNIFORM_TYPE(T)
Constraint on the data type.
Definition: Uniform.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_LOWER_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Lower.h:81
#define BLAZE_CONSTRAINT_MUST_BE_MATRIX_WITH_STORAGE_ORDER(T, SO)
Constraint on the data type.
Definition: StorageOrder.h:63
typename DeclUniUppTrait< MT >::Type DeclUniUppTrait_t
Auxiliary alias declaration for the DeclUniUppTrait type trait.
Definition: DeclUniUppTrait.h:146
bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:1383
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition: Assert.h:101
auto smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:162
auto smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:100
auto smpMultAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs) -> EnableIf_t< IsDenseVector_v< VT1 > >
Default implementation of the SMP multiplication assignment of a vector to a dense vector.
Definition: DenseVector.h:192
auto smpSchurAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP Schur product assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:194
auto smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:131
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
BoolConstant< true > TrueType
Type traits base class.
Definition: IntegralConstant.h:132
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition: EnableIf.h:138
typename If< Condition >::template Type< T1, T2 > If_t
Auxiliary alias template for the If class template.
Definition: If.h:108
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.
Definition: Exception.h:331
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.
Definition: Exception.h:235
#define BLAZE_FUNCTION_TRACE
Function trace macro.
Definition: FunctionTrace.h:94
Header file for the exception macros of the math module.
Constraints on the storage order of matrix types.
Header file for all forward declarations for expression class templates.
Header file for all forward declarations for sparse vectors and matrices.
Base class for all decluniupp expression templates.
Definition: DeclUniUppExpr.h:69
Base class for all declaration expression templates.
Definition: Declaration.h:76
Header file for the RequiresEvaluation type trait.
Header file for basic type definitions.