Blaze  3.6
DMatDMatSchurExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATDMATSCHUREXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DMATDMATSCHUREXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <iterator>
44 #include <utility>
45 #include <blaze/math/Aliases.h>
52 #include <blaze/math/Exception.h>
58 #include <blaze/math/SIMD.h>
76 #include <blaze/system/Inline.h>
78 #include <blaze/util/Assert.h>
79 #include <blaze/util/DisableIf.h>
80 #include <blaze/util/EnableIf.h>
83 #include <blaze/util/MaybeUnused.h>
84 #include <blaze/util/mpl/If.h>
85 #include <blaze/util/Types.h>
86 
87 
88 namespace blaze {
89 
90 //=================================================================================================
91 //
92 // CLASS DMATDMATSCHUREXPR
93 //
94 //=================================================================================================
95 
96 //*************************************************************************************************
103 template< typename MT1 // Type of the left-hand side dense matrix
104  , typename MT2 // Type of the right-hand side dense matrix
105  , bool SO > // Storage order
107  : public SchurExpr< DenseMatrix< DMatDMatSchurExpr<MT1,MT2,SO>, SO > >
108  , private Computation
109 {
110  private:
111  //**Type definitions****************************************************************************
120  //**********************************************************************************************
121 
122  //**Return type evaluation**********************************************************************
124 
129  static constexpr bool returnExpr = ( !IsTemporary_v<RN1> && !IsTemporary_v<RN2> );
130 
132  using ExprReturnType = decltype( std::declval<RN1>() * std::declval<RN2>() );
133  //**********************************************************************************************
134 
135  //**Serial evaluation strategy******************************************************************
137 
143  static constexpr bool useAssign =
144  ( RequiresEvaluation_v<MT1> || RequiresEvaluation_v<MT2> || !returnExpr );
145 
147  template< typename MT >
149  static constexpr bool UseAssign_v = useAssign;
151  //**********************************************************************************************
152 
153  //**Parallel evaluation strategy****************************************************************
155 
161  template< typename MT >
162  static constexpr bool UseSMPAssign_v =
163  ( ( !MT1::smpAssignable || !MT2::smpAssignable ) && useAssign );
165  //**********************************************************************************************
166 
167  public:
168  //**Type definitions****************************************************************************
175 
178 
181 
183  using LeftOperand = If_t< IsExpression_v<MT1>, const MT1, const MT1& >;
184 
186  using RightOperand = If_t< IsExpression_v<MT2>, const MT2, const MT2& >;
187  //**********************************************************************************************
188 
189  //**ConstIterator class definition**************************************************************
193  {
194  public:
195  //**Type definitions*************************************************************************
196  using IteratorCategory = std::random_access_iterator_tag;
201 
202  // STL iterator requirements
208 
211 
214  //*******************************************************************************************
215 
216  //**Constructor******************************************************************************
223  : left_ ( left ) // Iterator to the current left-hand side element
224  , right_( right ) // Iterator to the current right-hand side element
225  {}
226  //*******************************************************************************************
227 
228  //**Addition assignment operator*************************************************************
235  left_ += inc;
236  right_ += inc;
237  return *this;
238  }
239  //*******************************************************************************************
240 
241  //**Subtraction assignment operator**********************************************************
248  left_ -= dec;
249  right_ -= dec;
250  return *this;
251  }
252  //*******************************************************************************************
253 
254  //**Prefix increment operator****************************************************************
260  ++left_;
261  ++right_;
262  return *this;
263  }
264  //*******************************************************************************************
265 
266  //**Postfix increment operator***************************************************************
272  return ConstIterator( left_++, right_++ );
273  }
274  //*******************************************************************************************
275 
276  //**Prefix decrement operator****************************************************************
282  --left_;
283  --right_;
284  return *this;
285  }
286  //*******************************************************************************************
287 
288  //**Postfix decrement operator***************************************************************
294  return ConstIterator( left_--, right_-- );
295  }
296  //*******************************************************************************************
297 
298  //**Element access operator******************************************************************
303  inline ReturnType operator*() const {
304  return (*left_) * (*right_);
305  }
306  //*******************************************************************************************
307 
308  //**Load function****************************************************************************
313  inline auto load() const noexcept {
314  return left_.load() * right_.load();
315  }
316  //*******************************************************************************************
317 
318  //**Equality operator************************************************************************
324  inline BLAZE_DEVICE_CALLABLE bool operator==( const ConstIterator& rhs ) const {
325  return left_ == rhs.left_;
326  }
327  //*******************************************************************************************
328 
329  //**Inequality operator**********************************************************************
335  inline BLAZE_DEVICE_CALLABLE bool operator!=( const ConstIterator& rhs ) const {
336  return left_ != rhs.left_;
337  }
338  //*******************************************************************************************
339 
340  //**Less-than operator***********************************************************************
346  inline BLAZE_DEVICE_CALLABLE bool operator<( const ConstIterator& rhs ) const {
347  return left_ < rhs.left_;
348  }
349  //*******************************************************************************************
350 
351  //**Greater-than operator********************************************************************
357  inline BLAZE_DEVICE_CALLABLE bool operator>( const ConstIterator& rhs ) const {
358  return left_ > rhs.left_;
359  }
360  //*******************************************************************************************
361 
362  //**Less-or-equal-than operator**************************************************************
368  inline BLAZE_DEVICE_CALLABLE bool operator<=( const ConstIterator& rhs ) const {
369  return left_ <= rhs.left_;
370  }
371  //*******************************************************************************************
372 
373  //**Greater-or-equal-than operator***********************************************************
379  inline BLAZE_DEVICE_CALLABLE bool operator>=( const ConstIterator& rhs ) const {
380  return left_ >= rhs.left_;
381  }
382  //*******************************************************************************************
383 
384  //**Subtraction operator*********************************************************************
391  return left_ - rhs.left_;
392  }
393  //*******************************************************************************************
394 
395  //**Addition operator************************************************************************
402  friend inline const ConstIterator operator+( const ConstIterator& it, size_t inc ) {
403  return ConstIterator( it.left_ + inc, it.right_ + inc );
404  }
405  //*******************************************************************************************
406 
407  //**Addition operator************************************************************************
414  friend inline const ConstIterator operator+( size_t inc, const ConstIterator& it ) {
415  return ConstIterator( it.left_ + inc, it.right_ + inc );
416  }
417  //*******************************************************************************************
418 
419  //**Subtraction operator*********************************************************************
426  friend inline BLAZE_DEVICE_CALLABLE const ConstIterator operator-( const ConstIterator& it, size_t dec ) {
427  return ConstIterator( it.left_ - dec, it.right_ - dec );
428  }
429  //*******************************************************************************************
430 
431  private:
432  //**Member variables*************************************************************************
435  //*******************************************************************************************
436  };
437  //**********************************************************************************************
438 
439  //**Compilation flags***************************************************************************
441  static constexpr bool simdEnabled =
442  ( MT1::simdEnabled && MT2::simdEnabled && HasSIMDMult_v<ET1,ET2> );
443 
445  static constexpr bool smpAssignable = ( MT1::smpAssignable && MT2::smpAssignable );
446  //**********************************************************************************************
447 
448  //**SIMD properties*****************************************************************************
450  static constexpr size_t SIMDSIZE = SIMDTrait<ElementType>::size;
451  //**********************************************************************************************
452 
453  //**Constructor*********************************************************************************
459  explicit inline DMatDMatSchurExpr( const MT1& lhs, const MT2& rhs ) noexcept
460  : lhs_( lhs ) // Left-hand side dense matrix of the Schur product expression
461  , rhs_( rhs ) // Right-hand side dense matrix of the Schur product expression
462  {
463  BLAZE_INTERNAL_ASSERT( lhs.rows() == rhs.rows() , "Invalid number of rows" );
464  BLAZE_INTERNAL_ASSERT( lhs.columns() == rhs.columns(), "Invalid number of columns" );
465  }
466  //**********************************************************************************************
467 
468  //**Access operator*****************************************************************************
475  inline ReturnType operator()( size_t i, size_t j ) const {
476  BLAZE_INTERNAL_ASSERT( i < lhs_.rows() , "Invalid row access index" );
477  BLAZE_INTERNAL_ASSERT( j < lhs_.columns(), "Invalid column access index" );
478  return lhs_(i,j) * rhs_(i,j);
479  }
480  //**********************************************************************************************
481 
482  //**At function*********************************************************************************
490  inline ReturnType at( size_t i, size_t j ) const {
491  if( i >= lhs_.rows() ) {
492  BLAZE_THROW_OUT_OF_RANGE( "Invalid row access index" );
493  }
494  if( j >= lhs_.columns() ) {
495  BLAZE_THROW_OUT_OF_RANGE( "Invalid column access index" );
496  }
497  return (*this)(i,j);
498  }
499  //**********************************************************************************************
500 
501  //**Load function*******************************************************************************
508  BLAZE_ALWAYS_INLINE auto load( size_t i, size_t j ) const noexcept {
509  BLAZE_INTERNAL_ASSERT( i < lhs_.rows() , "Invalid row access index" );
510  BLAZE_INTERNAL_ASSERT( j < lhs_.columns(), "Invalid column access index" );
511  BLAZE_INTERNAL_ASSERT( !SO || ( i % SIMDSIZE == 0UL ), "Invalid row access index" );
512  BLAZE_INTERNAL_ASSERT( SO || ( j % SIMDSIZE == 0UL ), "Invalid column access index" );
513  return lhs_.load(i,j) * rhs_.load(i,j);
514  }
515  //**********************************************************************************************
516 
517  //**Begin function******************************************************************************
523  inline ConstIterator begin( size_t i ) const {
524  return ConstIterator( lhs_.begin(i), rhs_.begin(i) );
525  }
526  //**********************************************************************************************
527 
528  //**End function********************************************************************************
534  inline ConstIterator end( size_t i ) const {
535  return ConstIterator( lhs_.end(i), rhs_.end(i) );
536  }
537  //**********************************************************************************************
538 
539  //**Rows function*******************************************************************************
544  inline size_t rows() const noexcept {
545  return lhs_.rows();
546  }
547  //**********************************************************************************************
548 
549  //**Columns function****************************************************************************
554  inline size_t columns() const noexcept {
555  return lhs_.columns();
556  }
557  //**********************************************************************************************
558 
559  //**Left operand access*************************************************************************
564  inline LeftOperand leftOperand() const noexcept {
565  return lhs_;
566  }
567  //**********************************************************************************************
568 
569  //**Right operand access************************************************************************
574  inline RightOperand rightOperand() const noexcept {
575  return rhs_;
576  }
577  //**********************************************************************************************
578 
579  //**********************************************************************************************
585  template< typename T >
586  inline bool canAlias( const T* alias ) const noexcept {
587  return ( IsExpression_v<MT1> && ( RequiresEvaluation_v<MT1> ? lhs_.isAliased( alias ) : lhs_.canAlias( alias ) ) ) ||
588  ( IsExpression_v<MT2> && ( RequiresEvaluation_v<MT2> ? rhs_.isAliased( alias ) : rhs_.canAlias( alias ) ) );
589  }
590  //**********************************************************************************************
591 
592  //**********************************************************************************************
598  template< typename T >
599  inline bool isAliased( const T* alias ) const noexcept {
600  return ( lhs_.isAliased( alias ) || rhs_.isAliased( alias ) );
601  }
602  //**********************************************************************************************
603 
604  //**********************************************************************************************
609  inline bool isAligned() const noexcept {
610  return lhs_.isAligned() && rhs_.isAligned();
611  }
612  //**********************************************************************************************
613 
614  //**********************************************************************************************
619  inline bool canSMPAssign() const noexcept {
620  return lhs_.canSMPAssign() || rhs_.canSMPAssign() ||
621  ( rows() * columns() >= SMP_DMATDMATSCHUR_THRESHOLD );
622  }
623  //**********************************************************************************************
624 
625  private:
626  //**Member variables****************************************************************************
629  //**********************************************************************************************
630 
631  //**Assignment to dense matrices****************************************************************
646  template< typename MT // Type of the target dense matrix
647  , bool SO2 > // Storage order of the target dense matrix
648  friend inline auto assign( DenseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
649  -> EnableIf_t< UseAssign_v<MT> && !IsCommutative_v<MT1,MT2> >
650  {
652 
653  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
654  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
655 
656  if( !IsOperation_v<MT1> && isSame( ~lhs, rhs.lhs_ ) ) {
657  schurAssign( ~lhs, rhs.rhs_ );
658  }
659  else {
660  CT1 A( serial( rhs.lhs_ ) );
661  CT2 B( serial( rhs.rhs_ ) );
662  assign( ~lhs, A % B );
663  }
664  }
666  //**********************************************************************************************
667 
668  //**Assignment to dense matrices****************************************************************
682  template< typename MT // Type of the target dense matrix
683  , bool SO2 > // Storage order of the target dense matrix
684  friend inline auto assign( DenseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
685  -> EnableIf_t< UseAssign_v<MT> && IsCommutative_v<MT1,MT2> >
686  {
688 
689  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
690  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
691 
692  if( !IsOperation_v<MT1> && isSame( ~lhs, rhs.lhs_ ) ) {
693  schurAssign( ~lhs, rhs.rhs_ );
694  }
695  else if( !IsOperation_v<MT2> && isSame( ~lhs, rhs.rhs_ ) ) {
696  schurAssign( ~lhs, rhs.lhs_ );
697  }
698  else if( !RequiresEvaluation_v<MT2> ) {
699  assign ( ~lhs, rhs.rhs_ );
700  schurAssign( ~lhs, rhs.lhs_ );
701  }
702  else {
703  assign ( ~lhs, rhs.lhs_ );
704  schurAssign( ~lhs, rhs.rhs_ );
705  }
706  }
708  //**********************************************************************************************
709 
710  //**Assignment to sparse matrices***************************************************************
724  template< typename MT // Type of the target sparse matrix
725  , bool SO2 > // Storage order of the target sparse matrix
726  friend inline auto assign( SparseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
727  -> EnableIf_t< UseAssign_v<MT> >
728  {
730 
731  using TmpType = If_t< SO == SO2, ResultType, OppositeType >;
732 
739 
740  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
741  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
742 
743  const TmpType tmp( serial( rhs ) );
744  assign( ~lhs, tmp );
745  }
747  //**********************************************************************************************
748 
749  //**Addition assignment to dense matrices*******************************************************
763  template< typename MT // Type of the target dense matrix
764  , bool SO2 > // Storage order of the target dense matrix
765  friend inline auto addAssign( DenseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
766  -> EnableIf_t< UseAssign_v<MT> >
767  {
769 
773 
774  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
775  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
776 
777  const ResultType tmp( serial( rhs ) );
778  addAssign( ~lhs, tmp );
779  }
781  //**********************************************************************************************
782 
783  //**Addition assignment to sparse matrices******************************************************
784  // No special implementation for the addition assignment to sparse matrices.
785  //**********************************************************************************************
786 
787  //**Subtraction assignment to dense matrices****************************************************
801  template< typename MT // Type of the target dense matrix
802  , bool SO2 > // Storage order of the target dense matrix
803  friend inline auto subAssign( DenseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
804  -> EnableIf_t< UseAssign_v<MT> >
805  {
807 
811 
812  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
813  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
814 
815  const ResultType tmp( serial( rhs ) );
816  subAssign( ~lhs, tmp );
817  }
819  //**********************************************************************************************
820 
821  //**Subtraction assignment to sparse matrices***************************************************
822  // No special implementation for the subtraction assignment to sparse matrices.
823  //**********************************************************************************************
824 
825  //**Schur product assignment to dense matrices**************************************************
840  template< typename MT // Type of the target dense matrix
841  , bool SO2 > // Storage order of the target dense matrix
842  friend inline auto schurAssign( DenseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
843  -> EnableIf_t< UseAssign_v<MT> && !IsCommutative_v<MT1,MT2> >
844  {
846 
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  const ResultType tmp( serial( rhs ) );
855  schurAssign( ~lhs, tmp );
856  }
858  //**********************************************************************************************
859 
860  //**Schur product assignment to dense matrices**************************************************
875  template< typename MT // Type of the target dense matrix
876  , bool SO2 > // Storage order of the target dense matrix
877  friend inline auto schurAssign( DenseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
878  -> EnableIf_t< UseAssign_v<MT> && IsCommutative_v<MT1,MT2> >
879  {
881 
882  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
883  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
884 
885  if( !RequiresEvaluation_v<MT2> ) {
886  schurAssign( ~lhs, rhs.rhs_ );
887  schurAssign( ~lhs, rhs.lhs_ );
888  }
889  else {
890  schurAssign( ~lhs, rhs.lhs_ );
891  schurAssign( ~lhs, rhs.rhs_ );
892  }
893  }
895  //**********************************************************************************************
896 
897  //**Schur product assignment to sparse matrices*************************************************
898  // No special implementation for the Schur product assignment to sparse matrices.
899  //**********************************************************************************************
900 
901  //**Multiplication assignment to dense matrices*************************************************
902  // No special implementation for the multiplication assignment to dense matrices.
903  //**********************************************************************************************
904 
905  //**Multiplication assignment to sparse matrices************************************************
906  // No special implementation for the multiplication assignment to sparse matrices.
907  //**********************************************************************************************
908 
909  //**SMP assignment to dense matrices************************************************************
924  template< typename MT // Type of the target dense matrix
925  , bool SO2 > // Storage order of the target dense matrix
926  friend inline auto smpAssign( DenseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
927  -> EnableIf_t< UseSMPAssign_v<MT> && !IsCommutative_v<MT1,MT2> >
928  {
930 
931  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
932  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
933 
934  if( !IsOperation_v<MT1> && isSame( ~lhs, rhs.lhs_ ) ) {
935  smpSchurAssign( ~lhs, rhs.rhs_ );
936  }
937  else {
938  CT1 A( rhs.lhs_ );
939  CT2 B( rhs.rhs_ );
940  smpAssign( ~lhs, A % B );
941  }
942  }
944  //**********************************************************************************************
945 
946  //**SMP assignment to dense matrices************************************************************
961  template< typename MT // Type of the target dense matrix
962  , bool SO2 > // Storage order of the target dense matrix
963  friend inline auto smpAssign( DenseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
964  -> EnableIf_t< UseSMPAssign_v<MT> && IsCommutative_v<MT1,MT2> >
965  {
967 
968  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
969  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
970 
971  if( !IsOperation_v<MT1> && isSame( ~lhs, rhs.lhs_ ) ) {
972  smpSchurAssign( ~lhs, rhs.rhs_ );
973  }
974  else if( !IsOperation_v<MT2> && isSame( ~lhs, rhs.rhs_ ) ) {
975  smpSchurAssign( ~lhs, rhs.lhs_ );
976  }
977  else if( !RequiresEvaluation_v<MT2> ) {
978  smpAssign ( ~lhs, rhs.rhs_ );
979  smpSchurAssign( ~lhs, rhs.lhs_ );
980  }
981  else {
982  smpAssign ( ~lhs, rhs.lhs_ );
983  smpSchurAssign( ~lhs, rhs.rhs_ );
984  }
985  }
987  //**********************************************************************************************
988 
989  //**SMP assignment to sparse matrices***********************************************************
1003  template< typename MT // Type of the target sparse matrix
1004  , bool SO2 > // Storage order of the target sparse matrix
1005  friend inline auto smpAssign( SparseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
1006  -> EnableIf_t< UseSMPAssign_v<MT> >
1007  {
1009 
1010  using TmpType = If_t< SO == SO2, ResultType, OppositeType >;
1011 
1018 
1019  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1020  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1021 
1022  const TmpType tmp( rhs );
1023  smpAssign( ~lhs, tmp );
1024  }
1026  //**********************************************************************************************
1027 
1028  //**SMP addition assignment to dense matrices***************************************************
1042  template< typename MT // Type of the target dense matrix
1043  , bool SO2 > // Storage order of the target dense matrix
1044  friend inline auto smpAddAssign( DenseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
1045  -> EnableIf_t< UseAssign_v<MT> >
1046  {
1048 
1052 
1053  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1054  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1055 
1056  const ResultType tmp( rhs );
1057  smpAddAssign( ~lhs, tmp );
1058  }
1060  //**********************************************************************************************
1061 
1062  //**SMP addition assignment to sparse matrices**************************************************
1063  // No special implementation for the SMP addition assignment to sparse matrices.
1064  //**********************************************************************************************
1065 
1066  //**SMP subtraction assignment to dense matrices************************************************
1081  template< typename MT // Type of the target dense matrix
1082  , bool SO2 > // Storage order of the target dense matrix
1083  friend inline auto smpSubAssign( DenseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
1084  -> EnableIf_t< UseSMPAssign_v<MT> >
1085  {
1087 
1091 
1092  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1093  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1094 
1095  const ResultType tmp( rhs );
1096  smpSubAssign( ~lhs, tmp );
1097  }
1099  //**********************************************************************************************
1100 
1101  //**SMP subtraction assignment to sparse matrices***********************************************
1102  // No special implementation for the SMP subtraction assignment to sparse matrices.
1103  //**********************************************************************************************
1104 
1105  //**SMP Schur product assignment to dense matrices**********************************************
1120  template< typename MT // Type of the target dense matrix
1121  , bool SO2 > // Storage order of the target dense matrix
1122  friend inline auto smpSchurAssign( DenseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
1123  -> EnableIf_t< UseSMPAssign_v<MT> && !IsCommutative_v<MT1,MT2> >
1124  {
1126 
1130 
1131  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1132  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1133 
1134  const ResultType tmp( rhs );
1135  smpSchurAssign( ~lhs, tmp );
1136  }
1138  //**********************************************************************************************
1139 
1140  //**SMP Schur product assignment to dense matrices**********************************************
1155  template< typename MT // Type of the target dense matrix
1156  , bool SO2 > // Storage order of the target dense matrix
1157  friend inline auto smpSchurAssign( DenseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
1158  -> EnableIf_t< UseSMPAssign_v<MT> && IsCommutative_v<MT1,MT2> >
1159  {
1161 
1162  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1163  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1164 
1165  if( !RequiresEvaluation_v<MT2> ) {
1166  smpSchurAssign( ~lhs, rhs.rhs_ );
1167  smpSchurAssign( ~lhs, rhs.lhs_ );
1168  }
1169  else {
1170  smpSchurAssign( ~lhs, rhs.lhs_ );
1171  smpSchurAssign( ~lhs, rhs.rhs_ );
1172  }
1173  }
1175  //**********************************************************************************************
1176 
1177  //**SMP Schur product assignment to sparse matrices*********************************************
1178  // No special implementation for the SMP Schur product assignment to sparse matrices.
1179  //**********************************************************************************************
1180 
1181  //**SMP multiplication assignment to dense matrices*********************************************
1182  // No special implementation for the SMP multiplication assignment to dense matrices.
1183  //**********************************************************************************************
1184 
1185  //**SMP multiplication assignment to sparse matrices********************************************
1186  // No special implementation for the SMP multiplication assignment to sparse matrices.
1187  //**********************************************************************************************
1188 
1189  //**Compile time checks*************************************************************************
1195  //**********************************************************************************************
1196 };
1197 //*************************************************************************************************
1198 
1199 
1200 
1201 
1202 //=================================================================================================
1203 //
1204 // GLOBAL BINARY ARITHMETIC OPERATORS
1205 //
1206 //=================================================================================================
1207 
1208 //*************************************************************************************************
1221 template< typename MT1 // Type of the left-hand side dense matrix
1222  , typename MT2 // Type of the right-hand side dense matrix
1223  , bool SO // Storage order
1224  , DisableIf_t< ( IsUniLower_v<MT1> && IsUniUpper_v<MT2> ) ||
1225  ( IsUniUpper_v<MT1> && IsUniLower_v<MT2> ) ||
1226  ( IsStrictlyLower_v<MT1> && IsUpper_v<MT2> ) ||
1227  ( IsStrictlyUpper_v<MT1> && IsLower_v<MT2> ) ||
1228  ( IsLower_v<MT1> && IsStrictlyUpper_v<MT2> ) ||
1229  ( IsUpper_v<MT1> && IsStrictlyLower_v<MT2> ) >* = nullptr >
1230 inline const DMatDMatSchurExpr<MT1,MT2,SO>
1231  dmatdmatschur( const DenseMatrix<MT1,SO>& lhs, const DenseMatrix<MT2,SO>& rhs )
1232 {
1234 
1235  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == (~rhs).rows() , "Invalid number of rows" );
1236  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == (~rhs).columns(), "Invalid number of columns" );
1237 
1238  return DMatDMatSchurExpr<MT1,MT2,SO>( ~lhs, ~rhs );
1239 }
1241 //*************************************************************************************************
1242 
1243 
1244 //*************************************************************************************************
1257 template< typename MT1 // Type of the left-hand side dense matrix
1258  , typename MT2 // Type of the right-hand side dense matrix
1259  , bool SO // Storage order
1260  , EnableIf_t< ( IsUniLower_v<MT1> && IsUniUpper_v<MT2> ) ||
1261  ( IsUniUpper_v<MT1> && IsUniLower_v<MT2> ) >* = nullptr >
1262 inline decltype(auto)
1263  dmatdmatschur( const DenseMatrix<MT1,SO>& lhs, const DenseMatrix<MT2,SO>& rhs )
1264 {
1266 
1267  MAYBE_UNUSED( rhs );
1268 
1269  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == (~rhs).rows() , "Invalid number of rows" );
1270  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == (~rhs).columns(), "Invalid number of columns" );
1271 
1272  using ReturnType = const SchurTrait_t< ResultType_t<MT1>, ResultType_t<MT2> >;
1273 
1276 
1277  return ReturnType( (~lhs).rows() );
1278 }
1280 //*************************************************************************************************
1281 
1282 
1283 //*************************************************************************************************
1296 template< typename MT1 // Type of the left-hand side dense matrix
1297  , typename MT2 // Type of the right-hand side dense matrix
1298  , bool SO // Storage order
1299  , EnableIf_t< ( IsStrictlyLower_v<MT1> && IsUpper_v<MT2> ) ||
1300  ( IsStrictlyUpper_v<MT1> && IsLower_v<MT2> ) ||
1301  ( IsLower_v<MT1> && IsStrictlyUpper_v<MT2> ) ||
1302  ( IsUpper_v<MT1> && IsStrictlyLower_v<MT2> ) >* = nullptr >
1303 inline decltype(auto)
1304  dmatdmatschur( const DenseMatrix<MT1,SO>& lhs, const DenseMatrix<MT2,SO>& rhs )
1305 {
1307 
1308  MAYBE_UNUSED( rhs );
1309 
1310  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == (~rhs).rows() , "Invalid number of rows" );
1311  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == (~rhs).columns(), "Invalid number of columns" );
1312 
1313  using ReturnType = const SchurTrait_t< ResultType_t<MT1>, ResultType_t<MT2> >;
1314 
1316  BLAZE_CONSTRAINT_MUST_BE_ZERO_TYPE( ReturnType );
1317 
1318  return ReturnType( (~lhs).rows(), (~lhs).columns() );
1319 }
1321 //*************************************************************************************************
1322 
1323 
1324 //*************************************************************************************************
1349 template< typename MT1 // Type of the left-hand side dense matrix
1350  , typename MT2 // Type of the right-hand side dense matrix
1351  , bool SO > // Storage order
1352 inline decltype(auto)
1353  operator%( const DenseMatrix<MT1,SO>& lhs, const DenseMatrix<MT2,SO>& rhs )
1354 {
1356 
1357  if( (~lhs).rows() != (~rhs).rows() || (~lhs).columns() != (~rhs).columns() ) {
1358  BLAZE_THROW_INVALID_ARGUMENT( "Matrix sizes do not match" );
1359  }
1360 
1361  return dmatdmatschur( ~lhs, ~rhs );
1362 }
1363 //*************************************************************************************************
1364 
1365 
1366 
1367 
1368 //=================================================================================================
1369 //
1370 // ISALIGNED SPECIALIZATIONS
1371 //
1372 //=================================================================================================
1373 
1374 //*************************************************************************************************
1376 template< typename MT1, typename MT2, bool SO >
1377 struct IsAligned< DMatDMatSchurExpr<MT1,MT2,SO> >
1378  : public BoolConstant< IsAligned_v<MT1> && IsAligned_v<MT2> >
1379 {};
1381 //*************************************************************************************************
1382 
1383 
1384 
1385 
1386 //=================================================================================================
1387 //
1388 // ISPADDED SPECIALIZATIONS
1389 //
1390 //=================================================================================================
1391 
1392 //*************************************************************************************************
1394 template< typename MT1, typename MT2, bool SO >
1395 struct IsPadded< DMatDMatSchurExpr<MT1,MT2,SO> >
1396  : public BoolConstant< IsPadded_v<MT1> && IsPadded_v<MT2> >
1397 {};
1399 //*************************************************************************************************
1400 
1401 } // namespace blaze
1402 
1403 #endif
Constraint on the data type.
ReturnType_t< MT1 > RN1
Return type of the left-hand side dense matrix expression.
Definition: DMatDMatSchurExpr.h:114
CompositeType_t< MT1 > CT1
Composite type of the left-hand side dense matrix expression.
Definition: DMatDMatSchurExpr.h:116
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.This macro encapsulates the default way o...
Definition: Exception.h:235
Pointer difference type of the Blaze library.
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DMatDMatSchurExpr.h:544
RightIteratorType right_
Iterator to the current right-hand side element.
Definition: DMatDMatSchurExpr.h:434
Header file for auxiliary alias declarations.
#define BLAZE_CONSTRAINT_MUST_BE_IDENTITY_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not an identity matrix type,...
Definition: Identity.h:60
Header file for the Schur product trait.
Header file for the IsUniUpper type trait.
ResultType_t< MT2 > RT2
Result type of the right-hand side dense matrix expression.
Definition: DMatDMatSchurExpr.h:113
bool isSame(const Matrix< MT1, SO1 > &a, const Matrix< MT2, SO2 > &b) noexcept
Returns whether the two given matrices represent the same observable state.
Definition: Matrix.h:992
Header file for basic type definitions.
Header file for all forward declarations for sparse vectors and matrices.
typename If< Condition, T1, T2 >::Type If_t
Auxiliary alias template for the If class template.The If_t alias template provides a convenient shor...
Definition: If.h:109
ReturnType operator *() const
Direct access to the element at the current iterator position.
Definition: DMatDMatSchurExpr.h:303
BLAZE_DEVICE_CALLABLE DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DMatDMatSchurExpr.h:390
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.The ResultType_t alias declaration provides ...
Definition: Aliases.h:390
Header file for the IsCommutative type trait.
Header file for the serial shim.
#define BLAZE_CONSTRAINT_MUST_BE_MATRIX_WITH_STORAGE_ORDER(T, SO)
Constraint on the data type.In case the given data type T is not a dense or sparse matrix type and in...
Definition: StorageOrder.h:63
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DMatDMatSchurExpr.h:414
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatDMatSchurExpr.h:475
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional matrix type,...
Definition: DenseMatrix.h:61
decltype(std::declval< RN1 >() *std::declval< RN2 >()) ExprReturnType
Expression return type for the subscript operator.
Definition: DMatDMatSchurExpr.h:132
Constraint on the data type.
BLAZE_DEVICE_CALLABLE bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DMatDMatSchurExpr.h:324
BLAZE_DEVICE_CALLABLE const ConstIterator operator++(int)
Post-increment operator.
Definition: DMatDMatSchurExpr.h:271
Header file for the MAYBE_UNUSED function template.
Header file for the Computation base class.
static constexpr bool returnExpr
Compilation switch for the selection of the subscript operator return type.
Definition: DMatDMatSchurExpr.h:129
Header file for the RequiresEvaluation type trait.
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.The ReturnType_t alias declaration provides ...
Definition: Aliases.h:410
Header file for the IsUniLower type trait.
#define BLAZE_CONSTRAINT_MUST_FORM_VALID_SCHUREXPR(T1, T2)
Constraint on the data type.In case the given data types T1 and T2 do not form a valid Schur product,...
Definition: SchurExpr.h:103
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:514
CompositeType_t< MT2 > CT2
Composite type of the right-hand side dense matrix expression.
Definition: DMatDMatSchurExpr.h:117
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes....
Definition: DenseMatrix.h:81
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.The ElementType_t alias declaration provide...
Definition: Aliases.h:170
ElementType_t< MT1 > ET1
Element type of the left-hand side dense matrix expression.
Definition: DMatDMatSchurExpr.h:118
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DMatDMatSchurExpr.h:554
BLAZE_DEVICE_CALLABLE bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DMatDMatSchurExpr.h:335
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DMatDMatSchurExpr.h:490
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: DMatDMatSchurExpr.h:173
Constraint on the data type.
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.The EnableIf_t alias declaration provides a convenient...
Definition: EnableIf.h:138
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DMatDMatSchurExpr.h:200
const If_t< returnExpr, ExprReturnType, ElementType > ReturnType
Return type for expression template evaluations.
Definition: DMatDMatSchurExpr.h:177
Header file for the DisableIf class template.
Header file for the IsTemporary type trait class.
IteratorCategory iterator_category
The iterator category.
Definition: DMatDMatSchurExpr.h:203
Header file for the IsStrictlyUpper type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
Header file for the If class template.
ElementType * PointerType
Pointer return type.
Definition: DMatDMatSchurExpr.h:198
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition: DMatDMatSchurExpr.h:441
#define BLAZE_CONSTRAINT_MUST_BE_ZERO_TYPE(T)
Constraint on the data type.In case the given data type T is not a zero vector or matrix type,...
Definition: Zero.h:61
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
Header file for the DenseMatrix base class.
ElementType_t< ResultType > ElementType
Resulting element type.
Definition: DMatDMatSchurExpr.h:174
PointerType pointer
Pointer return type.
Definition: DMatDMatSchurExpr.h:205
Header file for all SIMD functionality.
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DMatDMatSchurExpr.h:599
Header file for the IsOperation type trait class.
Header file for the IsLower type trait.
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row i.
Definition: DMatDMatSchurExpr.h:523
Header file for the IsAligned type trait.
ReferenceType reference
Reference return type.
Definition: DMatDMatSchurExpr.h:206
If_t< useAssign, const ResultType, const DMatDMatSchurExpr & > CompositeType
Data type for composite expression templates.
Definition: DMatDMatSchurExpr.h:180
Constraints on the storage order of matrix types.
ElementType & ReferenceType
Reference return type.
Definition: DMatDMatSchurExpr.h:199
Header file for the exception macros of the math module.
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DMatDMatSchurExpr.h:402
Constraint on the data type.
ConstIterator_t< MT1 > LeftIteratorType
ConstIterator type of the left-hand side dense matrix expression.
Definition: DMatDMatSchurExpr.h:210
Expression object for dense matrix-dense matrix Schur products.The DMatDMatSchurExpr class represents...
Definition: DMatDMatSchurExpr.h:106
ConstIterator_t< MT2 > RightIteratorType
ConstIterator type of the right-hand side dense matrix expression.
Definition: DMatDMatSchurExpr.h:213
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
Header file for the IsPadded type trait.
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: DMatDMatSchurExpr.h:445
typename T::OppositeType OppositeType_t
Alias declaration for nested OppositeType type definitions.The OppositeType_t alias declaration provi...
Definition: Aliases.h:270
SchurTrait_t< RT1, RT2 > ResultType
Result type for expression template evaluations.
Definition: DMatDMatSchurExpr.h:171
ReturnType_t< MT2 > RN2
Return type of the right-hand side dense matrix expression.
Definition: DMatDMatSchurExpr.h:115
Header file for the HasSIMDMult type trait.
Base class for all Schur product expression templates.The SchurExpr class serves as a tag for all exp...
Definition: SchurExpr.h:66
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.The TransposeType_t alias declaration pro...
Definition: Aliases.h:470
Header file for run time assertion macros.
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.The CompositeType_t alias declaration pro...
Definition: Aliases.h:90
static constexpr bool useAssign
Compilation switch for the serial evaluation strategy of the Schur product expression.
Definition: DMatDMatSchurExpr.h:143
static constexpr size_t SIMDSIZE
The number of elements packed within a single SIMD element.
Definition: DMatDMatSchurExpr.h:450
BLAZE_DEVICE_CALLABLE ConstIterator & operator++()
Pre-increment operator.
Definition: DMatDMatSchurExpr.h:259
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
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DMatDMatSchurExpr.h:196
Header file for the SchurExpr base class.
typename SchurTrait< T1, T2 >::Type SchurTrait_t
Auxiliary alias declaration for the SchurTrait class template.The SchurTrait_t alias declaration prov...
Definition: SchurTrait.h:163
ValueType value_type
Type of the underlying elements.
Definition: DMatDMatSchurExpr.h:204
SIMD characteristics of data types.The SIMDTrait class template provides the SIMD characteristics of ...
Definition: SIMDTrait.h:295
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:94
LeftOperand lhs_
Left-hand side dense matrix of the Schur product expression.
Definition: DMatDMatSchurExpr.h:627
Header file for all forward declarations for expression class templates.
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DMatDMatSchurExpr.h:619
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
ElementType_t< MT2 > ET2
Element type of the right-hand side dense matrix expression.
Definition: DMatDMatSchurExpr.h:119
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:808
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.In case the given data type T requires an intermediate evaluation within ...
Definition: RequiresEvaluation.h:81
ElementType ValueType
Type of the underlying elements.
Definition: DMatDMatSchurExpr.h:197
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.The BoolConstant alias template represents ...
Definition: IntegralConstant.h:110
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
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:498
friend BLAZE_DEVICE_CALLABLE const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DMatDMatSchurExpr.h:426
#define BLAZE_CONSTRAINT_MATRICES_MUST_HAVE_SAME_STORAGE_ORDER(T1, T2)
Constraint on the data type.In case either of the two given data types T1 or T2 is not a matrix type ...
Definition: StorageOrder.h:84
BLAZE_DEVICE_CALLABLE bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatDMatSchurExpr.h:368
BLAZE_DEVICE_CALLABLE bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatDMatSchurExpr.h:379
BLAZE_ALWAYS_INLINE auto load(size_t i, size_t j) const noexcept
Access to the SIMD elements of the matrix.
Definition: DMatDMatSchurExpr.h:508
If_t< IsExpression_v< MT2 >, const MT2, const MT2 & > RightOperand
Composite type of the right-hand side dense matrix expression.
Definition: DMatDMatSchurExpr.h:186
typename T::ConstIterator ConstIterator_t
Alias declaration for nested ConstIterator type definitions.The ConstIterator_t alias declaration pro...
Definition: Aliases.h:110
Macro for CUDA compatibility.
BLAZE_DEVICE_CALLABLE const ConstIterator operator--(int)
Post-decrement operator.
Definition: DMatDMatSchurExpr.h:293
BLAZE_DEVICE_CALLABLE bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatDMatSchurExpr.h:346
LeftOperand leftOperand() const noexcept
Returns the left-hand side dense matrix operand.
Definition: DMatDMatSchurExpr.h:564
Iterator over the elements of the dense matrix.
Definition: DMatDMatSchurExpr.h:192
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
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:66
ResultType_t< MT1 > RT1
Result type of the left-hand side dense matrix expression.
Definition: DMatDMatSchurExpr.h:112
Header file for the IntegralConstant class template.
If_t< IsExpression_v< MT1 >, const MT1, const MT1 & > LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: DMatDMatSchurExpr.h:183
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row i.
Definition: DMatDMatSchurExpr.h:534
auto load() const noexcept
Access to the SIMD elements of the matrix.
Definition: DMatDMatSchurExpr.h:313
OppositeType_t< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatDMatSchurExpr.h:172
RightOperand rhs_
Right-hand side dense matrix of the Schur product expression.
Definition: DMatDMatSchurExpr.h:628
#define BLAZE_DEVICE_CALLABLE
Conditional macro that sets host and device attributes when compiled with CUDA.
Definition: HostDevice.h:94
Header file for the IsUpper type trait.
typename DisableIf< Condition, T >::Type DisableIf_t
Auxiliary type for the DisableIf class template.The DisableIf_t alias declaration provides a convenie...
Definition: DisableIf.h:138
BLAZE_DEVICE_CALLABLE ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DMatDMatSchurExpr.h:234
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DMatDMatSchurExpr.h:586
BLAZE_DEVICE_CALLABLE ConstIterator & operator--()
Pre-decrement operator.
Definition: DMatDMatSchurExpr.h:281
BLAZE_DEVICE_CALLABLE ConstIterator(LeftIteratorType left, RightIteratorType right)
Constructor for the ConstIterator class.
Definition: DMatDMatSchurExpr.h:222
DMatDMatSchurExpr(const MT1 &lhs, const MT2 &rhs) noexcept
Constructor for the DMatDMatSchurExpr class.
Definition: DMatDMatSchurExpr.h:459
System settings for the inline keywords.
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression,...
Definition: Assert.h:101
BLAZE_DEVICE_CALLABLE ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DMatDMatSchurExpr.h:247
Header file for the IsExpression type trait class.
Header file for the function trace functionality.
RightOperand rightOperand() const noexcept
Returns the right-hand side dense matrix operand.
Definition: DMatDMatSchurExpr.h:574
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatDMatSchurExpr.h:609
LeftIteratorType left_
Iterator to the current left-hand side element.
Definition: DMatDMatSchurExpr.h:433
Constraint on the data type.
BLAZE_DEVICE_CALLABLE bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatDMatSchurExpr.h:357