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/system/Inline.h>
50 #include <blaze/util/Assert.h>
51 #include <blaze/util/EnableIf.h>
52 #include <blaze/util/Types.h>
54 
55 
56 namespace blaze {
57 
58 //=================================================================================================
59 //
60 // CLASS DMATTRANSPOSER
61 //
62 //=================================================================================================
63 
64 //*************************************************************************************************
70 template< typename MT // Type of the dense matrix
71  , bool SO > // Storage order
72 class DMatTransposer : public DenseMatrix< DMatTransposer<MT,SO>, SO >
73 {
74  private:
75  //**Type definitions****************************************************************************
77  //**********************************************************************************************
78 
79  public:
80  //**Type definitions****************************************************************************
82  typedef typename MT::TransposeType ResultType;
83  typedef typename MT::OppositeType OppositeType;
84  typedef typename MT::ResultType TransposeType;
85  typedef typename MT::ElementType ElementType;
86  typedef typename IT::Type IntrinsicType;
87  typedef typename MT::ReturnType ReturnType;
88  typedef const This& CompositeType;
89  typedef typename MT::Reference Reference;
91  typedef typename MT::Iterator Iterator;
92  typedef typename MT::ConstIterator ConstIterator;
93  //**********************************************************************************************
94 
95  //**Compilation flags***************************************************************************
97 
100  enum { vectorizable = MT::vectorizable };
101 
103 
106  enum { smpAssignable = MT::smpAssignable };
107  //**********************************************************************************************
108 
109  //**Constructor*********************************************************************************
114  explicit inline DMatTransposer( MT& dm )
115  : dm_( dm ) // The dense matrix operand
116  {}
117  //**********************************************************************************************
118 
119  //**Access operator*****************************************************************************
126  inline Reference operator()( size_t i, size_t j ) {
127  BLAZE_INTERNAL_ASSERT( i < dm_.columns(), "Invalid row access index" );
128  BLAZE_INTERNAL_ASSERT( j < dm_.rows() , "Invalid column access index" );
129  return dm_(j,i);
130  }
131  //**********************************************************************************************
132 
133  //**Access operator*****************************************************************************
140  inline ConstReference operator()( size_t i, size_t j ) const {
141  BLAZE_INTERNAL_ASSERT( i < dm_.columns(), "Invalid row access index" );
142  BLAZE_INTERNAL_ASSERT( j < dm_.rows() , "Invalid column access index" );
143  return dm_(j,i);
144  }
145  //**********************************************************************************************
146 
147  //**Low-level data access***********************************************************************
152  inline ElementType* data() {
153  return dm_.data();
154  }
155  //**********************************************************************************************
156 
157  //**Begin function******************************************************************************
168  inline Iterator begin( size_t i ) {
169  return dm_.begin( i );
170  }
171  //**********************************************************************************************
172 
173  //**Begin function******************************************************************************
184  inline ConstIterator begin( size_t i ) const {
185  return dm_.cbegin( i );
186  }
187  //**********************************************************************************************
188 
189  //**Cbegin function*****************************************************************************
200  inline ConstIterator cbegin( size_t i ) const {
201  return dm_.cbegin( i );
202  }
203  //**********************************************************************************************
204 
205  //**End function********************************************************************************
216  inline Iterator end( size_t i ) {
217  return dm_.end( i );
218  }
219  //**********************************************************************************************
220 
221  //**End function********************************************************************************
232  inline ConstIterator end( size_t i ) const {
233  return dm_.cend( i );
234  }
235  //**********************************************************************************************
236 
237  //**Cend function*******************************************************************************
248  inline ConstIterator cend( size_t i ) const {
249  return dm_.cend( i );
250  }
251  //**********************************************************************************************
252 
253  //**Multiplication assignment operator**********************************************************
260  template< typename Other > // Data type of the right-hand side scalar
261  inline typename EnableIf< IsNumeric<Other>, DMatTransposer >::Type& operator*=( Other rhs )
262  {
263  (~dm_) *= rhs;
264  return *this;
265  }
266  //**********************************************************************************************
267 
268  //**Division assignment operator****************************************************************
277  template< typename Other > // Data type of the right-hand side scalar
278  inline typename EnableIf< IsNumeric<Other>, DMatTransposer >::Type& operator/=( Other rhs )
279  {
280  BLAZE_USER_ASSERT( rhs != Other(0), "Division by zero detected" );
281 
282  (~dm_) /= rhs;
283  return *this;
284  }
285  //**********************************************************************************************
286 
287  //**Rows function*******************************************************************************
292  inline size_t rows() const {
293  return dm_.columns();
294  }
295  //**********************************************************************************************
296 
297  //**Columns function****************************************************************************
302  inline size_t columns() const {
303  return dm_.rows();
304  }
305  //**********************************************************************************************
306 
307  //**Spacing function****************************************************************************
312  inline size_t spacing() const {
313  return dm_.spacing();
314  }
315  //**********************************************************************************************
316 
317  //**Reset function******************************************************************************
322  inline void reset() {
323  return dm_.reset();
324  }
325  //**********************************************************************************************
326 
327  //**CanAliased function*************************************************************************
333  template< typename Other > // Data type of the foreign expression
334  inline bool canAlias( const Other* alias ) const
335  {
336  return dm_.canAlias( alias );
337  }
338  //**********************************************************************************************
339 
340  //**IsAliased function**************************************************************************
346  template< typename Other > // Data type of the foreign expression
347  inline bool isAliased( const Other* alias ) const
348  {
349  return dm_.isAliased( alias );
350  }
351  //**********************************************************************************************
352 
353  //**IsAligned function**************************************************************************
358  inline bool isAligned() const
359  {
360  return dm_.isAligned();
361  }
362  //**********************************************************************************************
363 
364  //**CanSMPAssign function***********************************************************************
369  inline bool canSMPAssign() const
370  {
371  return dm_.canSMPAssign();
372  }
373  //**********************************************************************************************
374 
375  //**Load function*******************************************************************************
386  BLAZE_ALWAYS_INLINE IntrinsicType load( size_t i, size_t j ) const
387  {
388  return dm_.load( j, i );
389  }
390  //**********************************************************************************************
391 
392  //**Loadu function******************************************************************************
403  BLAZE_ALWAYS_INLINE IntrinsicType loadu( size_t i, size_t j ) const
404  {
405  return dm_.loadu( j, i );
406  }
407  //**********************************************************************************************
408 
409  //**Store function******************************************************************************
421  BLAZE_ALWAYS_INLINE void store( size_t i, size_t j, const IntrinsicType& value )
422  {
423  dm_.store( j, i, value );
424  }
425  //**********************************************************************************************
426 
427  //**Storeu function*****************************************************************************
439  BLAZE_ALWAYS_INLINE void storeu( size_t i, size_t j, const IntrinsicType& value )
440  {
441  dm_.storeu( j, i, value );
442  }
443  //**********************************************************************************************
444 
445  //**Stream function*****************************************************************************
457  BLAZE_ALWAYS_INLINE void stream( size_t i, size_t j, const IntrinsicType& value )
458  {
459  dm_.stream( j, i, value );
460  }
461  //**********************************************************************************************
462 
463  //**Transpose assignment of row-major dense matrices********************************************
474  template< typename MT2 > // Type of the right-hand side dense matrix
475  inline void assign( const DenseMatrix<MT2,SO>& rhs )
476  {
478 
479  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
480  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
481 
482  const size_t m( rows() );
483  const size_t n( columns() );
484 
485  const size_t jpos( n & size_t(-2) );
486  BLAZE_INTERNAL_ASSERT( ( n - ( n % 2UL ) ) == jpos, "Invalid end calculation" );
487 
488  for( size_t i=0UL; i<m; ++i ) {
489  for( size_t j=0UL; j<jpos; j+=2UL ) {
490  dm_(j ,i) = (~rhs)(i,j );
491  dm_(j+1UL,i) = (~rhs)(i,j+1UL);
492  }
493  if( jpos < n ) {
494  dm_(jpos,i) = (~rhs)(i,jpos);
495  }
496  }
497  }
498  //**********************************************************************************************
499 
500  //**Transpose assignment of column-major dense matrices*****************************************
511  template< typename MT2 > // Type of the right-hand side dense matrix
512  inline void assign( const DenseMatrix<MT2,!SO>& rhs )
513  {
515 
516  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
517  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
518 
519  const size_t m( rows() );
520  const size_t n( columns() );
521  const size_t block( 16UL );
522 
523  for( size_t ii=0UL; ii<m; ii+=block ) {
524  const size_t iend( ( m < ii+block )?( m ):( ii+block ) );
525  for( size_t jj=0UL; jj<n; jj+=block ) {
526  const size_t jend( ( n < jj+block )?( n ):( jj+block ) );
527  for( size_t i=ii; i<iend; ++i ) {
528  for( size_t j=jj; j<jend; ++j ) {
529  dm_(j,i) = (~rhs)(i,j);
530  }
531  }
532  }
533  }
534  }
535  //**********************************************************************************************
536 
537  //**Transpose assignment of row-major sparse matrices*******************************************
548  template< typename MT2 > // Type of the right-hand side sparse matrix
549  inline void assign( const SparseMatrix<MT2,SO>& rhs )
550  {
552 
553  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
554  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
555 
556  typedef typename MT2::ConstIterator RhsConstIterator;
557 
558  for( size_t i=0UL; i<(~rhs).rows(); ++i )
559  for( RhsConstIterator element=(~rhs).begin(i); element!=(~rhs).end(i); ++element )
560  dm_(element->index(),i) = element->value();
561  }
562  //**********************************************************************************************
563 
564  //**Transpose assignment of column-major sparse matrices****************************************
575  template< typename MT2 > // Type of the right-hand side sparse matrix
576  inline void assign( const SparseMatrix<MT2,!SO>& rhs )
577  {
579 
580  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
581  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
582 
583  typedef typename MT2::ConstIterator RhsConstIterator;
584 
585  for( size_t j=0UL; j<(~rhs).columns(); ++j )
586  for( RhsConstIterator element=(~rhs).begin(j); element!=(~rhs).end(j); ++element )
587  dm_(j,element->index()) = element->value();
588  }
589  //**********************************************************************************************
590 
591  //**Transpose addition assignment of row-major dense matrices***********************************
602  template< typename MT2 > // Type of the right-hand side dense matrix
603  inline void addAssign( const DenseMatrix<MT2,SO>& rhs )
604  {
606 
607  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
608  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
609 
610  const size_t m( rows() );
611  const size_t n( columns() );
612 
613  const size_t jpos( n & size_t(-2) );
614  BLAZE_INTERNAL_ASSERT( ( n - ( n % 2UL ) ) == jpos, "Invalid end calculation" );
615 
616  for( size_t i=0UL; i<m; ++i ) {
617  for( size_t j=0UL; j<jpos; j+=2UL ) {
618  dm_(j ,i) += (~rhs)(i,j );
619  dm_(j+1UL,i) += (~rhs)(i,j+1UL);
620 
621  }
622  if( jpos < n ) {
623  dm_(jpos,i) += (~rhs)(i,jpos);
624  }
625  }
626  }
627  //**********************************************************************************************
628 
629  //**Transpose addition assignment of column-major dense matrices********************************
640  template< typename MT2 > // Type of the right-hand side dense matrix
641  inline void addAssign( const DenseMatrix<MT2,!SO>& rhs )
642  {
644 
645  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
646  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
647 
648  const size_t m( rows() );
649  const size_t n( columns() );
650  const size_t block( 16UL );
651 
652  for( size_t ii=0UL; ii<m; ii+=block ) {
653  const size_t iend( ( m < ii+block )?( m ):( ii+block ) );
654  for( size_t jj=0UL; jj<n; jj+=block ) {
655  const size_t jend( ( n < jj+block )?( n ):( jj+block ) );
656  for( size_t i=ii; i<iend; ++i ) {
657  for( size_t j=jj; j<jend; ++j ) {
658  dm_(j,i) += (~rhs)(i,j);
659  }
660  }
661  }
662  }
663  }
664  //**********************************************************************************************
665 
666  //**Transpose addition assignment of row-major sparse matrices**********************************
677  template< typename MT2 > // Type of the right-hand side sparse matrix
678  inline void addAssign( const SparseMatrix<MT2,SO>& rhs )
679  {
681 
682  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
683  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
684 
685  typedef typename MT2::ConstIterator RhsConstIterator;
686 
687  for( size_t i=0UL; i<(~rhs).rows(); ++i )
688  for( RhsConstIterator element=(~rhs).begin(i); element!=(~rhs).end(i); ++element )
689  dm_(element->index(),i) += element->value();
690  }
691  //**********************************************************************************************
692 
693  //**Transpose addition assignment of column-major sparse matrices*******************************
704  template< typename MT2 > // Type of the right-hand side sparse matrix
705  inline void addAssign( const SparseMatrix<MT2,!SO>& rhs )
706  {
708 
709  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
710  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
711 
712  typedef typename MT2::ConstIterator RhsConstIterator;
713 
714  for( size_t j=0UL; j<(~rhs).columns(); ++j )
715  for( RhsConstIterator element=(~rhs).begin(j); element!=(~rhs).end(j); ++element )
716  dm_(j,element->index()) += element->value();
717  }
718  //**********************************************************************************************
719 
720  //**Transpose subtraction assignment of row-major dense matrices********************************
731  template< typename MT2 > // Type of the right-hand side dense matrix
732  inline void subAssign( const DenseMatrix<MT2,SO>& rhs )
733  {
735 
736  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
737  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
738 
739  const size_t m( rows() );
740  const size_t n( columns() );
741 
742  const size_t jpos( n & size_t(-2) );
743  BLAZE_INTERNAL_ASSERT( ( n - ( n % 2UL ) ) == jpos, "Invalid end calculation" );
744 
745  for( size_t i=0UL; i<m; ++i ) {
746  for( size_t j=0UL; j<jpos; j+=2UL ) {
747  dm_(j ,i) -= (~rhs)(i,j );
748  dm_(j+1UL,i) -= (~rhs)(i,j+1UL);
749 
750  }
751  if( jpos < n ) {
752  dm_(jpos,i) -= (~rhs)(i,jpos);
753  }
754  }
755  }
756  //**********************************************************************************************
757 
758  //**Transpose subtraction assignment of column-major dense matrices*****************************
769  template< typename MT2 > // Type of the right-hand side dense matrix
770  inline void subAssign( const DenseMatrix<MT2,!SO>& rhs )
771  {
773 
774  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
775  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
776 
777  const size_t m( rows() );
778  const size_t n( columns() );
779  const size_t block( 16UL );
780 
781  for( size_t ii=0UL; ii<m; ii+=block ) {
782  const size_t iend( ( m < ii+block )?( m ):( ii+block ) );
783  for( size_t jj=0UL; jj<n; jj+=block ) {
784  const size_t jend( ( n < jj+block )?( n ):( jj+block ) );
785  for( size_t i=ii; i<iend; ++i ) {
786  for( size_t j=jj; j<jend; ++j ) {
787  dm_(j,i) -= (~rhs)(i,j);
788  }
789  }
790  }
791  }
792  }
793  //**********************************************************************************************
794 
795  //**Transpose subtraction assignment of row-major sparse matrices*******************************
806  template< typename MT2 > // Type of the right-hand side sparse matrix
807  inline void subAssign( const SparseMatrix<MT2,SO>& rhs )
808  {
810 
811  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
812  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
813 
814  typedef typename MT2::ConstIterator RhsConstIterator;
815 
816  for( size_t i=0UL; i<(~rhs).rows(); ++i )
817  for( RhsConstIterator element=(~rhs).begin(i); element!=(~rhs).end(i); ++element )
818  dm_(element->index(),i) -= element->value();
819  }
820  //**********************************************************************************************
821 
822  //**Transpose subtraction assignment of column-major dense matrices*****************************
833  template< typename MT2 > // Type of the right-hand side sparse matrix
834  inline void subAssign( const SparseMatrix<MT2,!SO>& rhs )
835  {
837 
838  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
839  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
840 
841  typedef typename MT2::ConstIterator RhsConstIterator;
842 
843  for( size_t j=0UL; j<(~rhs).columns(); ++j )
844  for( RhsConstIterator element=(~rhs).begin(j); element!=(~rhs).end(j); ++element )
845  dm_(j,element->index()) -= element->value();
846  }
847  //**********************************************************************************************
848 
849  //**Transpose multiplication assignment of dense matrices***************************************
850  // No special implementation for the transpose multiplication assignment of dense matrices.
851  //**********************************************************************************************
852 
853  //**Transpose multiplication assignment of sparse matrices**************************************
854  // No special implementation for the transpose multiplication assignment of sparse matrices.
855  //**********************************************************************************************
856 
857  private:
858  //**Member variables****************************************************************************
859  MT& dm_;
860  //**********************************************************************************************
861 
862  //**Compile time checks*************************************************************************
868  //**********************************************************************************************
869 };
870 //*************************************************************************************************
871 
872 
873 
874 
875 //=================================================================================================
876 //
877 // CLASS TEMPLATE SPECIALIZATION FOR ROW-MAJOR MATRICES
878 //
879 //=================================================================================================
880 
881 //*************************************************************************************************
889 template< typename MT > // Type of the dense matrix
890 class DMatTransposer<MT,true> : public DenseMatrix< DMatTransposer<MT,true>, true >
891 {
892  private:
893  //**Type definitions****************************************************************************
895  //**********************************************************************************************
896 
897  public:
898  //**Type definitions****************************************************************************
899  typedef DMatTransposer<MT,true> This;
900  typedef typename MT::TransposeType ResultType;
901  typedef typename MT::OppositeType OppositeType;
902  typedef typename MT::ResultType TransposeType;
903  typedef typename MT::ElementType ElementType;
904  typedef typename IT::Type IntrinsicType;
905  typedef typename MT::ReturnType ReturnType;
906  typedef const This& CompositeType;
907  typedef typename MT::Reference Reference;
908  typedef typename MT::ConstReference ConstReference;
909  typedef typename MT::Iterator Iterator;
910  typedef typename MT::ConstIterator ConstIterator;
911  //**********************************************************************************************
912 
913  //**Compilation flags***************************************************************************
915 
918  enum { vectorizable = MT::vectorizable };
919 
921 
924  enum { smpAssignable = MT::smpAssignable };
925  //**********************************************************************************************
926 
927  //**Constructor*********************************************************************************
932  explicit inline DMatTransposer( MT& dm )
933  : dm_( dm ) // The dense matrix operand
934  {}
935  //**********************************************************************************************
936 
937  //**Access operator*****************************************************************************
944  inline Reference operator()( size_t i, size_t j ) {
945  BLAZE_INTERNAL_ASSERT( i < dm_.columns(), "Invalid row access index" );
946  BLAZE_INTERNAL_ASSERT( j < dm_.rows() , "Invalid column access index" );
947  return dm_(j,i);
948  }
949  //**********************************************************************************************
950 
951  //**Access operator*****************************************************************************
958  inline ConstReference operator()( size_t i, size_t j ) const {
959  BLAZE_INTERNAL_ASSERT( i < dm_.columns(), "Invalid row access index" );
960  BLAZE_INTERNAL_ASSERT( j < dm_.rows() , "Invalid column access index" );
961  return dm_(j,i);
962  }
963  //**********************************************************************************************
964 
965  //**Low-level data access***********************************************************************
970  inline ElementType* data() {
971  return dm_.data();
972  }
973  //**********************************************************************************************
974 
975  //**Begin function******************************************************************************
981  inline Iterator begin( size_t j ) {
982  return dm_.begin(j);
983  }
984  //**********************************************************************************************
985 
986  //**Begin function******************************************************************************
992  inline ConstIterator begin( size_t j ) const {
993  return dm_.cbegin(j);
994  }
995  //**********************************************************************************************
996 
997  //**Cbegin function*****************************************************************************
1003  inline ConstIterator cbegin( size_t j ) const {
1004  return dm_.cbegin(j);
1005  }
1006  //**********************************************************************************************
1007 
1008  //**End function********************************************************************************
1014  inline Iterator end( size_t j ) {
1015  return dm_.end(j);
1016  }
1017  //**********************************************************************************************
1018 
1019  //**End function********************************************************************************
1025  inline ConstIterator end( size_t j ) const {
1026  return dm_.cend(j);
1027  }
1028  //**********************************************************************************************
1029 
1030  //**Cend function*******************************************************************************
1036  inline ConstIterator cend( size_t j ) const {
1037  return dm_.cend(j);
1038  }
1039  //**********************************************************************************************
1040 
1041  //**Multiplication assignment operator**********************************************************
1048  template< typename Other > // Data type of the right-hand side scalar
1049  inline typename EnableIf< IsNumeric<Other>, DMatTransposer >::Type& operator*=( Other rhs )
1050  {
1051  (~dm_) *= rhs;
1052  return *this;
1053  }
1054  //**********************************************************************************************
1055 
1056  //**Division assignment operator****************************************************************
1065  template< typename Other > // Data type of the right-hand side scalar
1066  inline typename EnableIf< IsNumeric<Other>, DMatTransposer >::Type& operator/=( Other rhs )
1067  {
1068  BLAZE_USER_ASSERT( rhs != Other(0), "Division by zero detected" );
1069 
1070  (~dm_) /= rhs;
1071  return *this;
1072  }
1073  //**********************************************************************************************
1074 
1075  //**Rows function*******************************************************************************
1080  inline size_t rows() const {
1081  return dm_.columns();
1082  }
1083  //**********************************************************************************************
1084 
1085  //**Columns function****************************************************************************
1090  inline size_t columns() const {
1091  return dm_.rows();
1092  }
1093  //**********************************************************************************************
1094 
1095  //**Spacing function****************************************************************************
1100  inline size_t spacing() const {
1101  return dm_.spacing();
1102  }
1103  //**********************************************************************************************
1104 
1105  //**Reset function******************************************************************************
1110  inline void reset() {
1111  return dm_.reset();
1112  }
1113  //**********************************************************************************************
1114 
1115  //**CanAliased function*************************************************************************
1121  template< typename Other > // Data type of the foreign expression
1122  inline bool canAlias( const Other* alias ) const
1123  {
1124  return dm_.canAlias( alias );
1125  }
1126  //**********************************************************************************************
1127 
1128  //**IsAliased function**************************************************************************
1134  template< typename Other > // Data type of the foreign expression
1135  inline bool isAliased( const Other* alias ) const
1136  {
1137  return dm_.isAliased( alias );
1138  }
1139  //**********************************************************************************************
1140 
1141  //**IsAligned function**************************************************************************
1146  inline bool isAligned() const
1147  {
1148  return dm_.isAligned();
1149  }
1150  //**********************************************************************************************
1151 
1152  //**CanSMPAssign function***********************************************************************
1157  inline bool canSMPAssign() const
1158  {
1159  return dm_.canSMPAssign();
1160  }
1161  //**********************************************************************************************
1162 
1163  //**Load function*******************************************************************************
1174  BLAZE_ALWAYS_INLINE IntrinsicType load( size_t i, size_t j ) const
1175  {
1176  return dm_.load( j, i );
1177  }
1178  //**********************************************************************************************
1179 
1180  //**Loadu function******************************************************************************
1191  BLAZE_ALWAYS_INLINE IntrinsicType loadu( size_t i, size_t j ) const
1192  {
1193  return dm_.loadu( j, i );
1194  }
1195  //**********************************************************************************************
1196 
1197  //**Store function******************************************************************************
1209  BLAZE_ALWAYS_INLINE void store( size_t i, size_t j, const IntrinsicType& value )
1210  {
1211  dm_.store( j, i, value );
1212  }
1213  //**********************************************************************************************
1214 
1215  //**Storeu function*****************************************************************************
1227  BLAZE_ALWAYS_INLINE void storeu( size_t i, size_t j, const IntrinsicType& value )
1228  {
1229  dm_.storeu( j, i, value );
1230  }
1231  //**********************************************************************************************
1232 
1233  //**Stream function*****************************************************************************
1245  BLAZE_ALWAYS_INLINE void stream( size_t i, size_t j, const IntrinsicType& value )
1246  {
1247  dm_.stream( j, i, value );
1248  }
1249  //**********************************************************************************************
1250 
1251  //**Transpose assignment of column-major dense matrices*****************************************
1262  template< typename MT2 > // Type of the right-hand side dense matrix
1263  inline void assign( const DenseMatrix<MT2,true>& rhs )
1264  {
1266 
1267  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
1268  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
1269 
1270  const size_t m( rows() );
1271  const size_t n( columns() );
1272 
1273  const size_t ipos( m & size_t(-2) );
1274  BLAZE_INTERNAL_ASSERT( ( m - ( m % 2UL ) ) == ipos, "Invalid end calculation" );
1275 
1276  for( size_t j=0UL; j<n; ++j ) {
1277  for( size_t i=0UL; i<ipos; i+=2UL ) {
1278  dm_(j,i ) = (~rhs)(i ,j);
1279  dm_(j,i+1UL) = (~rhs)(i+1UL,j);
1280  }
1281  if( ipos < m ) {
1282  dm_(j,ipos) = (~rhs)(ipos,j);
1283  }
1284  }
1285  }
1286  //**********************************************************************************************
1287 
1288  //**Transpose assignment of row-major dense matrices********************************************
1299  template< typename MT2 > // Type of the right-hand side dense matrix
1300  inline void assign( const DenseMatrix<MT2,false>& rhs )
1301  {
1303 
1304  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
1305  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
1306 
1307  const size_t m( rows() );
1308  const size_t n( columns() );
1309  const size_t block( 16UL );
1310 
1311  for( size_t jj=0UL; jj<n; jj+=block ) {
1312  const size_t jend( ( n < jj+block )?( n ):( jj+block ) );
1313  for( size_t ii=0UL; ii<m; ii+=block ) {
1314  const size_t iend( ( m < ii+block )?( m ):( ii+block ) );
1315  for( size_t j=jj; j<jend; ++j ) {
1316  for( size_t i=ii; i<iend; ++i ) {
1317  dm_(j,i) = (~rhs)(i,j);
1318  }
1319  }
1320  }
1321  }
1322  }
1323  //**********************************************************************************************
1324 
1325  //**Transpose assignment of column-major sparse matrices****************************************
1336  template< typename MT2 > // Type of the right-hand side sparse matrix
1337  inline void assign( const SparseMatrix<MT2,true>& rhs )
1338  {
1340 
1341  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
1342  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
1343 
1344  typedef typename MT2::ConstIterator RhsConstIterator;
1345 
1346  for( size_t j=0UL; j<(~rhs).columns(); ++j )
1347  for( RhsConstIterator element=(~rhs).begin(j); element!=(~rhs).end(j); ++element )
1348  dm_(j,element->index()) = element->value();
1349  }
1350  //**********************************************************************************************
1351 
1352  //**Transpose assignment of row-major sparse matrices*******************************************
1363  template< typename MT2 > // Type of the right-hand side sparse matrix
1364  inline void assign( const SparseMatrix<MT2,false>& rhs )
1365  {
1367 
1368  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
1369  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
1370 
1371  typedef typename MT2::ConstIterator RhsConstIterator;
1372 
1373  for( size_t i=0UL; i<(~rhs).rows(); ++i )
1374  for( RhsConstIterator element=(~rhs).begin(i); element!=(~rhs).end(i); ++element )
1375  dm_(element->index(),i) = element->value();
1376  }
1377  //**********************************************************************************************
1378 
1379  //**Transpose addition assignment of column-major dense matrices********************************
1390  template< typename MT2 > // Type of the right-hand side dense matrix
1391  inline void addAssign( const DenseMatrix<MT2,true>& rhs )
1392  {
1394 
1395  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
1396  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
1397 
1398  const size_t m( rows() );
1399  const size_t n( columns() );
1400 
1401  const size_t ipos( m & size_t(-2) );
1402  BLAZE_INTERNAL_ASSERT( ( m - ( m % 2UL ) ) == ipos, "Invalid end calculation" );
1403 
1404  for( size_t j=0UL; j<n; ++j ) {
1405  for( size_t i=0UL; i<ipos; i+=2UL ) {
1406  dm_(j,i ) += (~rhs)(i ,j);
1407  dm_(j,i+1UL) += (~rhs)(i+1UL,j);
1408  }
1409  if( ipos < m ) {
1410  dm_(j,ipos) += (~rhs)(ipos,j);
1411  }
1412  }
1413  }
1414  //**********************************************************************************************
1415 
1416  //**Transpose addition assignment of row-major dense matrices***********************************
1427  template< typename MT2 > // Type of the right-hand side dense matrix
1428  inline void addAssign( const DenseMatrix<MT2,false>& rhs )
1429  {
1431 
1432  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
1433  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
1434 
1435  const size_t m( rows() );
1436  const size_t n( columns() );
1437  const size_t block( 16UL );
1438 
1439  for( size_t jj=0UL; jj<n; jj+=block ) {
1440  const size_t jend( ( n < jj+block )?( n ):( jj+block ) );
1441  for( size_t ii=0UL; ii<m; ii+=block ) {
1442  const size_t iend( ( m < ii+block )?( m ):( ii+block ) );
1443  for( size_t j=jj; j<jend; ++j ) {
1444  for( size_t i=ii; i<iend; ++i ) {
1445  dm_(j,i) += (~rhs)(i,j);
1446  }
1447  }
1448  }
1449  }
1450  }
1451  //**********************************************************************************************
1452 
1453  //**Transpose addition assignment of column-major sparse matrices*******************************
1464  template< typename MT2 > // Type of the right-hand side sparse matrix
1465  inline void addAssign( const SparseMatrix<MT2,true>& rhs )
1466  {
1468 
1469  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
1470  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
1471 
1472  typedef typename MT2::ConstIterator RhsConstIterator;
1473 
1474  for( size_t j=0UL; j<(~rhs).columns(); ++j )
1475  for( RhsConstIterator element=(~rhs).begin(j); element!=(~rhs).end(j); ++element )
1476  dm_(j,element->index()) += element->value();
1477  }
1478  //**********************************************************************************************
1479 
1480  //**Transpose addition assignment of row-major sparse matrices**********************************
1491  template< typename MT2 > // Type of the right-hand side sparse matrix
1492  inline void addAssign( const SparseMatrix<MT2,false>& rhs )
1493  {
1495 
1496  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
1497  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
1498 
1499  typedef typename MT2::ConstIterator RhsConstIterator;
1500 
1501  for( size_t i=0UL; i<(~rhs).rows(); ++i )
1502  for( RhsConstIterator element=(~rhs).begin(i); element!=(~rhs).end(i); ++element )
1503  dm_(element->index(),i) += element->value();
1504  }
1505  //**********************************************************************************************
1506 
1507  //**Transpose subtraction assignment of column-major dense matrices*****************************
1518  template< typename MT2 > // Type of the right-hand side dense matrix
1519  inline void subAssign( const DenseMatrix<MT2,true>& rhs )
1520  {
1522 
1523  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
1524  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
1525 
1526  const size_t m( rows() );
1527  const size_t n( columns() );
1528 
1529  const size_t ipos( m & size_t(-2) );
1530  BLAZE_INTERNAL_ASSERT( ( m - ( m % 2UL ) ) == ipos, "Invalid end calculation" );
1531 
1532  for( size_t j=0UL; j<n; ++j ) {
1533  for( size_t i=0UL; i<ipos; i+=2UL ) {
1534  dm_(j,i ) -= (~rhs)(i ,j);
1535  dm_(j,i+1UL) -= (~rhs)(i+1UL,j);
1536  }
1537  if( ipos < m ) {
1538  dm_(j,ipos) -= (~rhs)(ipos,j);
1539  }
1540  }
1541  }
1542  //**********************************************************************************************
1543 
1544  //**Transpose subtraction assignment of row-major dense matrices********************************
1555  template< typename MT2 > // Type of the right-hand side dense matrix
1556  inline void subAssign( const DenseMatrix<MT2,false>& rhs )
1557  {
1559 
1560  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
1561  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
1562 
1563  const size_t m( rows() );
1564  const size_t n( columns() );
1565  const size_t block( 16UL );
1566 
1567  for( size_t jj=0UL; jj<n; jj+=block ) {
1568  const size_t jend( ( n < jj+block )?( n ):( jj+block ) );
1569  for( size_t ii=0UL; ii<m; ii+=block ) {
1570  const size_t iend( ( m < ii+block )?( m ):( ii+block ) );
1571  for( size_t j=jj; j<jend; ++j ) {
1572  for( size_t i=ii; i<iend; ++i ) {
1573  dm_(j,i) -= (~rhs)(i,j);
1574  }
1575  }
1576  }
1577  }
1578  }
1579  //**********************************************************************************************
1580 
1581  //**Transpose subtraction assignment of column-major sparse matrices****************************
1592  template< typename MT2 > // Type of the right-hand side sparse matrix
1593  inline void subAssign( const SparseMatrix<MT2,true>& rhs )
1594  {
1596 
1597  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
1598  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
1599 
1600  typedef typename MT2::ConstIterator RhsConstIterator;
1601 
1602  for( size_t j=0UL; j<(~rhs).columns(); ++j )
1603  for( RhsConstIterator element=(~rhs).begin(j); element!=(~rhs).end(j); ++element )
1604  dm_(j,element->index()) -= element->value();
1605  }
1606  //**********************************************************************************************
1607 
1608  //**Transpose subtraction assignment of row-major dense matrices********************************
1619  template< typename MT2 > // Type of the right-hand side sparse matrix
1620  inline void subAssign( const SparseMatrix<MT2,false>& rhs )
1621  {
1623 
1624  BLAZE_INTERNAL_ASSERT( dm_.columns() == (~rhs).rows(), "Invalid number of rows" );
1625  BLAZE_INTERNAL_ASSERT( dm_.rows() == (~rhs).columns(), "Invalid number of columns" );
1626 
1627  typedef typename MT2::ConstIterator RhsConstIterator;
1628 
1629  for( size_t i=0UL; i<(~rhs).rows(); ++i )
1630  for( RhsConstIterator element=(~rhs).begin(i); element!=(~rhs).end(i); ++element )
1631  dm_(element->index(),i) -= element->value();
1632  }
1633  //**********************************************************************************************
1634 
1635  //**Transpose multiplication assignment of dense matrices***************************************
1636  // No special implementation for the transpose multiplication assignment of dense matrices.
1637  //**********************************************************************************************
1638 
1639  //**Transpose multiplication assignment of sparse matrices**************************************
1640  // No special implementation for the transpose multiplication assignment of sparse matrices.
1641  //**********************************************************************************************
1642 
1643  private:
1644  //**Member variables****************************************************************************
1645  MT& dm_;
1646  //**********************************************************************************************
1647 
1648  //**Compile time checks*************************************************************************
1654  //**********************************************************************************************
1655 };
1657 //*************************************************************************************************
1658 
1659 
1660 
1661 
1662 //=================================================================================================
1663 //
1664 // GLOBAL OPERATORS
1665 //
1666 //=================================================================================================
1667 
1668 //*************************************************************************************************
1676 template< typename MT // Type of the dense matrix
1677  , bool SO > // Storage order
1678 inline void reset( DMatTransposer<MT,SO>& m )
1679 {
1680  m.reset();
1681 }
1683 //*************************************************************************************************
1684 
1685 
1686 
1687 
1688 //=================================================================================================
1689 //
1690 // SUBMATRIXTRAIT SPECIALIZATIONS
1691 //
1692 //=================================================================================================
1693 
1694 //*************************************************************************************************
1696 template< typename MT, bool SO >
1697 struct SubmatrixTrait< DMatTransposer<MT,SO> >
1698 {
1699  typedef typename SubmatrixTrait< typename DMatTransposer<MT,SO>::ResultType >::Type Type;
1700 };
1702 //*************************************************************************************************
1703 
1704 } // namespace blaze
1705 
1706 #endif
ConstReference operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatTransposer.h:140
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:678
bool canSMPAssign() const
Returns whether the matrix can be used in SMP assignments.
Definition: DMatTransposer.h:369
#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:81
Header file for basic type definitions.
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row/column i.
Definition: DMatTransposer.h:232
BLAZE_ALWAYS_INLINE IntrinsicType load(size_t i, size_t j) const
Aligned load of an intrinsic element of the matrix.
Definition: DMatTransposer.h:386
EnableIf< IsNumeric< Other >, DMatTransposer >::Type & operator/=(Other rhs)
Division assignment operator for the division of a matrix by a scalar value ( ).
Definition: DMatTransposer.h:278
#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:834
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:821
size_t rows() const
Returns the current number of rows of the matrix.
Definition: DMatTransposer.h:292
void addAssign(const DenseMatrix< MT2, SO > &rhs)
Implementation of the transpose addition assignment of a row-major dense matrix.
Definition: DMatTransposer.h:603
ElementType * data()
Low-level data access to the matrix elements.
Definition: DMatTransposer.h:152
size_t columns() const
Returns the current number of columns of the matrix.
Definition: DMatTransposer.h:302
MT::ReturnType ReturnType
Return type for expression template evaluations.
Definition: DMatTransposer.h:87
CompressedMatrix< Type, false > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CompressedMatrix.h:2503
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:91
const This & CompositeType
Data type for composite expression templates.
Definition: DMatTransposer.h:88
Constraint on the data type.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
void subAssign(const DenseMatrix< MT2, SO > &rhs)
Implementation of the transpose subtraction assignment of a row-major dense matrix.
Definition: DMatTransposer.h:732
#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:126
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2511
bool isAliased(const Other *alias) const
Returns whether the matrix is aliased with the given address alias.
Definition: DMatTransposer.h:347
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:261
Expression object for the transposition of a dense matrix.The DMatTransposer class is a wrapper objec...
Definition: DMatTransposer.h:72
MT & dm_
The dense matrix operand.
Definition: DMatTransposer.h:859
bool isAligned() const
Returns whether the matrix is properly aligned in memory.
Definition: DMatTransposer.h:358
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2504
Constraints on the storage order of matrix types.
BLAZE_ALWAYS_INLINE IntrinsicType loadu(size_t i, size_t j) const
Unaligned load of an intrinsic element of the matrix.
Definition: DMatTransposer.h:403
MT::TransposeType ResultType
Result type for expression template evaluations.
Definition: DMatTransposer.h:82
void assign(const SparseMatrix< MT2,!SO > &rhs)
Implementation of the transpose assignment of a column-major sparse matrix.
Definition: DMatTransposer.h:576
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2505
BLAZE_ALWAYS_INLINE 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:457
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:2509
void reset()
Resets the matrix elements.
Definition: DMatTransposer.h:322
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:512
size_t spacing() const
Returns the spacing between the beginning of two rows.
Definition: DMatTransposer.h:312
void assign(const DenseMatrix< MT2, SO > &rhs)
Implementation of the transpose assignment of a row-major dense matrix.
Definition: DMatTransposer.h:475
Header file for the IsNumeric type trait.
IntrinsicTrait< typename MT::ElementType > IT
Intrinsic trait for the vector element type.
Definition: DMatTransposer.h:76
void subAssign(const SparseMatrix< MT2, SO > &rhs)
Implementation of the transpose subtraction assignment of a row-major sparse matrix.
Definition: DMatTransposer.h:807
#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:2506
MT::ElementType ElementType
Type of the matrix elements.
Definition: DMatTransposer.h:85
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:86
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:770
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:248
MT::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatTransposer.h:83
void addAssign(const DenseMatrix< MT2,!SO > &rhs)
Implementation of the transpose addition assignment of a column-major dense matrix.
Definition: DMatTransposer.h:641
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:200
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2510
bool canAlias(const Other *alias) const
Returns whether the matrix can alias with the given address alias.
Definition: DMatTransposer.h:334
MT::Reference Reference
Reference to a non-constant matrix value.
Definition: DMatTransposer.h:89
BLAZE_ALWAYS_INLINE void storeu(size_t i, size_t j, const IntrinsicType &value)
Unaligned store of an intrinsic element of the matrix.
Definition: DMatTransposer.h:439
MT::ResultType TransposeType
Transpose type for expression template evaluations.
Definition: DMatTransposer.h:84
MT::ConstReference ConstReference
Reference to a constant matrix value.
Definition: DMatTransposer.h:90
void addAssign(const SparseMatrix< MT2,!SO > &rhs)
Implementation of the transpose addition assignment of a column-major sparse matrix.
Definition: DMatTransposer.h:705
MT::ConstIterator ConstIterator
Iterator over constant elements.
Definition: DMatTransposer.h:92
Iterator begin(size_t i)
Returns an iterator to the first non-zero element of row/column i.
Definition: DMatTransposer.h:168
void assign(const SparseMatrix< MT2, SO > &rhs)
Implementation of the transpose assignment of a row-major sparse matrix.
Definition: DMatTransposer.h:549
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2502
DMatTransposer(MT &dm)
Constructor for the DMatTransposer class.
Definition: DMatTransposer.h:114
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2508
System settings for the inline keywords.
#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
BLAZE_ALWAYS_INLINE void store(size_t i, size_t j, const IntrinsicType &value)
Aligned store of an intrinsic element of the matrix.
Definition: DMatTransposer.h:421
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row/column i.
Definition: DMatTransposer.h:184
Iterator end(size_t i)
Returns an iterator just past the last non-zero element of row/column i.
Definition: DMatTransposer.h:216