All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DMatTransposer.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATTRANSPOSER_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DMATTRANSPOSER_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
49 #include <blaze/util/Assert.h>
50 #include <blaze/util/EnableIf.h>
51 #include <blaze/util/Types.h>
53 
54 
55 namespace blaze {
56 
57 //=================================================================================================
58 //
59 // CLASS DMATTRANSPOSER
60 //
61 //=================================================================================================
62 
63 //*************************************************************************************************
69 template< typename MT // Type of the dense matrix
70  , bool SO > // Storage order
71 class DMatTransposer : public DenseMatrix< DMatTransposer<MT,SO>, SO >
72 {
73  private:
74  //**Type definitions****************************************************************************
76  //**********************************************************************************************
77 
78  public:
79  //**Type definitions****************************************************************************
81  typedef typename MT::TransposeType ResultType;
82  typedef typename MT::OppositeType OppositeType;
83  typedef typename MT::ResultType TransposeType;
84  typedef typename MT::ElementType ElementType;
85  typedef typename IT::Type IntrinsicType;
86  typedef typename MT::ReturnType ReturnType;
87  typedef const This& CompositeType;
88  typedef typename MT::Reference Reference;
90  typedef typename MT::Iterator Iterator;
91  typedef typename MT::ConstIterator ConstIterator;
92  //**********************************************************************************************
93 
94  //**Compilation flags***************************************************************************
96 
99  enum { vectorizable = MT::vectorizable };
100 
102 
105  enum { smpAssignable = MT::smpAssignable };
106  //**********************************************************************************************
107 
108  //**Constructor*********************************************************************************
113  explicit inline DMatTransposer( MT& dm )
114  : dm_( dm ) // The dense matrix operand
115  {}
116  //**********************************************************************************************
117 
118  //**Access operator*****************************************************************************
125  inline Reference operator()( size_t i, size_t j ) {
126  BLAZE_INTERNAL_ASSERT( i < dm_.columns(), "Invalid row access index" );
127  BLAZE_INTERNAL_ASSERT( j < dm_.rows() , "Invalid column access index" );
128  return dm_(j,i);
129  }
130  //**********************************************************************************************
131 
132  //**Access operator*****************************************************************************
139  inline ConstReference operator()( size_t i, size_t j ) const {
140  BLAZE_INTERNAL_ASSERT( i < dm_.columns(), "Invalid row access index" );
141  BLAZE_INTERNAL_ASSERT( j < dm_.rows() , "Invalid column access index" );
142  return dm_(j,i);
143  }
144  //**********************************************************************************************
145 
146  //**Low-level data access***********************************************************************
151  inline ElementType* data() {
152  return dm_.data();
153  }
154  //**********************************************************************************************
155 
156  //**Begin function******************************************************************************
167  inline Iterator begin( size_t i ) {
168  return dm_.begin( i );
169  }
170  //**********************************************************************************************
171 
172  //**Begin function******************************************************************************
183  inline ConstIterator begin( size_t i ) const {
184  return dm_.cbegin( i );
185  }
186  //**********************************************************************************************
187 
188  //**Cbegin function*****************************************************************************
199  inline ConstIterator cbegin( size_t i ) const {
200  return dm_.cbegin( i );
201  }
202  //**********************************************************************************************
203 
204  //**End function********************************************************************************
215  inline Iterator end( size_t i ) {
216  return dm_.end( i );
217  }
218  //**********************************************************************************************
219 
220  //**End function********************************************************************************
231  inline ConstIterator end( size_t i ) const {
232  return dm_.cend( i );
233  }
234  //**********************************************************************************************
235 
236  //**Cend function*******************************************************************************
247  inline ConstIterator cend( size_t i ) const {
248  return dm_.cend( i );
249  }
250  //**********************************************************************************************
251 
252  //**Multiplication assignment operator**********************************************************
259  template< typename Other > // Data type of the right-hand side scalar
260  inline typename EnableIf< IsNumeric<Other>, DMatTransposer >::Type& operator*=( Other rhs )
261  {
262  (~dm_) *= rhs;
263  return *this;
264  }
265  //**********************************************************************************************
266 
267  //**Division assignment operator****************************************************************
276  template< typename Other > // Data type of the right-hand side scalar
277  inline typename EnableIf< IsNumeric<Other>, DMatTransposer >::Type& operator/=( Other rhs )
278  {
279  BLAZE_USER_ASSERT( rhs != Other(0), "Division by zero detected" );
280 
281  (~dm_) /= rhs;
282  return *this;
283  }
284  //**********************************************************************************************
285 
286  //**Rows function*******************************************************************************
291  inline size_t rows() const {
292  return dm_.columns();
293  }
294  //**********************************************************************************************
295 
296  //**Columns function****************************************************************************
301  inline size_t columns() const {
302  return dm_.rows();
303  }
304  //**********************************************************************************************
305 
306  //**Spacing function****************************************************************************
311  inline size_t spacing() const {
312  return dm_.spacing();
313  }
314  //**********************************************************************************************
315 
316  //**Reset function******************************************************************************
321  inline void reset() {
322  return dm_.reset();
323  }
324  //**********************************************************************************************
325 
326  //**CanAliased function*************************************************************************
332  template< typename Other > // Data type of the foreign expression
333  inline bool canAlias( const Other* alias ) const
334  {
335  return dm_.canAlias( alias );
336  }
337  //**********************************************************************************************
338 
339  //**IsAliased function**************************************************************************
345  template< typename Other > // Data type of the foreign expression
346  inline bool isAliased( const Other* alias ) const
347  {
348  return dm_.isAliased( alias );
349  }
350  //**********************************************************************************************
351 
352  //**IsAligned function**************************************************************************
357  inline bool isAligned() const
358  {
359  return dm_.isAligned();
360  }
361  //**********************************************************************************************
362 
363  //**CanSMPAssign function***********************************************************************
368  inline bool canSMPAssign() const
369  {
370  return dm_.canSMPAssign();
371  }
372  //**********************************************************************************************
373 
374  //**Load function*******************************************************************************
385  inline IntrinsicType load( size_t i, size_t j ) const
386  {
387  return dm_.load( j, i );
388  }
389  //**********************************************************************************************
390 
391  //**Loadu function******************************************************************************
402  inline IntrinsicType loadu( size_t i, size_t j ) const
403  {
404  return dm_.loadu( j, i );
405  }
406  //**********************************************************************************************
407 
408  //**Store function******************************************************************************
420  inline void store( size_t i, size_t j, const IntrinsicType& value )
421  {
422  dm_.store( j, i, value );
423  }
424  //**********************************************************************************************
425 
426  //**Storeu function*****************************************************************************
438  inline void storeu( size_t i, size_t j, const IntrinsicType& value )
439  {
440  dm_.storeu( j, i, value );
441  }
442  //**********************************************************************************************
443 
444  //**Stream function*****************************************************************************
456  inline void stream( size_t i, size_t j, const IntrinsicType& value )
457  {
458  dm_.stream( j, i, value );
459  }
460  //**********************************************************************************************
461 
462  //**Transpose assignment of row-major dense matrices********************************************
473  template< typename MT2 > // Type of the right-hand side dense matrix
474  inline void assign( const DenseMatrix<MT2,SO>& rhs )
475  {
477 
478  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
479  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
480 
481  const size_t m( rows() );
482  const size_t n( columns() );
483 
484  BLAZE_INTERNAL_ASSERT( ( n - ( n % 2UL ) ) == ( n & size_t(-2) ), "Invalid end calculation" );
485  const size_t jend( n & size_t(-2) );
486 
487  for( size_t i=0UL; i<m; ++i ) {
488  for( size_t j=0UL; j<jend; j+=2UL ) {
489  dm_(j ,i) = (~rhs)(i,j );
490  dm_(j+1UL,i) = (~rhs)(i,j+1UL);
491  }
492  if( jend < n ) {
493  dm_(jend,i) = (~rhs)(i,jend);
494  }
495  }
496  }
497  //**********************************************************************************************
498 
499  //**Transpose assignment of column-major dense matrices*****************************************
510  template< typename MT2 > // Type of the right-hand side dense matrix
511  inline void assign( const DenseMatrix<MT2,!SO>& rhs )
512  {
514 
515  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
516  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
517 
518  const size_t m( rows() );
519  const size_t n( columns() );
520  const size_t block( 16UL );
521 
522  for( size_t ii=0UL; ii<m; ii+=block ) {
523  const size_t iend( ( m < ii+block )?( m ):( ii+block ) );
524  for( size_t jj=0UL; jj<n; jj+=block ) {
525  const size_t jend( ( n < jj+block )?( n ):( jj+block ) );
526  for( size_t i=ii; i<iend; ++i ) {
527  for( size_t j=jj; j<jend; ++j ) {
528  dm_(j,i) = (~rhs)(i,j);
529  }
530  }
531  }
532  }
533  }
534  //**********************************************************************************************
535 
536  //**Transpose assignment of row-major sparse matrices*******************************************
547  template< typename MT2 > // Type of the right-hand side sparse matrix
548  inline void assign( const SparseMatrix<MT2,SO>& rhs )
549  {
551 
552  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
553  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
554 
555  typedef typename MT2::ConstIterator RhsConstIterator;
556 
557  for( size_t i=0UL; i<(~rhs).rows(); ++i )
558  for( RhsConstIterator element=(~rhs).begin(i); element!=(~rhs).end(i); ++element )
559  dm_(element->index(),i) = element->value();
560  }
561  //**********************************************************************************************
562 
563  //**Transpose assignment of column-major sparse matrices****************************************
574  template< typename MT2 > // Type of the right-hand side sparse matrix
575  inline void assign( const SparseMatrix<MT2,!SO>& rhs )
576  {
578 
579  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
580  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
581 
582  typedef typename MT2::ConstIterator RhsConstIterator;
583 
584  for( size_t j=0UL; j<(~rhs).columns(); ++j )
585  for( RhsConstIterator element=(~rhs).begin(j); element!=(~rhs).end(j); ++element )
586  dm_(j,element->index()) = element->value();
587  }
588  //**********************************************************************************************
589 
590  //**Transpose addition assignment of row-major dense matrices***********************************
601  template< typename MT2 > // Type of the right-hand side dense matrix
602  inline void addAssign( const DenseMatrix<MT2,SO>& rhs )
603  {
605 
606  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
607  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
608 
609  const size_t m( rows() );
610  const size_t n( columns() );
611 
612  BLAZE_INTERNAL_ASSERT( ( n - ( n % 2UL ) ) == ( n & size_t(-2) ), "Invalid end calculation" );
613  const size_t jend( n & size_t(-2) );
614 
615  for( size_t i=0UL; i<m; ++i ) {
616  for( size_t j=0UL; j<jend; j+=2UL ) {
617  dm_(j ,i) += (~rhs)(i,j );
618  dm_(j+1UL,i) += (~rhs)(i,j+1UL);
619 
620  }
621  if( jend < n ) {
622  dm_(jend,i) += (~rhs)(i,jend);
623  }
624  }
625  }
626  //**********************************************************************************************
627 
628  //**Transpose addition assignment of column-major dense matrices********************************
639  template< typename MT2 > // Type of the right-hand side dense matrix
640  inline void addAssign( const DenseMatrix<MT2,!SO>& rhs )
641  {
643 
644  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
645  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
646 
647  const size_t m( rows() );
648  const size_t n( columns() );
649  const size_t block( 16UL );
650 
651  for( size_t ii=0UL; ii<m; ii+=block ) {
652  const size_t iend( ( m < ii+block )?( m ):( ii+block ) );
653  for( size_t jj=0UL; jj<n; jj+=block ) {
654  const size_t jend( ( n < jj+block )?( n ):( jj+block ) );
655  for( size_t i=ii; i<iend; ++i ) {
656  for( size_t j=jj; j<jend; ++j ) {
657  dm_(j,i) += (~rhs)(i,j);
658  }
659  }
660  }
661  }
662  }
663  //**********************************************************************************************
664 
665  //**Transpose addition assignment of row-major sparse matrices**********************************
676  template< typename MT2 > // Type of the right-hand side sparse matrix
677  inline void addAssign( const SparseMatrix<MT2,SO>& rhs )
678  {
680 
681  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
682  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
683 
684  typedef typename MT2::ConstIterator RhsConstIterator;
685 
686  for( size_t i=0UL; i<(~rhs).rows(); ++i )
687  for( RhsConstIterator element=(~rhs).begin(i); element!=(~rhs).end(i); ++element )
688  dm_(element->index(),i) += element->value();
689  }
690  //**********************************************************************************************
691 
692  //**Transpose addition assignment of column-major sparse matrices*******************************
703  template< typename MT2 > // Type of the right-hand side sparse matrix
704  inline void addAssign( const SparseMatrix<MT2,!SO>& rhs )
705  {
707 
708  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
709  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
710 
711  typedef typename MT2::ConstIterator RhsConstIterator;
712 
713  for( size_t j=0UL; j<(~rhs).columns(); ++j )
714  for( RhsConstIterator element=(~rhs).begin(j); element!=(~rhs).end(j); ++element )
715  dm_(j,element->index()) += element->value();
716  }
717  //**********************************************************************************************
718 
719  //**Transpose subtraction assignment of row-major dense matrices********************************
730  template< typename MT2 > // Type of the right-hand side dense matrix
731  inline void subAssign( const DenseMatrix<MT2,SO>& rhs )
732  {
734 
735  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
736  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
737 
738  const size_t m( rows() );
739  const size_t n( columns() );
740 
741  BLAZE_INTERNAL_ASSERT( ( n - ( n % 2UL ) ) == ( n & size_t(-2) ), "Invalid end calculation" );
742  const size_t jend( n & size_t(-2) );
743 
744  for( size_t i=0UL; i<m; ++i ) {
745  for( size_t j=0UL; j<jend; j+=2UL ) {
746  dm_(j ,i) -= (~rhs)(i,j );
747  dm_(j+1UL,i) -= (~rhs)(i,j+1UL);
748 
749  }
750  if( jend < n ) {
751  dm_(jend,i) -= (~rhs)(i,jend);
752  }
753  }
754  }
755  //**********************************************************************************************
756 
757  //**Transpose subtraction assignment of column-major dense matrices*****************************
768  template< typename MT2 > // Type of the right-hand side dense matrix
769  inline void subAssign( const DenseMatrix<MT2,!SO>& rhs )
770  {
772 
773  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
774  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
775 
776  const size_t m( rows() );
777  const size_t n( columns() );
778  const size_t block( 16UL );
779 
780  for( size_t ii=0UL; ii<m; ii+=block ) {
781  const size_t iend( ( m < ii+block )?( m ):( ii+block ) );
782  for( size_t jj=0UL; jj<n; jj+=block ) {
783  const size_t jend( ( n < jj+block )?( n ):( jj+block ) );
784  for( size_t i=ii; i<iend; ++i ) {
785  for( size_t j=jj; j<jend; ++j ) {
786  dm_(j,i) -= (~rhs)(i,j);
787  }
788  }
789  }
790  }
791  }
792  //**********************************************************************************************
793 
794  //**Transpose subtraction assignment of row-major sparse matrices*******************************
805  template< typename MT2 > // Type of the right-hand side sparse matrix
806  inline void subAssign( const SparseMatrix<MT2,SO>& rhs )
807  {
809 
810  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
811  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
812 
813  typedef typename MT2::ConstIterator RhsConstIterator;
814 
815  for( size_t i=0UL; i<(~rhs).rows(); ++i )
816  for( RhsConstIterator element=(~rhs).begin(i); element!=(~rhs).end(i); ++element )
817  dm_(element->index(),i) -= element->value();
818  }
819  //**********************************************************************************************
820 
821  //**Transpose subtraction assignment of column-major dense matrices*****************************
832  template< typename MT2 > // Type of the right-hand side sparse matrix
833  inline void subAssign( const SparseMatrix<MT2,!SO>& rhs )
834  {
836 
837  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
838  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
839 
840  typedef typename MT2::ConstIterator RhsConstIterator;
841 
842  for( size_t j=0UL; j<(~rhs).columns(); ++j )
843  for( RhsConstIterator element=(~rhs).begin(j); element!=(~rhs).end(j); ++element )
844  dm_(j,element->index()) -= element->value();
845  }
846  //**********************************************************************************************
847 
848  //**Transpose multiplication assignment of dense matrices***************************************
849  // No special implementation for the transpose multiplication assignment of dense matrices.
850  //**********************************************************************************************
851 
852  //**Transpose multiplication assignment of sparse matrices**************************************
853  // No special implementation for the transpose multiplication assignment of sparse matrices.
854  //**********************************************************************************************
855 
856  private:
857  //**Member variables****************************************************************************
858  MT& dm_;
859  //**********************************************************************************************
860 
861  //**Compile time checks*************************************************************************
867  //**********************************************************************************************
868 };
869 //*************************************************************************************************
870 
871 
872 
873 
874 //=================================================================================================
875 //
876 // CLASS TEMPLATE SPECIALIZATION FOR ROW-MAJOR MATRICES
877 //
878 //=================================================================================================
879 
880 //*************************************************************************************************
888 template< typename MT > // Type of the dense matrix
889 class DMatTransposer<MT,true> : public DenseMatrix< DMatTransposer<MT,true>, true >
890 {
891  private:
892  //**Type definitions****************************************************************************
894  //**********************************************************************************************
895 
896  public:
897  //**Type definitions****************************************************************************
898  typedef DMatTransposer<MT,true> This;
899  typedef typename MT::TransposeType ResultType;
900  typedef typename MT::OppositeType OppositeType;
901  typedef typename MT::ResultType TransposeType;
902  typedef typename MT::ElementType ElementType;
903  typedef typename IT::Type IntrinsicType;
904  typedef typename MT::ReturnType ReturnType;
905  typedef const This& CompositeType;
906  typedef typename MT::Reference Reference;
907  typedef typename MT::ConstReference ConstReference;
908  typedef typename MT::Iterator Iterator;
909  typedef typename MT::ConstIterator ConstIterator;
910  //**********************************************************************************************
911 
912  //**Compilation flags***************************************************************************
914 
917  enum { vectorizable = MT::vectorizable };
918 
920 
923  enum { smpAssignable = MT::smpAssignable };
924  //**********************************************************************************************
925 
926  //**Constructor*********************************************************************************
931  explicit inline DMatTransposer( MT& dm )
932  : dm_( dm ) // The dense matrix operand
933  {}
934  //**********************************************************************************************
935 
936  //**Access operator*****************************************************************************
943  inline Reference operator()( size_t i, size_t j ) {
944  BLAZE_INTERNAL_ASSERT( i < dm_.columns(), "Invalid row access index" );
945  BLAZE_INTERNAL_ASSERT( j < dm_.rows() , "Invalid column access index" );
946  return dm_(j,i);
947  }
948  //**********************************************************************************************
949 
950  //**Access operator*****************************************************************************
957  inline ConstReference operator()( size_t i, size_t j ) const {
958  BLAZE_INTERNAL_ASSERT( i < dm_.columns(), "Invalid row access index" );
959  BLAZE_INTERNAL_ASSERT( j < dm_.rows() , "Invalid column access index" );
960  return dm_(j,i);
961  }
962  //**********************************************************************************************
963 
964  //**Low-level data access***********************************************************************
969  inline ElementType* data() {
970  return dm_.data();
971  }
972  //**********************************************************************************************
973 
974  //**Begin function******************************************************************************
980  inline Iterator begin( size_t j ) {
981  return dm_.begin(j);
982  }
983  //**********************************************************************************************
984 
985  //**Begin function******************************************************************************
991  inline ConstIterator begin( size_t j ) const {
992  return dm_.cbegin(j);
993  }
994  //**********************************************************************************************
995 
996  //**Cbegin function*****************************************************************************
1002  inline ConstIterator cbegin( size_t j ) const {
1003  return dm_.cbegin(j);
1004  }
1005  //**********************************************************************************************
1006 
1007  //**End function********************************************************************************
1013  inline Iterator end( size_t j ) {
1014  return dm_.end(j);
1015  }
1016  //**********************************************************************************************
1017 
1018  //**End function********************************************************************************
1024  inline ConstIterator end( size_t j ) const {
1025  return dm_.cend(j);
1026  }
1027  //**********************************************************************************************
1028 
1029  //**Cend function*******************************************************************************
1035  inline ConstIterator cend( size_t j ) const {
1036  return dm_.cend(j);
1037  }
1038  //**********************************************************************************************
1039 
1040  //**Multiplication assignment operator**********************************************************
1047  template< typename Other > // Data type of the right-hand side scalar
1048  inline typename EnableIf< IsNumeric<Other>, DMatTransposer >::Type& operator*=( Other rhs )
1049  {
1050  (~dm_) *= rhs;
1051  return *this;
1052  }
1053  //**********************************************************************************************
1054 
1055  //**Division assignment operator****************************************************************
1064  template< typename Other > // Data type of the right-hand side scalar
1065  inline typename EnableIf< IsNumeric<Other>, DMatTransposer >::Type& operator/=( Other rhs )
1066  {
1067  BLAZE_USER_ASSERT( rhs != Other(0), "Division by zero detected" );
1068 
1069  (~dm_) /= rhs;
1070  return *this;
1071  }
1072  //**********************************************************************************************
1073 
1074  //**Rows function*******************************************************************************
1079  inline size_t rows() const {
1080  return dm_.columns();
1081  }
1082  //**********************************************************************************************
1083 
1084  //**Columns function****************************************************************************
1089  inline size_t columns() const {
1090  return dm_.rows();
1091  }
1092  //**********************************************************************************************
1093 
1094  //**Spacing function****************************************************************************
1099  inline size_t spacing() const {
1100  return dm_.spacing();
1101  }
1102  //**********************************************************************************************
1103 
1104  //**Reset function******************************************************************************
1109  inline void reset() {
1110  return dm_.reset();
1111  }
1112  //**********************************************************************************************
1113 
1114  //**CanAliased function*************************************************************************
1120  template< typename Other > // Data type of the foreign expression
1121  inline bool canAlias( const Other* alias ) const
1122  {
1123  return dm_.canAlias( alias );
1124  }
1125  //**********************************************************************************************
1126 
1127  //**IsAliased function**************************************************************************
1133  template< typename Other > // Data type of the foreign expression
1134  inline bool isAliased( const Other* alias ) const
1135  {
1136  return dm_.isAliased( alias );
1137  }
1138  //**********************************************************************************************
1139 
1140  //**IsAligned function**************************************************************************
1145  inline bool isAligned() const
1146  {
1147  return dm_.isAligned();
1148  }
1149  //**********************************************************************************************
1150 
1151  //**CanSMPAssign function***********************************************************************
1156  inline bool canSMPAssign() const
1157  {
1158  return dm_.canSMPAssign();
1159  }
1160  //**********************************************************************************************
1161 
1162  //**Load function*******************************************************************************
1173  inline IntrinsicType load( size_t i, size_t j ) const
1174  {
1175  return dm_.load( j, i );
1176  }
1177  //**********************************************************************************************
1178 
1179  //**Loadu function******************************************************************************
1190  inline IntrinsicType loadu( size_t i, size_t j ) const
1191  {
1192  return dm_.loadu( j, i );
1193  }
1194  //**********************************************************************************************
1195 
1196  //**Store function******************************************************************************
1208  inline void store( size_t i, size_t j, const IntrinsicType& value )
1209  {
1210  dm_.store( j, i, value );
1211  }
1212  //**********************************************************************************************
1213 
1214  //**Storeu function*****************************************************************************
1226  inline void storeu( size_t i, size_t j, const IntrinsicType& value )
1227  {
1228  dm_.storeu( j, i, value );
1229  }
1230  //**********************************************************************************************
1231 
1232  //**Stream function*****************************************************************************
1244  inline void stream( size_t i, size_t j, const IntrinsicType& value )
1245  {
1246  dm_.stream( j, i, value );
1247  }
1248  //**********************************************************************************************
1249 
1250  //**Transpose assignment of column-major dense matrices*****************************************
1261  template< typename MT2 > // Type of the right-hand side dense matrix
1262  inline void assign( const DenseMatrix<MT2,true>& rhs )
1263  {
1265 
1266  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
1267  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
1268 
1269  const size_t m( rows() );
1270  const size_t n( columns() );
1271 
1272  BLAZE_INTERNAL_ASSERT( ( m - ( m % 2UL ) ) == ( m & size_t(-2) ), "Invalid end calculation" );
1273  const size_t iend( m & size_t(-2) );
1274 
1275  for( size_t j=0UL; j<n; ++j ) {
1276  for( size_t i=0UL; i<iend; i+=2UL ) {
1277  dm_(j,i ) = (~rhs)(i ,j);
1278  dm_(j,i+1UL) = (~rhs)(i+1UL,j);
1279  }
1280  if( iend < m ) {
1281  dm_(j,iend) = (~rhs)(iend,j);
1282  }
1283  }
1284  }
1285  //**********************************************************************************************
1286 
1287  //**Transpose assignment of row-major dense matrices********************************************
1298  template< typename MT2 > // Type of the right-hand side dense matrix
1299  inline void assign( const DenseMatrix<MT2,false>& rhs )
1300  {
1302 
1303  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
1304  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
1305 
1306  const size_t m( rows() );
1307  const size_t n( columns() );
1308  const size_t block( 16UL );
1309 
1310  for( size_t jj=0UL; jj<n; jj+=block ) {
1311  const size_t jend( ( n < jj+block )?( n ):( jj+block ) );
1312  for( size_t ii=0UL; ii<m; ii+=block ) {
1313  const size_t iend( ( m < ii+block )?( m ):( ii+block ) );
1314  for( size_t j=jj; j<jend; ++j ) {
1315  for( size_t i=ii; i<iend; ++i ) {
1316  dm_(j,i) = (~rhs)(i,j);
1317  }
1318  }
1319  }
1320  }
1321  }
1322  //**********************************************************************************************
1323 
1324  //**Transpose assignment of column-major sparse matrices****************************************
1335  template< typename MT2 > // Type of the right-hand side sparse matrix
1336  inline void assign( const SparseMatrix<MT2,true>& rhs )
1337  {
1339 
1340  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
1341  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
1342 
1343  typedef typename MT2::ConstIterator RhsConstIterator;
1344 
1345  for( size_t j=0UL; j<(~rhs).columns(); ++j )
1346  for( RhsConstIterator element=(~rhs).begin(j); element!=(~rhs).end(j); ++element )
1347  dm_(j,element->index()) = element->value();
1348  }
1349  //**********************************************************************************************
1350 
1351  //**Transpose assignment of row-major sparse matrices*******************************************
1362  template< typename MT2 > // Type of the right-hand side sparse matrix
1363  inline void assign( const SparseMatrix<MT2,false>& rhs )
1364  {
1366 
1367  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
1368  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
1369 
1370  typedef typename MT2::ConstIterator RhsConstIterator;
1371 
1372  for( size_t i=0UL; i<(~rhs).rows(); ++i )
1373  for( RhsConstIterator element=(~rhs).begin(i); element!=(~rhs).end(i); ++element )
1374  dm_(element->index(),i) = element->value();
1375  }
1376  //**********************************************************************************************
1377 
1378  //**Transpose addition assignment of column-major dense matrices********************************
1389  template< typename MT2 > // Type of the right-hand side dense matrix
1390  inline void addAssign( const DenseMatrix<MT2,true>& rhs )
1391  {
1393 
1394  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
1395  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
1396 
1397  const size_t m( rows() );
1398  const size_t n( columns() );
1399 
1400  BLAZE_INTERNAL_ASSERT( ( m - ( m % 2UL ) ) == ( m & size_t(-2) ), "Invalid end calculation" );
1401  const size_t iend( m & size_t(-2) );
1402 
1403  for( size_t j=0UL; j<n; ++j ) {
1404  for( size_t i=0UL; i<iend; i+=2UL ) {
1405  dm_(j,i ) += (~rhs)(i ,j);
1406  dm_(j,i+1UL) += (~rhs)(i+1UL,j);
1407  }
1408  if( iend < m ) {
1409  dm_(j,iend) += (~rhs)(iend,j);
1410  }
1411  }
1412  }
1413  //**********************************************************************************************
1414 
1415  //**Transpose addition assignment of row-major dense matrices***********************************
1426  template< typename MT2 > // Type of the right-hand side dense matrix
1427  inline void addAssign( const DenseMatrix<MT2,false>& rhs )
1428  {
1430 
1431  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
1432  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
1433 
1434  const size_t m( rows() );
1435  const size_t n( columns() );
1436  const size_t block( 16UL );
1437 
1438  for( size_t jj=0UL; jj<n; jj+=block ) {
1439  const size_t jend( ( n < jj+block )?( n ):( jj+block ) );
1440  for( size_t ii=0UL; ii<m; ii+=block ) {
1441  const size_t iend( ( m < ii+block )?( m ):( ii+block ) );
1442  for( size_t j=jj; j<jend; ++j ) {
1443  for( size_t i=ii; i<iend; ++i ) {
1444  dm_(j,i) += (~rhs)(i,j);
1445  }
1446  }
1447  }
1448  }
1449  }
1450  //**********************************************************************************************
1451 
1452  //**Transpose addition assignment of column-major sparse matrices*******************************
1463  template< typename MT2 > // Type of the right-hand side sparse matrix
1464  inline void addAssign( const SparseMatrix<MT2,true>& rhs )
1465  {
1467 
1468  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
1469  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
1470 
1471  typedef typename MT2::ConstIterator RhsConstIterator;
1472 
1473  for( size_t j=0UL; j<(~rhs).columns(); ++j )
1474  for( RhsConstIterator element=(~rhs).begin(j); element!=(~rhs).end(j); ++element )
1475  dm_(j,element->index()) += element->value();
1476  }
1477  //**********************************************************************************************
1478 
1479  //**Transpose addition assignment of row-major sparse matrices**********************************
1490  template< typename MT2 > // Type of the right-hand side sparse matrix
1491  inline void addAssign( const SparseMatrix<MT2,false>& rhs )
1492  {
1494 
1495  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
1496  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
1497 
1498  typedef typename MT2::ConstIterator RhsConstIterator;
1499 
1500  for( size_t i=0UL; i<(~rhs).rows(); ++i )
1501  for( RhsConstIterator element=(~rhs).begin(i); element!=(~rhs).end(i); ++element )
1502  dm_(element->index(),i) += element->value();
1503  }
1504  //**********************************************************************************************
1505 
1506  //**Transpose subtraction assignment of column-major dense matrices*****************************
1517  template< typename MT2 > // Type of the right-hand side dense matrix
1518  inline void subAssign( const DenseMatrix<MT2,true>& rhs )
1519  {
1521 
1522  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
1523  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
1524 
1525  const size_t m( rows() );
1526  const size_t n( columns() );
1527 
1528  BLAZE_INTERNAL_ASSERT( ( m - ( m % 2UL ) ) == ( m & size_t(-2) ), "Invalid end calculation" );
1529  const size_t iend( m & size_t(-2) );
1530 
1531  for( size_t j=0UL; j<n; ++j ) {
1532  for( size_t i=0UL; i<iend; i+=2UL ) {
1533  dm_(j,i ) -= (~rhs)(i ,j);
1534  dm_(j,i+1UL) -= (~rhs)(i+1UL,j);
1535  }
1536  if( iend < m ) {
1537  dm_(j,iend) -= (~rhs)(iend,j);
1538  }
1539  }
1540  }
1541  //**********************************************************************************************
1542 
1543  //**Transpose subtraction assignment of row-major dense matrices********************************
1554  template< typename MT2 > // Type of the right-hand side dense matrix
1555  inline void subAssign( const DenseMatrix<MT2,false>& rhs )
1556  {
1558 
1559  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
1560  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
1561 
1562  const size_t m( rows() );
1563  const size_t n( columns() );
1564  const size_t block( 16UL );
1565 
1566  for( size_t jj=0UL; jj<n; jj+=block ) {
1567  const size_t jend( ( n < jj+block )?( n ):( jj+block ) );
1568  for( size_t ii=0UL; ii<m; ii+=block ) {
1569  const size_t iend( ( m < ii+block )?( m ):( ii+block ) );
1570  for( size_t j=jj; j<jend; ++j ) {
1571  for( size_t i=ii; i<iend; ++i ) {
1572  dm_(j,i) -= (~rhs)(i,j);
1573  }
1574  }
1575  }
1576  }
1577  }
1578  //**********************************************************************************************
1579 
1580  //**Transpose subtraction assignment of column-major sparse matrices****************************
1591  template< typename MT2 > // Type of the right-hand side sparse matrix
1592  inline void subAssign( const SparseMatrix<MT2,true>& rhs )
1593  {
1595 
1596  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
1597  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
1598 
1599  typedef typename MT2::ConstIterator RhsConstIterator;
1600 
1601  for( size_t j=0UL; j<(~rhs).columns(); ++j )
1602  for( RhsConstIterator element=(~rhs).begin(j); element!=(~rhs).end(j); ++element )
1603  dm_(j,element->index()) -= element->value();
1604  }
1605  //**********************************************************************************************
1606 
1607  //**Transpose subtraction assignment of row-major dense matrices********************************
1618  template< typename MT2 > // Type of the right-hand side sparse matrix
1619  inline void subAssign( const SparseMatrix<MT2,false>& rhs )
1620  {
1622 
1623  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
1624  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
1625 
1626  typedef typename MT2::ConstIterator RhsConstIterator;
1627 
1628  for( size_t i=0UL; i<(~rhs).rows(); ++i )
1629  for( RhsConstIterator element=(~rhs).begin(i); element!=(~rhs).end(i); ++element )
1630  dm_(element->index(),i) -= element->value();
1631  }
1632  //**********************************************************************************************
1633 
1634  //**Transpose multiplication assignment of dense matrices***************************************
1635  // No special implementation for the transpose multiplication assignment of dense matrices.
1636  //**********************************************************************************************
1637 
1638  //**Transpose multiplication assignment of sparse matrices**************************************
1639  // No special implementation for the transpose multiplication assignment of sparse matrices.
1640  //**********************************************************************************************
1641 
1642  private:
1643  //**Member variables****************************************************************************
1644  MT& dm_;
1645  //**********************************************************************************************
1646 
1647  //**Compile time checks*************************************************************************
1653  //**********************************************************************************************
1654 };
1656 //*************************************************************************************************
1657 
1658 
1659 
1660 
1661 //=================================================================================================
1662 //
1663 // GLOBAL OPERATORS
1664 //
1665 //=================================================================================================
1666 
1667 //*************************************************************************************************
1675 template< typename MT // Type of the dense matrix
1676  , bool SO > // Storage order
1677 inline void reset( DMatTransposer<MT,SO>& m )
1678 {
1679  m.reset();
1680 }
1682 //*************************************************************************************************
1683 
1684 
1685 
1686 
1687 //=================================================================================================
1688 //
1689 // SUBMATRIXTRAIT SPECIALIZATIONS
1690 //
1691 //=================================================================================================
1692 
1693 //*************************************************************************************************
1695 template< typename MT, bool SO >
1696 struct SubmatrixTrait< DMatTransposer<MT,SO> >
1697 {
1698  typedef typename SubmatrixTrait< typename DMatTransposer<MT,SO>::ResultType >::Type Type;
1699 };
1701 //*************************************************************************************************
1702 
1703 } // namespace blaze
1704 
1705 #endif
ConstReference operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatTransposer.h:139
Constraint on the data type.
void addAssign(const SparseMatrix< MT2, SO > &rhs)
Implementation of the transpose addition assignment of a row-major sparse matrix. ...
Definition: DMatTransposer.h:677
bool canSMPAssign() const
Returns whether the matrix can be used in SMP assignments.
Definition: DMatTransposer.h:368
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_USER_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERT flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:117
DMatTransposer< MT, SO > This
Type of this DMatTransposer instance.
Definition: DMatTransposer.h:80
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row/column i.
Definition: DMatTransposer.h:231
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:205
void stream(size_t i, size_t j, const IntrinsicType &value)
Aligned, non-temporal store of an intrinsic element of the matrix.
Definition: DMatTransposer.h:456
EnableIf< IsNumeric< Other >, DMatTransposer >::Type & operator/=(Other rhs)
Division assignment operator for the division of a matrix by a scalar value ( ).
Definition: DMatTransposer.h:277
#define BLAZE_CONSTRAINT_MUST_NOT_BE_COMPUTATION_TYPE(T)
Constraint on the data type.In case the given data type T is a computational expression (i...
Definition: Computation.h:118
#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:79
void subAssign(const SparseMatrix< MT2,!SO > &rhs)
Implementation of the transpose subtraction assignment of a column-major sparse matrix.
Definition: DMatTransposer.h:833
size_t rows() const
Returns the current number of rows of the matrix.
Definition: DMatTransposer.h:291
void addAssign(const DenseMatrix< MT2, SO > &rhs)
Implementation of the transpose addition assignment of a row-major dense matrix.
Definition: DMatTransposer.h:602
ElementType * data()
Low-level data access to the matrix elements.
Definition: DMatTransposer.h:151
size_t columns() const
Returns the current number of columns of the matrix.
Definition: DMatTransposer.h:301
MT::ReturnType ReturnType
Return type for expression template evaluations.
Definition: DMatTransposer.h:86
CompressedMatrix< Type, false > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CompressedMatrix.h:2474
Header file for the intrinsic trait.
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:70
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:107
MT::Iterator Iterator
Iterator over non-constant elements.
Definition: DMatTransposer.h:90
const This & CompositeType
Data type for composite expression templates.
Definition: DMatTransposer.h:87
Constraint on the data type.
void subAssign(const DenseMatrix< MT2, SO > &rhs)
Implementation of the transpose subtraction assignment of a row-major dense matrix.
Definition: DMatTransposer.h:731
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a column-major dense or sparse matri...
Definition: StorageOrder.h:161
Reference operator()(size_t i, size_t j)
2D-access to the matrix elements.
Definition: DMatTransposer.h:125
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2482
bool isAliased(const Other *alias) const
Returns whether the matrix is aliased with the given address alias.
Definition: DMatTransposer.h:346
Header file for the DenseMatrix base class.
EnableIf< IsNumeric< Other >, DMatTransposer >::Type & operator*=(Other rhs)
Multiplication assignment operator for the multiplication between a matrix and a scalar value ( )...
Definition: DMatTransposer.h:260
Expression object for the transposition of a dense matrix.The DMatTransposer class is a wrapper objec...
Definition: DMatTransposer.h:71
MT & dm_
The dense matrix operand.
Definition: DMatTransposer.h:858
IntrinsicType loadu(size_t i, size_t j) const
Unaligned load of an intrinsic element of the matrix.
Definition: DMatTransposer.h:402
bool isAligned() const
Returns whether the matrix is properly aligned in memory.
Definition: DMatTransposer.h:357
IntrinsicType load(size_t i, size_t j) const
Aligned load of an intrinsic element of the matrix.
Definition: DMatTransposer.h:385
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2475
Constraints on the storage order of matrix types.
MT::TransposeType ResultType
Result type for expression template evaluations.
Definition: DMatTransposer.h:81
void assign(const SparseMatrix< MT2,!SO > &rhs)
Implementation of the transpose assignment of a column-major sparse matrix.
Definition: DMatTransposer.h:575
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2476
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:2480
void reset()
Resets the matrix elements.
Definition: DMatTransposer.h:321
Header file for the EnableIf class template.
void assign(const DenseMatrix< MT2,!SO > &rhs)
Implementation of the transpose assignment of a column-major dense matrix.
Definition: DMatTransposer.h:511
size_t spacing() const
Returns the spacing between the beginning of two rows.
Definition: DMatTransposer.h:311
void assign(const DenseMatrix< MT2, SO > &rhs)
Implementation of the transpose assignment of a row-major dense matrix.
Definition: DMatTransposer.h:474
Header file for the IsNumeric type trait.
IntrinsicTrait< typename MT::ElementType > IT
Intrinsic trait for the vector element type.
Definition: DMatTransposer.h:75
void subAssign(const SparseMatrix< MT2, SO > &rhs)
Implementation of the transpose subtraction assignment of a row-major sparse matrix.
Definition: DMatTransposer.h:806
#define BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a row-major dense or sparse matrix t...
Definition: StorageOrder.h:81
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2477
MT::ElementType ElementType
Type of the matrix elements.
Definition: DMatTransposer.h:84
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:749
IT::Type IntrinsicType
Intrinsic type of the matrix elements.
Definition: DMatTransposer.h:85
Header file for run time assertion macros.
void subAssign(const DenseMatrix< MT2,!SO > &rhs)
Implementation of the transpose subtraction assignment of a column-major dense matrix.
Definition: DMatTransposer.h:769
Header file for the submatrix trait.
ConstIterator cend(size_t i) const
Returns an iterator just past the last non-zero element of row/column i.
Definition: DMatTransposer.h:247
MT::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatTransposer.h:82
void addAssign(const DenseMatrix< MT2,!SO > &rhs)
Implementation of the transpose addition assignment of a column-major dense matrix.
Definition: DMatTransposer.h:640
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
ConstIterator cbegin(size_t i) const
Returns an iterator to the first non-zero element of row/column i.
Definition: DMatTransposer.h:199
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2481
bool canAlias(const Other *alias) const
Returns whether the matrix can alias with the given address alias.
Definition: DMatTransposer.h:333
MT::Reference Reference
Reference to a non-constant matrix value.
Definition: DMatTransposer.h:88
BLAZE_ALWAYS_INLINE void reset(const NonNumericProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: NonNumericProxy.h:833
MT::ResultType TransposeType
Transpose type for expression template evaluations.
Definition: DMatTransposer.h:83
MT::ConstReference ConstReference
Reference to a constant matrix value.
Definition: DMatTransposer.h:89
void addAssign(const SparseMatrix< MT2,!SO > &rhs)
Implementation of the transpose addition assignment of a column-major sparse matrix.
Definition: DMatTransposer.h:704
MT::ConstIterator ConstIterator
Iterator over constant elements.
Definition: DMatTransposer.h:91
Iterator begin(size_t i)
Returns an iterator to the first non-zero element of row/column i.
Definition: DMatTransposer.h:167
void assign(const SparseMatrix< MT2, SO > &rhs)
Implementation of the transpose assignment of a row-major sparse matrix.
Definition: DMatTransposer.h:548
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2473
void store(size_t i, size_t j, const IntrinsicType &value)
Aligned store of an intrinsic element of the matrix.
Definition: DMatTransposer.h:420
Header file for basic type definitions.
DMatTransposer(MT &dm)
Constructor for the DMatTransposer class.
Definition: DMatTransposer.h:113
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2479
#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
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row/column i.
Definition: DMatTransposer.h:183
void storeu(size_t i, size_t j, const IntrinsicType &value)
Unaligned store of an intrinsic element of the matrix.
Definition: DMatTransposer.h:438
Iterator end(size_t i)
Returns an iterator just past the last non-zero element of row/column i.
Definition: DMatTransposer.h:215