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>
75 #include <blaze/system/Inline.h>
77 #include <blaze/util/Assert.h>
78 #include <blaze/util/DisableIf.h>
79 #include <blaze/util/EnableIf.h>
82 #include <blaze/util/mpl/If.h>
83 #include <blaze/util/Types.h>
84 #include <blaze/util/Unused.h>
85 
86 
87 namespace blaze {
88 
89 //=================================================================================================
90 //
91 // CLASS DMATDMATSCHUREXPR
92 //
93 //=================================================================================================
94 
95 //*************************************************************************************************
102 template< typename MT1 // Type of the left-hand side dense matrix
103  , typename MT2 // Type of the right-hand side dense matrix
104  , bool SO > // Storage order
106  : public SchurExpr< DenseMatrix< DMatDMatSchurExpr<MT1,MT2,SO>, SO > >
107  , private Computation
108 {
109  private:
110  //**Type definitions****************************************************************************
119  //**********************************************************************************************
120 
121  //**Return type evaluation**********************************************************************
123 
128  static constexpr bool returnExpr = ( !IsTemporary_v<RN1> && !IsTemporary_v<RN2> );
129 
131  using ExprReturnType = decltype( std::declval<RN1>() * std::declval<RN2>() );
132  //**********************************************************************************************
133 
134  //**Serial evaluation strategy******************************************************************
136 
142  static constexpr bool useAssign =
143  ( RequiresEvaluation_v<MT1> || RequiresEvaluation_v<MT2> || !returnExpr );
144 
146  template< typename MT >
148  static constexpr bool UseAssign_v = useAssign;
150  //**********************************************************************************************
151 
152  //**Parallel evaluation strategy****************************************************************
154 
160  template< typename MT >
161  static constexpr bool UseSMPAssign_v =
164  //**********************************************************************************************
165 
166  public:
167  //**Type definitions****************************************************************************
174 
177 
180 
182  using LeftOperand = If_t< IsExpression_v<MT1>, const MT1, const MT1& >;
183 
185  using RightOperand = If_t< IsExpression_v<MT2>, const MT2, const MT2& >;
186  //**********************************************************************************************
187 
188  //**ConstIterator class definition**************************************************************
192  {
193  public:
194  //**Type definitions*************************************************************************
195  using IteratorCategory = std::random_access_iterator_tag;
200 
201  // STL iterator requirements
207 
210 
213  //*******************************************************************************************
214 
215  //**Constructor******************************************************************************
221  explicit inline ConstIterator( LeftIteratorType left, RightIteratorType right )
222  : left_ ( left ) // Iterator to the current left-hand side element
223  , right_( right ) // Iterator to the current right-hand side element
224  {}
225  //*******************************************************************************************
226 
227  //**Addition assignment operator*************************************************************
233  inline ConstIterator& operator+=( size_t inc ) {
234  left_ += inc;
235  right_ += inc;
236  return *this;
237  }
238  //*******************************************************************************************
239 
240  //**Subtraction assignment operator**********************************************************
246  inline ConstIterator& operator-=( size_t dec ) {
247  left_ -= dec;
248  right_ -= dec;
249  return *this;
250  }
251  //*******************************************************************************************
252 
253  //**Prefix increment operator****************************************************************
259  ++left_;
260  ++right_;
261  return *this;
262  }
263  //*******************************************************************************************
264 
265  //**Postfix increment operator***************************************************************
270  inline const ConstIterator operator++( int ) {
271  return ConstIterator( left_++, right_++ );
272  }
273  //*******************************************************************************************
274 
275  //**Prefix decrement operator****************************************************************
281  --left_;
282  --right_;
283  return *this;
284  }
285  //*******************************************************************************************
286 
287  //**Postfix decrement operator***************************************************************
292  inline const ConstIterator operator--( int ) {
293  return ConstIterator( left_--, right_-- );
294  }
295  //*******************************************************************************************
296 
297  //**Element access operator******************************************************************
302  inline ReturnType operator*() const {
303  return (*left_) * (*right_);
304  }
305  //*******************************************************************************************
306 
307  //**Load function****************************************************************************
312  inline auto load() const noexcept {
313  return left_.load() * right_.load();
314  }
315  //*******************************************************************************************
316 
317  //**Equality operator************************************************************************
323  inline bool operator==( const ConstIterator& rhs ) const {
324  return left_ == rhs.left_;
325  }
326  //*******************************************************************************************
327 
328  //**Inequality operator**********************************************************************
334  inline bool operator!=( const ConstIterator& rhs ) const {
335  return left_ != rhs.left_;
336  }
337  //*******************************************************************************************
338 
339  //**Less-than operator***********************************************************************
345  inline bool operator<( const ConstIterator& rhs ) const {
346  return left_ < rhs.left_;
347  }
348  //*******************************************************************************************
349 
350  //**Greater-than operator********************************************************************
356  inline bool operator>( const ConstIterator& rhs ) const {
357  return left_ > rhs.left_;
358  }
359  //*******************************************************************************************
360 
361  //**Less-or-equal-than operator**************************************************************
367  inline bool operator<=( const ConstIterator& rhs ) const {
368  return left_ <= rhs.left_;
369  }
370  //*******************************************************************************************
371 
372  //**Greater-or-equal-than operator***********************************************************
378  inline bool operator>=( const ConstIterator& rhs ) const {
379  return left_ >= rhs.left_;
380  }
381  //*******************************************************************************************
382 
383  //**Subtraction operator*********************************************************************
389  inline DifferenceType operator-( const ConstIterator& rhs ) const {
390  return left_ - rhs.left_;
391  }
392  //*******************************************************************************************
393 
394  //**Addition operator************************************************************************
401  friend inline const ConstIterator operator+( const ConstIterator& it, size_t inc ) {
402  return ConstIterator( it.left_ + inc, it.right_ + inc );
403  }
404  //*******************************************************************************************
405 
406  //**Addition operator************************************************************************
413  friend inline const ConstIterator operator+( size_t inc, const ConstIterator& it ) {
414  return ConstIterator( it.left_ + inc, it.right_ + inc );
415  }
416  //*******************************************************************************************
417 
418  //**Subtraction operator*********************************************************************
425  friend inline const ConstIterator operator-( const ConstIterator& it, size_t dec ) {
426  return ConstIterator( it.left_ - dec, it.right_ - dec );
427  }
428  //*******************************************************************************************
429 
430  private:
431  //**Member variables*************************************************************************
434  //*******************************************************************************************
435  };
436  //**********************************************************************************************
437 
438  //**Compilation flags***************************************************************************
440  static constexpr bool simdEnabled =
441  ( MT1::simdEnabled && MT2::simdEnabled && HasSIMDMult_v<ET1,ET2> );
442 
444  static constexpr bool smpAssignable = ( MT1::smpAssignable && MT2::smpAssignable );
445  //**********************************************************************************************
446 
447  //**SIMD properties*****************************************************************************
449  static constexpr size_t SIMDSIZE = SIMDTrait<ElementType>::size;
450  //**********************************************************************************************
451 
452  //**Constructor*********************************************************************************
458  explicit inline DMatDMatSchurExpr( const MT1& lhs, const MT2& rhs ) noexcept
459  : lhs_( lhs ) // Left-hand side dense matrix of the Schur product expression
460  , rhs_( rhs ) // Right-hand side dense matrix of the Schur product expression
461  {
462  BLAZE_INTERNAL_ASSERT( lhs.rows() == rhs.rows() , "Invalid number of rows" );
463  BLAZE_INTERNAL_ASSERT( lhs.columns() == rhs.columns(), "Invalid number of columns" );
464  }
465  //**********************************************************************************************
466 
467  //**Access operator*****************************************************************************
474  inline ReturnType operator()( size_t i, size_t j ) const {
475  BLAZE_INTERNAL_ASSERT( i < lhs_.rows() , "Invalid row access index" );
476  BLAZE_INTERNAL_ASSERT( j < lhs_.columns(), "Invalid column access index" );
477  return lhs_(i,j) * rhs_(i,j);
478  }
479  //**********************************************************************************************
480 
481  //**At function*********************************************************************************
489  inline ReturnType at( size_t i, size_t j ) const {
490  if( i >= lhs_.rows() ) {
491  BLAZE_THROW_OUT_OF_RANGE( "Invalid row access index" );
492  }
493  if( j >= lhs_.columns() ) {
494  BLAZE_THROW_OUT_OF_RANGE( "Invalid column access index" );
495  }
496  return (*this)(i,j);
497  }
498  //**********************************************************************************************
499 
500  //**Load function*******************************************************************************
507  BLAZE_ALWAYS_INLINE auto load( size_t i, size_t j ) const noexcept {
508  BLAZE_INTERNAL_ASSERT( i < lhs_.rows() , "Invalid row access index" );
509  BLAZE_INTERNAL_ASSERT( j < lhs_.columns(), "Invalid column access index" );
510  BLAZE_INTERNAL_ASSERT( !SO || ( i % SIMDSIZE == 0UL ), "Invalid row access index" );
511  BLAZE_INTERNAL_ASSERT( SO || ( j % SIMDSIZE == 0UL ), "Invalid column access index" );
512  return lhs_.load(i,j) * rhs_.load(i,j);
513  }
514  //**********************************************************************************************
515 
516  //**Begin function******************************************************************************
522  inline ConstIterator begin( size_t i ) const {
523  return ConstIterator( lhs_.begin(i), rhs_.begin(i) );
524  }
525  //**********************************************************************************************
526 
527  //**End function********************************************************************************
533  inline ConstIterator end( size_t i ) const {
534  return ConstIterator( lhs_.end(i), rhs_.end(i) );
535  }
536  //**********************************************************************************************
537 
538  //**Rows function*******************************************************************************
543  inline size_t rows() const noexcept {
544  return lhs_.rows();
545  }
546  //**********************************************************************************************
547 
548  //**Columns function****************************************************************************
553  inline size_t columns() const noexcept {
554  return lhs_.columns();
555  }
556  //**********************************************************************************************
557 
558  //**Left operand access*************************************************************************
563  inline LeftOperand leftOperand() const noexcept {
564  return lhs_;
565  }
566  //**********************************************************************************************
567 
568  //**Right operand access************************************************************************
573  inline RightOperand rightOperand() const noexcept {
574  return rhs_;
575  }
576  //**********************************************************************************************
577 
578  //**********************************************************************************************
584  template< typename T >
585  inline bool canAlias( const T* alias ) const noexcept {
586  return ( IsExpression_v<MT1> && ( RequiresEvaluation_v<MT1> ? lhs_.isAliased( alias ) : lhs_.canAlias( alias ) ) ) ||
587  ( IsExpression_v<MT2> && ( RequiresEvaluation_v<MT2> ? rhs_.isAliased( alias ) : rhs_.canAlias( alias ) ) );
588  }
589  //**********************************************************************************************
590 
591  //**********************************************************************************************
597  template< typename T >
598  inline bool isAliased( const T* alias ) const noexcept {
599  return ( lhs_.isAliased( alias ) || rhs_.isAliased( alias ) );
600  }
601  //**********************************************************************************************
602 
603  //**********************************************************************************************
608  inline bool isAligned() const noexcept {
609  return lhs_.isAligned() && rhs_.isAligned();
610  }
611  //**********************************************************************************************
612 
613  //**********************************************************************************************
618  inline bool canSMPAssign() const noexcept {
619  return lhs_.canSMPAssign() || rhs_.canSMPAssign() ||
620  ( rows() * columns() >= SMP_DMATDMATSCHUR_THRESHOLD );
621  }
622  //**********************************************************************************************
623 
624  private:
625  //**Member variables****************************************************************************
628  //**********************************************************************************************
629 
630  //**Assignment to dense matrices****************************************************************
645  template< typename MT // Type of the target dense matrix
646  , bool SO2 > // Storage order of the target dense matrix
647  friend inline auto assign( DenseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
648  -> EnableIf_t< UseAssign_v<MT> && !IsCommutative_v<MT1,MT2> >
649  {
651 
652  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
653  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
654 
655  if( !IsOperation_v<MT1> && isSame( ~lhs, rhs.lhs_ ) ) {
656  schurAssign( ~lhs, rhs.rhs_ );
657  }
658  else {
659  CT1 A( serial( rhs.lhs_ ) );
660  CT2 B( serial( rhs.rhs_ ) );
661  assign( ~lhs, A % B );
662  }
663  }
665  //**********************************************************************************************
666 
667  //**Assignment to dense matrices****************************************************************
681  template< typename MT // Type of the target dense matrix
682  , bool SO2 > // Storage order of the target dense matrix
683  friend inline auto assign( DenseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
684  -> EnableIf_t< UseAssign_v<MT> && IsCommutative_v<MT1,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  if( !IsOperation_v<MT1> && isSame( ~lhs, rhs.lhs_ ) ) {
692  schurAssign( ~lhs, rhs.rhs_ );
693  }
694  else if( !IsOperation_v<MT2> && isSame( ~lhs, rhs.rhs_ ) ) {
695  schurAssign( ~lhs, rhs.lhs_ );
696  }
697  else if( !RequiresEvaluation_v<MT2> ) {
698  assign ( ~lhs, rhs.rhs_ );
699  schurAssign( ~lhs, rhs.lhs_ );
700  }
701  else {
702  assign ( ~lhs, rhs.lhs_ );
703  schurAssign( ~lhs, rhs.rhs_ );
704  }
705  }
707  //**********************************************************************************************
708 
709  //**Assignment to sparse matrices***************************************************************
723  template< typename MT // Type of the target sparse matrix
724  , bool SO2 > // Storage order of the target sparse matrix
725  friend inline auto assign( SparseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
726  -> EnableIf_t< UseAssign_v<MT> >
727  {
729 
730  using TmpType = If_t< SO == SO2, ResultType, OppositeType >;
731 
738 
739  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
740  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
741 
742  const TmpType tmp( serial( rhs ) );
743  assign( ~lhs, tmp );
744  }
746  //**********************************************************************************************
747 
748  //**Addition assignment to dense matrices*******************************************************
762  template< typename MT // Type of the target dense matrix
763  , bool SO2 > // Storage order of the target dense matrix
764  friend inline auto addAssign( DenseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
765  -> EnableIf_t< UseAssign_v<MT> >
766  {
768 
772 
773  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
774  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
775 
776  const ResultType tmp( serial( rhs ) );
777  addAssign( ~lhs, tmp );
778  }
780  //**********************************************************************************************
781 
782  //**Addition assignment to sparse matrices******************************************************
783  // No special implementation for the addition assignment to sparse matrices.
784  //**********************************************************************************************
785 
786  //**Subtraction assignment to dense matrices****************************************************
800  template< typename MT // Type of the target dense matrix
801  , bool SO2 > // Storage order of the target dense matrix
802  friend inline auto subAssign( DenseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
803  -> EnableIf_t< UseAssign_v<MT> >
804  {
806 
810 
811  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
812  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
813 
814  const ResultType tmp( serial( rhs ) );
815  subAssign( ~lhs, tmp );
816  }
818  //**********************************************************************************************
819 
820  //**Subtraction assignment to sparse matrices***************************************************
821  // No special implementation for the subtraction assignment to sparse matrices.
822  //**********************************************************************************************
823 
824  //**Schur product assignment to dense matrices**************************************************
839  template< typename MT // Type of the target dense matrix
840  , bool SO2 > // Storage order of the target dense matrix
841  friend inline auto schurAssign( DenseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
842  -> EnableIf_t< UseAssign_v<MT> && !IsCommutative_v<MT1,MT2> >
843  {
845 
849 
850  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
851  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
852 
853  const ResultType tmp( serial( rhs ) );
854  schurAssign( ~lhs, tmp );
855  }
857  //**********************************************************************************************
858 
859  //**Schur product assignment to dense matrices**************************************************
874  template< typename MT // Type of the target dense matrix
875  , bool SO2 > // Storage order of the target dense matrix
876  friend inline auto schurAssign( DenseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
877  -> EnableIf_t< UseAssign_v<MT> && IsCommutative_v<MT1,MT2> >
878  {
880 
881  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
882  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
883 
884  if( !RequiresEvaluation_v<MT2> ) {
885  schurAssign( ~lhs, rhs.rhs_ );
886  schurAssign( ~lhs, rhs.lhs_ );
887  }
888  else {
889  schurAssign( ~lhs, rhs.lhs_ );
890  schurAssign( ~lhs, rhs.rhs_ );
891  }
892  }
894  //**********************************************************************************************
895 
896  //**Schur product assignment to sparse matrices*************************************************
897  // No special implementation for the Schur product assignment to sparse matrices.
898  //**********************************************************************************************
899 
900  //**Multiplication assignment to dense matrices*************************************************
901  // No special implementation for the multiplication assignment to dense matrices.
902  //**********************************************************************************************
903 
904  //**Multiplication assignment to sparse matrices************************************************
905  // No special implementation for the multiplication assignment to sparse matrices.
906  //**********************************************************************************************
907 
908  //**SMP assignment to dense matrices************************************************************
923  template< typename MT // Type of the target dense matrix
924  , bool SO2 > // Storage order of the target dense matrix
925  friend inline auto smpAssign( DenseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
926  -> EnableIf_t< UseSMPAssign_v<MT> && !IsCommutative_v<MT1,MT2> >
927  {
929 
930  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
931  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
932 
933  if( !IsOperation_v<MT1> && isSame( ~lhs, rhs.lhs_ ) ) {
934  smpSchurAssign( ~lhs, rhs.rhs_ );
935  }
936  else {
937  CT1 A( rhs.lhs_ );
938  CT2 B( rhs.rhs_ );
939  smpAssign( ~lhs, A % B );
940  }
941  }
943  //**********************************************************************************************
944 
945  //**SMP assignment to dense matrices************************************************************
960  template< typename MT // Type of the target dense matrix
961  , bool SO2 > // Storage order of the target dense matrix
962  friend inline auto smpAssign( DenseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
963  -> EnableIf_t< UseSMPAssign_v<MT> && IsCommutative_v<MT1,MT2> >
964  {
966 
967  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
968  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
969 
970  if( !IsOperation_v<MT1> && isSame( ~lhs, rhs.lhs_ ) ) {
971  smpSchurAssign( ~lhs, rhs.rhs_ );
972  }
973  else if( !IsOperation_v<MT2> && isSame( ~lhs, rhs.rhs_ ) ) {
974  smpSchurAssign( ~lhs, rhs.lhs_ );
975  }
976  else if( !RequiresEvaluation_v<MT2> ) {
977  smpAssign ( ~lhs, rhs.rhs_ );
978  smpSchurAssign( ~lhs, rhs.lhs_ );
979  }
980  else {
981  smpAssign ( ~lhs, rhs.lhs_ );
982  smpSchurAssign( ~lhs, rhs.rhs_ );
983  }
984  }
986  //**********************************************************************************************
987 
988  //**SMP assignment to sparse matrices***********************************************************
1002  template< typename MT // Type of the target sparse matrix
1003  , bool SO2 > // Storage order of the target sparse matrix
1004  friend inline auto smpAssign( SparseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
1005  -> EnableIf_t< UseSMPAssign_v<MT> >
1006  {
1008 
1009  using TmpType = If_t< SO == SO2, ResultType, OppositeType >;
1010 
1017 
1018  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1019  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1020 
1021  const TmpType tmp( rhs );
1022  smpAssign( ~lhs, tmp );
1023  }
1025  //**********************************************************************************************
1026 
1027  //**SMP addition assignment to dense matrices***************************************************
1041  template< typename MT // Type of the target dense matrix
1042  , bool SO2 > // Storage order of the target dense matrix
1043  friend inline auto smpAddAssign( DenseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
1044  -> EnableIf_t< UseAssign_v<MT> >
1045  {
1047 
1051 
1052  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1053  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1054 
1055  const ResultType tmp( rhs );
1056  smpAddAssign( ~lhs, tmp );
1057  }
1059  //**********************************************************************************************
1060 
1061  //**SMP addition assignment to sparse matrices**************************************************
1062  // No special implementation for the SMP addition assignment to sparse matrices.
1063  //**********************************************************************************************
1064 
1065  //**SMP subtraction assignment to dense matrices************************************************
1080  template< typename MT // Type of the target dense matrix
1081  , bool SO2 > // Storage order of the target dense matrix
1082  friend inline auto smpSubAssign( DenseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
1083  -> EnableIf_t< UseSMPAssign_v<MT> >
1084  {
1086 
1090 
1091  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1092  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1093 
1094  const ResultType tmp( rhs );
1095  smpSubAssign( ~lhs, tmp );
1096  }
1098  //**********************************************************************************************
1099 
1100  //**SMP subtraction assignment to sparse matrices***********************************************
1101  // No special implementation for the SMP subtraction assignment to sparse matrices.
1102  //**********************************************************************************************
1103 
1104  //**SMP Schur product assignment to dense matrices**********************************************
1119  template< typename MT // Type of the target dense matrix
1120  , bool SO2 > // Storage order of the target dense matrix
1121  friend inline auto smpSchurAssign( DenseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
1122  -> EnableIf_t< UseSMPAssign_v<MT> && !IsCommutative_v<MT1,MT2> >
1123  {
1125 
1129 
1130  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1131  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1132 
1133  const ResultType tmp( rhs );
1134  smpSchurAssign( ~lhs, tmp );
1135  }
1137  //**********************************************************************************************
1138 
1139  //**SMP Schur product assignment to dense matrices**********************************************
1154  template< typename MT // Type of the target dense matrix
1155  , bool SO2 > // Storage order of the target dense matrix
1156  friend inline auto smpSchurAssign( DenseMatrix<MT,SO2>& lhs, const DMatDMatSchurExpr& rhs )
1157  -> EnableIf_t< UseSMPAssign_v<MT> && IsCommutative_v<MT1,MT2> >
1158  {
1160 
1161  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1162  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1163 
1164  if( !RequiresEvaluation_v<MT2> ) {
1165  smpSchurAssign( ~lhs, rhs.rhs_ );
1166  smpSchurAssign( ~lhs, rhs.lhs_ );
1167  }
1168  else {
1169  smpSchurAssign( ~lhs, rhs.lhs_ );
1170  smpSchurAssign( ~lhs, rhs.rhs_ );
1171  }
1172  }
1174  //**********************************************************************************************
1175 
1176  //**SMP Schur product assignment to sparse matrices*********************************************
1177  // No special implementation for the SMP Schur product assignment to sparse matrices.
1178  //**********************************************************************************************
1179 
1180  //**SMP multiplication assignment to dense matrices*********************************************
1181  // No special implementation for the SMP multiplication assignment to dense matrices.
1182  //**********************************************************************************************
1183 
1184  //**SMP multiplication assignment to sparse matrices********************************************
1185  // No special implementation for the SMP multiplication assignment to sparse matrices.
1186  //**********************************************************************************************
1187 
1188  //**Compile time checks*************************************************************************
1194  //**********************************************************************************************
1195 };
1196 //*************************************************************************************************
1197 
1198 
1199 
1200 
1201 //=================================================================================================
1202 //
1203 // GLOBAL BINARY ARITHMETIC OPERATORS
1204 //
1205 //=================================================================================================
1206 
1207 //*************************************************************************************************
1220 template< typename MT1 // Type of the left-hand side dense matrix
1221  , typename MT2 // Type of the right-hand side dense matrix
1222  , bool SO // Storage order
1223  , DisableIf_t< ( IsUniLower_v<MT1> && IsUniUpper_v<MT2> ) ||
1224  ( IsUniUpper_v<MT1> && IsUniLower_v<MT2> ) ||
1225  ( IsStrictlyLower_v<MT1> && IsUpper_v<MT2> ) ||
1226  ( IsStrictlyUpper_v<MT1> && IsLower_v<MT2> ) ||
1227  ( IsLower_v<MT1> && IsStrictlyUpper_v<MT2> ) ||
1228  ( IsUpper_v<MT1> && IsStrictlyLower_v<MT2> ) >* = nullptr >
1229 inline const DMatDMatSchurExpr<MT1,MT2,SO>
1230  dmatdmatschur( const DenseMatrix<MT1,SO>& lhs, const DenseMatrix<MT2,SO>& rhs )
1231 {
1233 
1234  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == (~rhs).rows() , "Invalid number of rows" );
1235  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == (~rhs).columns(), "Invalid number of columns" );
1236 
1237  return DMatDMatSchurExpr<MT1,MT2,SO>( ~lhs, ~rhs );
1238 }
1240 //*************************************************************************************************
1241 
1242 
1243 //*************************************************************************************************
1256 template< typename MT1 // Type of the left-hand side dense matrix
1257  , typename MT2 // Type of the right-hand side dense matrix
1258  , bool SO // Storage order
1259  , EnableIf_t< ( IsUniLower_v<MT1> && IsUniUpper_v<MT2> ) ||
1260  ( IsUniUpper_v<MT1> && IsUniLower_v<MT2> ) >* = nullptr >
1261 inline decltype(auto)
1262  dmatdmatschur( const DenseMatrix<MT1,SO>& lhs, const DenseMatrix<MT2,SO>& rhs )
1263 {
1265 
1266  UNUSED_PARAMETER( rhs );
1267 
1268  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == (~rhs).rows() , "Invalid number of rows" );
1269  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == (~rhs).columns(), "Invalid number of columns" );
1270 
1271  using ReturnType = const SchurTrait_t< ResultType_t<MT1>, ResultType_t<MT2> >;
1272 
1275 
1276  return ReturnType( (~lhs).rows() );
1277 }
1279 //*************************************************************************************************
1280 
1281 
1282 //*************************************************************************************************
1295 template< typename MT1 // Type of the left-hand side dense matrix
1296  , typename MT2 // Type of the right-hand side dense matrix
1297  , bool SO // Storage order
1298  , EnableIf_t< ( IsStrictlyLower_v<MT1> && IsUpper_v<MT2> ) ||
1299  ( IsStrictlyUpper_v<MT1> && IsLower_v<MT2> ) ||
1300  ( IsLower_v<MT1> && IsStrictlyUpper_v<MT2> ) ||
1301  ( IsUpper_v<MT1> && IsStrictlyLower_v<MT2> ) >* = nullptr >
1302 inline decltype(auto)
1303  dmatdmatschur( const DenseMatrix<MT1,SO>& lhs, const DenseMatrix<MT2,SO>& rhs )
1304 {
1306 
1307  UNUSED_PARAMETER( rhs );
1308 
1309  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == (~rhs).rows() , "Invalid number of rows" );
1310  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == (~rhs).columns(), "Invalid number of columns" );
1311 
1312  using ReturnType = const SchurTrait_t< ResultType_t<MT1>, ResultType_t<MT2> >;
1313 
1316 
1317  return ReturnType( (~lhs).rows(), (~lhs).columns() );
1318 }
1320 //*************************************************************************************************
1321 
1322 
1323 //*************************************************************************************************
1348 template< typename MT1 // Type of the left-hand side dense matrix
1349  , typename MT2 // Type of the right-hand side dense matrix
1350  , bool SO > // Storage order
1351 inline decltype(auto)
1352  operator%( const DenseMatrix<MT1,SO>& lhs, const DenseMatrix<MT2,SO>& rhs )
1353 {
1355 
1356  if( (~lhs).rows() != (~rhs).rows() || (~lhs).columns() != (~rhs).columns() ) {
1357  BLAZE_THROW_INVALID_ARGUMENT( "Matrix sizes do not match" );
1358  }
1359 
1360  return dmatdmatschur( ~lhs, ~rhs );
1361 }
1362 //*************************************************************************************************
1363 
1364 
1365 
1366 
1367 //=================================================================================================
1368 //
1369 // ISALIGNED SPECIALIZATIONS
1370 //
1371 //=================================================================================================
1372 
1373 //*************************************************************************************************
1375 template< typename MT1, typename MT2, bool SO >
1376 struct IsAligned< DMatDMatSchurExpr<MT1,MT2,SO> >
1377  : public BoolConstant< IsAligned_v<MT1> && IsAligned_v<MT2> >
1378 {};
1380 //*************************************************************************************************
1381 
1382 
1383 
1384 
1385 //=================================================================================================
1386 //
1387 // ISPADDED SPECIALIZATIONS
1388 //
1389 //=================================================================================================
1390 
1391 //*************************************************************************************************
1393 template< typename MT1, typename MT2, bool SO >
1394 struct IsPadded< DMatDMatSchurExpr<MT1,MT2,SO> >
1395  : public BoolConstant< IsPadded_v<MT1> && IsPadded_v<MT2> >
1396 {};
1398 //*************************************************************************************************
1399 
1400 } // namespace blaze
1401 
1402 #endif
Constraint on the data type.
ReturnType_t< MT1 > RN1
Return type of the left-hand side dense matrix expression.
Definition: DMatDMatSchurExpr.h:113
CompositeType_t< MT1 > CT1
Composite type of the left-hand side dense matrix expression.
Definition: DMatDMatSchurExpr.h:115
#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:543
RightIteratorType right_
Iterator to the current right-hand side element.
Definition: DMatDMatSchurExpr.h:433
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 UNUSED_PARAMETER function template.
Header file for the IsUniUpper type trait.
ResultType_t< MT2 > RT2
Result type of the right-hand side dense matrix expression.
Definition: DMatDMatSchurExpr.h:112
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.
typename If< Condition, T1, T2 >::Type If_t
Auxiliary alias declaration for the If class template.The If_t alias declaration provides a convenien...
Definition: If.h:109
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:413
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatDMatSchurExpr.h:474
#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
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatDMatSchurExpr.h:367
static constexpr bool smpAssignable
Compilation flag for SMP assignments.
Definition: CompressedMatrix.h:3113
decltype(std::declval< RN1 >() *std::declval< RN2 >()) ExprReturnType
Expression return type for the subscript operator.
Definition: DMatDMatSchurExpr.h:131
Constraint on the data type.
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:128
Header file for the RequiresEvaluation type trait.
constexpr void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
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 matrix/matrix ...
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:116
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:80
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.The ElementType_t alias declaration provide...
Definition: Aliases.h:170
Header file for all forward declarations for sparse vectors and matrices.
ElementType_t< MT1 > ET1
Element type of the left-hand side dense matrix expression.
Definition: DMatDMatSchurExpr.h:117
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DMatDMatSchurExpr.h:553
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DMatDMatSchurExpr.h:489
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: DMatDMatSchurExpr.h:172
ConstIterator & operator--()
Pre-decrement operator.
Definition: DMatDMatSchurExpr.h:280
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:199
const If_t< returnExpr, ExprReturnType, ElementType > ReturnType
Return type for expression template evaluations.
Definition: DMatDMatSchurExpr.h:176
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatDMatSchurExpr.h:356
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DMatDMatSchurExpr.h:389
Header file for the DisableIf class template.
Header file for the IsTemporary type trait class.
IteratorCategory iterator_category
The iterator category.
Definition: DMatDMatSchurExpr.h:202
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.
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DMatDMatSchurExpr.h:302
ElementType * PointerType
Pointer return type.
Definition: DMatDMatSchurExpr.h:197
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition: DMatDMatSchurExpr.h:440
#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:173
PointerType pointer
Pointer return type.
Definition: DMatDMatSchurExpr.h:204
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3086
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatDMatSchurExpr.h:345
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:598
Header file for the IsOperation type trait class.
Header file for the IsLower type trait.
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row i.
Definition: DMatDMatSchurExpr.h:522
Header file for the IsAligned type trait.
ReferenceType reference
Reference return type.
Definition: DMatDMatSchurExpr.h:205
If_t< useAssign, const ResultType, const DMatDMatSchurExpr &> CompositeType
Data type for composite expression templates.
Definition: DMatDMatSchurExpr.h:179
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatDMatSchurExpr.h:378
Constraints on the storage order of matrix types.
ElementType & ReferenceType
Reference return type.
Definition: DMatDMatSchurExpr.h:198
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:401
Constraint on the data type.
ConstIterator_t< MT1 > LeftIteratorType
ConstIterator type of the left-hand side dense matrix expression.
Definition: DMatDMatSchurExpr.h:209
Expression object for dense matrix-dense matrix Schur products.The DMatDMatSchurExpr class represents...
Definition: DMatDMatSchurExpr.h:105
Header file for all forward declarations for expression class templates.
ConstIterator_t< MT2 > RightIteratorType
ConstIterator type of the right-hand side dense matrix expression.
Definition: DMatDMatSchurExpr.h:212
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:444
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:170
ReturnType_t< MT2 > RN2
Return type of the right-hand side dense matrix expression.
Definition: DMatDMatSchurExpr.h:114
ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DMatDMatSchurExpr.h:233
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.
const ConstIterator operator--(int)
Post-decrement operator.
Definition: DMatDMatSchurExpr.h:292
ConstIterator & operator++()
Pre-increment operator.
Definition: DMatDMatSchurExpr.h:258
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:142
static constexpr size_t SIMDSIZE
The number of elements packed within a single SIMD element.
Definition: DMatDMatSchurExpr.h:449
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
const ConstIterator operator++(int)
Post-increment operator.
Definition: DMatDMatSchurExpr.h:270
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DMatDMatSchurExpr.h:195
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:164
ValueType value_type
Type of the underlying elements.
Definition: DMatDMatSchurExpr.h:203
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:626
ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DMatDMatSchurExpr.h:246
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DMatDMatSchurExpr.h:618
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:118
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:196
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.The BoolConstant class template represents ...
Definition: IntegralConstant.h:101
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
#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_ALWAYS_INLINE auto load(size_t i, size_t j) const noexcept
Access to the SIMD elements of the matrix.
Definition: DMatDMatSchurExpr.h:507
If_t< IsExpression_v< MT2 >, const MT2, const MT2 &> RightOperand
Composite type of the right-hand side dense matrix expression.
Definition: DMatDMatSchurExpr.h:185
typename T::ConstIterator ConstIterator_t
Alias declaration for nested ConstIterator type definitions.The ConstIterator_t alias declaration pro...
Definition: Aliases.h:110
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3081
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DMatDMatSchurExpr.h:334
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DMatDMatSchurExpr.h:323
LeftOperand leftOperand() const noexcept
Returns the left-hand side dense matrix operand.
Definition: DMatDMatSchurExpr.h:563
Iterator over the elements of the dense matrix.
Definition: DMatDMatSchurExpr.h:191
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
ConstIterator(LeftIteratorType left, RightIteratorType right)
Constructor for the ConstIterator class.
Definition: DMatDMatSchurExpr.h:221
ResultType_t< MT1 > RT1
Result type of the left-hand side dense matrix expression.
Definition: DMatDMatSchurExpr.h:111
Header file for the IntegralConstant class template.
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DMatDMatSchurExpr.h:425
If_t< IsExpression_v< MT1 >, const MT1, const MT1 &> LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: DMatDMatSchurExpr.h:182
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row i.
Definition: DMatDMatSchurExpr.h:533
auto load() const noexcept
Access to the SIMD elements of the matrix.
Definition: DMatDMatSchurExpr.h:312
OppositeType_t< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatDMatSchurExpr.h:171
RightOperand rhs_
Right-hand side dense matrix of the Schur product expression.
Definition: DMatDMatSchurExpr.h:627
Header file for the IsUpper type trait.
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DMatDMatSchurExpr.h:585
DMatDMatSchurExpr(const MT1 &lhs, const MT2 &rhs) noexcept
Constructor for the DMatDMatSchurExpr class.
Definition: DMatDMatSchurExpr.h:458
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, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
Header file for the 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:573
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatDMatSchurExpr.h:608
LeftIteratorType left_
Iterator to the current left-hand side element.
Definition: DMatDMatSchurExpr.h:432
Constraint on the data type.