Matrix.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_MATRIX_H_
36 #define _BLAZE_MATH_EXPRESSIONS_MATRIX_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <stdexcept>
48 #include <blaze/system/Inline.h>
49 #include <blaze/util/Assert.h>
50 #include <blaze/util/DisableIf.h>
51 #include <blaze/util/EnableIf.h>
53 #include <blaze/util/mpl/And.h>
54 #include <blaze/util/mpl/Not.h>
55 #include <blaze/util/Types.h>
57 #include <blaze/util/Unused.h>
58 
59 
60 namespace blaze {
61 
62 //=================================================================================================
63 //
64 // CLASS DEFINITION
65 //
66 //=================================================================================================
67 
68 //*************************************************************************************************
79 template< typename MT // Type of the matrix
80  , bool SO > // Storage order
81 struct Matrix
82 {
83  //**Type definitions****************************************************************************
84  typedef MT MatrixType;
85  //**********************************************************************************************
86 
87  //**Non-const conversion operator***************************************************************
93  return *static_cast<MatrixType*>( this );
94  }
95  //**********************************************************************************************
96 
97  //**Const conversion operator*******************************************************************
102  BLAZE_ALWAYS_INLINE const MatrixType& operator~() const {
103  return *static_cast<const MatrixType*>( this );
104  }
105  //**********************************************************************************************
106 };
107 //*************************************************************************************************
108 
109 
110 
111 
112 //=================================================================================================
113 //
114 // GLOBAL FUNCTIONS
115 //
116 //=================================================================================================
117 
118 //*************************************************************************************************
121 template< typename MT, bool SO >
122 BLAZE_ALWAYS_INLINE typename MT::Iterator begin( Matrix<MT,SO>& matrix, size_t i );
123 
124 template< typename MT, bool SO >
125 BLAZE_ALWAYS_INLINE typename MT::ConstIterator begin( const Matrix<MT,SO>& matrix, size_t i );
126 
127 template< typename MT, bool SO >
128 BLAZE_ALWAYS_INLINE typename MT::ConstIterator cbegin( const Matrix<MT,SO>& matrix, size_t i );
129 
130 template< typename MT, bool SO >
131 BLAZE_ALWAYS_INLINE typename MT::Iterator end( Matrix<MT,SO>& matrix, size_t i );
132 
133 template< typename MT, bool SO >
134 BLAZE_ALWAYS_INLINE typename MT::ConstIterator end( const Matrix<MT,SO>& matrix, size_t i );
135 
136 template< typename MT, bool SO >
137 BLAZE_ALWAYS_INLINE typename MT::ConstIterator cend( const Matrix<MT,SO>& matrix, size_t i );
138 
139 template< typename MT, bool SO >
140 BLAZE_ALWAYS_INLINE size_t rows( const Matrix<MT,SO>& matrix );
141 
142 template< typename MT, bool SO >
143 BLAZE_ALWAYS_INLINE size_t columns( const Matrix<MT,SO>& matrix );
144 
145 template< typename MT, bool SO >
146 BLAZE_ALWAYS_INLINE size_t capacity( const Matrix<MT,SO>& matrix );
147 
148 template< typename MT, bool SO >
149 BLAZE_ALWAYS_INLINE size_t capacity( const Matrix<MT,SO>& matrix, size_t i );
150 
151 template< typename MT, bool SO >
152 BLAZE_ALWAYS_INLINE size_t nonZeros( const Matrix<MT,SO>& matrix );
153 
154 template< typename MT, bool SO >
155 BLAZE_ALWAYS_INLINE size_t nonZeros( const Matrix<MT,SO>& matrix, size_t i );
156 
157 template< typename MT, bool SO >
158 BLAZE_ALWAYS_INLINE void resize( Matrix<MT,SO>& matrix, size_t rows, size_t columns, bool preserve=true );
159 
160 template< typename MT1, bool SO1, typename MT2, bool SO2 >
161 BLAZE_ALWAYS_INLINE void assign( Matrix<MT1,SO1>& lhs, const Matrix<MT2,SO2>& rhs );
162 
163 template< typename MT1, bool SO1, typename MT2, bool SO2 >
164 BLAZE_ALWAYS_INLINE void addAssign( Matrix<MT1,SO1>& lhs, const Matrix<MT2,SO2>& rhs );
165 
166 template< typename MT1, bool SO1, typename MT2, bool SO2 >
167 BLAZE_ALWAYS_INLINE void subAssign( Matrix<MT1,SO1>& lhs, const Matrix<MT2,SO2>& rhs );
168 
169 template< typename MT1, bool SO1, typename MT2, bool SO2 >
170 BLAZE_ALWAYS_INLINE void multAssign( Matrix<MT1,SO1>& lhs, const Matrix<MT2,SO2>& rhs );
171 
172 template< typename MT, bool SO >
173 BLAZE_ALWAYS_INLINE bool isSquare( const Matrix<MT,SO>& matrix );
174 
175 template< typename MT1, bool SO1, typename MT2, bool SO2 >
176 BLAZE_ALWAYS_INLINE bool isSame( const Matrix<MT1,SO1>& a, const Matrix<MT2,SO2>& b );
178 //*************************************************************************************************
179 
180 
181 //*************************************************************************************************
193 template< typename MT // Type of the matrix
194  , bool SO > // Storage order of the matrix
196 {
197  return (~matrix).begin(i);
198 }
199 //*************************************************************************************************
200 
201 
202 //*************************************************************************************************
214 template< typename MT // Type of the matrix
215  , bool SO > // Storage order of the matrix
216 BLAZE_ALWAYS_INLINE typename MT::ConstIterator begin( const Matrix<MT,SO>& matrix, size_t i )
217 {
218  return (~matrix).begin(i);
219 }
220 //*************************************************************************************************
221 
222 
223 //*************************************************************************************************
235 template< typename MT // Type of the matrix
236  , bool SO > // Storage order of the matrix
237 BLAZE_ALWAYS_INLINE typename MT::ConstIterator cbegin( const Matrix<MT,SO>& matrix, size_t i )
238 {
239  return (~matrix).cbegin(i);
240 }
241 //*************************************************************************************************
242 
243 
244 //*************************************************************************************************
256 template< typename MT // Type of the matrix
257  , bool SO > // Storage order of the matrix
258 BLAZE_ALWAYS_INLINE typename MT::Iterator end( Matrix<MT,SO>& matrix, size_t i )
259 {
260  return (~matrix).end(i);
261 }
262 //*************************************************************************************************
263 
264 
265 //*************************************************************************************************
277 template< typename MT // Type of the matrix
278  , bool SO > // Storage order of the matrix
279 BLAZE_ALWAYS_INLINE typename MT::ConstIterator end( const Matrix<MT,SO>& matrix, size_t i )
280 {
281  return (~matrix).end(i);
282 }
283 //*************************************************************************************************
284 
285 
286 //*************************************************************************************************
298 template< typename MT // Type of the matrix
299  , bool SO > // Storage order of the matrix
300 BLAZE_ALWAYS_INLINE typename MT::ConstIterator cend( const Matrix<MT,SO>& matrix, size_t i )
301 {
302  return (~matrix).cend(i);
303 }
304 //*************************************************************************************************
305 
306 
307 //*************************************************************************************************
314 template< typename MT // Type of the matrix
315  , bool SO > // Storage order of the matrix
316 BLAZE_ALWAYS_INLINE size_t rows( const Matrix<MT,SO>& matrix )
317 {
318  return (~matrix).rows();
319 }
320 //*************************************************************************************************
321 
322 
323 //*************************************************************************************************
330 template< typename MT // Type of the matrix
331  , bool SO > // Storage order of the matrix
333 {
334  return (~matrix).columns();
335 }
336 //*************************************************************************************************
337 
338 
339 //*************************************************************************************************
346 template< typename MT // Type of the matrix
347  , bool SO > // Storage order of the matrix
349 {
350  return (~matrix).capacity();
351 }
352 //*************************************************************************************************
353 
354 
355 //*************************************************************************************************
368 template< typename MT // Type of the matrix
369  , bool SO > // Storage order of the matrix
370 BLAZE_ALWAYS_INLINE size_t capacity( const Matrix<MT,SO>& matrix, size_t i )
371 {
372  return (~matrix).capacity( i );
373 }
374 //*************************************************************************************************
375 
376 
377 //*************************************************************************************************
384 template< typename MT // Type of the matrix
385  , bool SO > // Storage order of the matrix
387 {
388  return (~matrix).nonZeros();
389 }
390 //*************************************************************************************************
391 
392 
393 //*************************************************************************************************
406 template< typename MT // Type of the matrix
407  , bool SO > // Storage order of the matrix
408 BLAZE_ALWAYS_INLINE size_t nonZeros( const Matrix<MT,SO>& matrix, size_t i )
409 {
410  return (~matrix).nonZeros( i );
411 }
412 //*************************************************************************************************
413 
414 
415 //*************************************************************************************************
431 template< typename MT // Type of the matrix
432  , bool SO > // Storage order of the matrix
433 BLAZE_ALWAYS_INLINE typename DisableIf< IsResizable<MT> >::Type
434  resize_backend( Matrix<MT,SO>& matrix, size_t m, size_t n, bool preserve )
435 {
436  UNUSED_PARAMETER( preserve );
437 
438  if( (~matrix).rows() != m || (~matrix).columns() != n )
439  throw std::invalid_argument( "Matrix cannot be resized" );
440 }
442 //*************************************************************************************************
443 
444 
445 //*************************************************************************************************
457 template< typename MT // Type of the matrix
458  , bool SO > // Storage order of the matrix
459 BLAZE_ALWAYS_INLINE typename EnableIf< And< IsResizable<MT>, Not< IsSquare<MT> > > >::Type
460  resize_backend( Matrix<MT,SO>& matrix, size_t m, size_t n, bool preserve )
461 {
462  (~matrix).resize( m, n, preserve );
463 }
465 //*************************************************************************************************
466 
467 
468 //*************************************************************************************************
481 template< typename MT // Type of the matrix
482  , bool SO > // Storage order of the matrix
483 BLAZE_ALWAYS_INLINE typename EnableIf< And< IsResizable<MT>, IsSquare<MT> > >::Type
484  resize_backend( Matrix<MT,SO>& matrix, size_t m, size_t n, bool preserve )
485 {
486  if( m != n )
487  throw std::invalid_argument( "Invalid resize arguments for square matrix" );
488 
489  (~matrix).resize( m, preserve );
490 }
492 //*************************************************************************************************
493 
494 
495 //*************************************************************************************************
533 template< typename MT // Type of the matrix
534  , bool SO > // Storage order of the matrix
535 BLAZE_ALWAYS_INLINE void resize( Matrix<MT,SO>& matrix, size_t m, size_t n, bool preserve )
536 {
537  resize_backend( matrix, m, n, preserve );
538 }
539 //*************************************************************************************************
540 
541 
542 //*************************************************************************************************
551 template< typename MT1 // Type of the left-hand side matrix
552  , typename MT2 // Type of the right-hand side matrix
553  , bool SO > // Storage order of both matrices
554 BLAZE_ALWAYS_INLINE void assign_backend( Matrix<MT1,SO>& lhs, const Matrix<MT2,SO>& rhs )
555 {
557 
558  (~lhs).assign( ~rhs );
559 }
561 //*************************************************************************************************
562 
563 
564 //*************************************************************************************************
573 template< typename MT1 // Type of the left-hand side matrix
574  , bool SO // Storage order of the left-hand side matrix
575  , typename MT2 > // Type of the right-hand side matrix
576 BLAZE_ALWAYS_INLINE typename DisableIf< IsSymmetric<MT2> >::Type
577  assign_backend( Matrix<MT1,SO>& lhs, const Matrix<MT2,!SO>& rhs )
578 {
580 
582 
583  (~lhs).assign( ~rhs );
584 }
586 //*************************************************************************************************
587 
588 
589 //*************************************************************************************************
599 template< typename MT1 // Type of the left-hand side matrix
600  , bool SO // Storage order of the left-hand side matrix
601  , typename MT2 > // Type of the right-hand side matrix
602 BLAZE_ALWAYS_INLINE typename EnableIf< IsSymmetric<MT2> >::Type
603  assign_backend( Matrix<MT1,SO>& lhs, const Matrix<MT2,!SO>& rhs )
604 {
606 
608 
609  BLAZE_INTERNAL_ASSERT( isSquare( ~rhs ), "Non-square symmetric matrix detected" );
610 
611  (~lhs).assign( trans( ~rhs ) );
612 }
614 //*************************************************************************************************
615 
616 
617 //*************************************************************************************************
631 template< typename MT1 // Type of the left-hand side matrix
632  , bool SO1 // Storage order of the left-hand side matrix
633  , typename MT2 // Type of the right-hand side matrix
634  , bool SO2 > // Storage order of the right-hand side matrix
636 {
638 
639  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == (~rhs).rows() , "Invalid number of rows" );
640  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == (~rhs).columns(), "Invalid number of columns" );
641 
642  assign_backend( ~lhs, ~rhs );
643 }
644 //*************************************************************************************************
645 
646 
647 //*************************************************************************************************
657 template< typename MT1 // Type of the left-hand side matrix
658  , typename MT2 // Type of the right-hand side matrix
659  , bool SO > // Storage order of both matrices
660 BLAZE_ALWAYS_INLINE void addAssign_backend( Matrix<MT1,SO>& lhs, const Matrix<MT2,SO>& rhs )
661 {
663 
664  (~lhs).addAssign( ~rhs );
665 }
667 //*************************************************************************************************
668 
669 
670 //*************************************************************************************************
680 template< typename MT1 // Type of the left-hand side matrix
681  , bool SO // Storage order of the left-hand side matrix
682  , typename MT2 > // Type of the right-hand side matrix
683 BLAZE_ALWAYS_INLINE typename DisableIf< IsSymmetric<MT2> >::Type
684  addAssign_backend( Matrix<MT1,SO>& lhs, const Matrix<MT2,!SO>& rhs )
685 {
687 
689 
690  (~lhs).addAssign( ~rhs );
691 }
693 //*************************************************************************************************
694 
695 
696 //*************************************************************************************************
706 template< typename MT1 // Type of the left-hand side matrix
707  , bool SO // Storage order of the left-hand side matrix
708  , typename MT2 > // Type of the right-hand side matrix
709 BLAZE_ALWAYS_INLINE typename EnableIf< IsSymmetric<MT2> >::Type
710  addAssign_backend( Matrix<MT1,SO>& lhs, const Matrix<MT2,!SO>& rhs )
711 {
713 
715 
716  BLAZE_INTERNAL_ASSERT( isSquare( ~rhs ), "Non-square symmetric matrix detected" );
717 
718  (~lhs).addAssign( trans( ~rhs ) );
719 }
721 //*************************************************************************************************
722 
723 
724 //*************************************************************************************************
738 template< typename MT1 // Type of the left-hand side matrix
739  , bool SO1 // Storage order of the left-hand side matrix
740  , typename MT2 // Type of the right-hand side matrix
741  , bool SO2 > // Storage order of the right-hand side matrix
743 {
745 
746  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == (~rhs).rows() , "Invalid number of rows" );
747  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == (~rhs).columns(), "Invalid number of columns" );
748 
749  addAssign_backend( ~lhs, ~rhs );
750 }
751 //*************************************************************************************************
752 
753 
754 //*************************************************************************************************
764 template< typename MT1 // Type of the left-hand side matrix
765  , typename MT2 // Type of the right-hand side matrix
766  , bool SO > // Storage order of both matrices
767 BLAZE_ALWAYS_INLINE void subAssign_backend( Matrix<MT1,SO>& lhs, const Matrix<MT2,SO>& rhs )
768 {
770 
771  (~lhs).subAssign( ~rhs );
772 }
774 //*************************************************************************************************
775 
776 
777 //*************************************************************************************************
787 template< typename MT1 // Type of the left-hand side matrix
788  , bool SO // Storage order of the left-hand side matrix
789  , typename MT2 > // Type of the right-hand side matrix
790 BLAZE_ALWAYS_INLINE typename DisableIf< IsSymmetric<MT2> >::Type
791  subAssign_backend( Matrix<MT1,SO>& lhs, const Matrix<MT2,!SO>& rhs )
792 {
794 
796 
797  (~lhs).subAssign( ~rhs );
798 }
800 //*************************************************************************************************
801 
802 
803 //*************************************************************************************************
813 template< typename MT1 // Type of the left-hand side matrix
814  , bool SO // Storage order of the left-hand side matrix
815  , typename MT2 > // Type of the right-hand side matrix
816 BLAZE_ALWAYS_INLINE typename EnableIf< IsSymmetric<MT2> >::Type
817  subAssign_backend( Matrix<MT1,SO>& lhs, const Matrix<MT2,!SO>& rhs )
818 {
820 
822 
823  BLAZE_INTERNAL_ASSERT( isSquare( ~rhs ), "Non-square symmetric matrix detected" );
824 
825  (~lhs).subAssign( trans( ~rhs ) );
826 }
828 //*************************************************************************************************
829 
830 
831 //*************************************************************************************************
845 template< typename MT1 // Type of the left-hand side matrix
846  , bool SO1 // Storage order of the left-hand side matrix
847  , typename MT2 // Type of the right-hand side matrix
848  , bool SO2 > // Storage order of the right-hand side matrix
850 {
852 
853  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == (~rhs).rows() , "Invalid number of rows" );
854  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == (~rhs).columns(), "Invalid number of columns" );
855 
856  subAssign_backend( ~lhs, ~rhs );
857 }
858 //*************************************************************************************************
859 
860 
861 //*************************************************************************************************
875 template< typename MT1 // Type of the left-hand side matrix
876  , bool SO1 // Storage order of the left-hand side matrix
877  , typename MT2 // Type of the right-hand side matrix
878  , bool SO2 > // Storage order of the right-hand side matrix
880 {
882 
883  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == (~rhs).rows(), "Invalid matrix sizes" );
884 
885  (~lhs).multAssign( ~rhs );
886 }
887 //*************************************************************************************************
888 
889 
890 //*************************************************************************************************
900 template< typename MT // Type of the matrix
901  , bool SO > // Storage order
903 {
904  return ( IsSquare<MT>::value || (~matrix).rows() == (~matrix).columns() );
905 }
906 //*************************************************************************************************
907 
908 
909 //*************************************************************************************************
942 template< typename MT1 // Type of the left-hand side matrix
943  , bool SO1 // Storage order of the left-hand side matrix
944  , typename MT2 // Type of the right-hand side matrix
945  , bool SO2 > // Storage order of the right-hand side matrix
947 {
948  return ( IsSame<MT1,MT2>::value &&
949  reinterpret_cast<const void*>( &a ) == reinterpret_cast<const void*>( &b ) );
950 }
951 //*************************************************************************************************
952 
953 
954 //*************************************************************************************************
969 template< typename MT // Type of the matrix
970  , bool SO > // Storage order
971 BLAZE_ALWAYS_INLINE MT& derestrict( Matrix<MT,SO>& matrix )
972 {
973  return ~matrix;
974 }
976 //*************************************************************************************************
977 
978 } // namespace blaze
979 
980 #endif
BLAZE_ALWAYS_INLINE void multAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the multiplication assignment of a matrix to a matrix.
Definition: Matrix.h:879
Header file for the UNUSED_PARAMETER function template.
Header file for basic type definitions.
BLAZE_ALWAYS_INLINE const MatrixType & operator~() const
Conversion operator for constant matrices.
Definition: Matrix.h:102
BLAZE_ALWAYS_INLINE bool isSquare(const Matrix< MT, SO > &matrix)
Checks if the given matrix is a square matrix.
Definition: Matrix.h:902
BLAZE_ALWAYS_INLINE MT::ConstIterator cbegin(const Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:237
BLAZE_ALWAYS_INLINE MT::ConstIterator cend(const Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:300
BLAZE_ALWAYS_INLINE MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:258
MT MatrixType
Type of the matrix.
Definition: Matrix.h:84
BLAZE_ALWAYS_INLINE bool isSame(const Matrix< MT1, SO1 > &a, const Matrix< MT2, SO2 > &b)
Returns whether the two given matrices represent the same observable state.
Definition: Matrix.h:946
Header file for the IsSame and IsStrictlySame type traits.
BLAZE_ALWAYS_INLINE size_t capacity(const Matrix< MT, SO > &matrix)
Returns the maximum capacity of the matrix.
Definition: Matrix.h:348
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix)
Returns the current number of rows of the matrix.
Definition: Matrix.h:316
void UNUSED_PARAMETER(const T1 &)
Suppression of unused parameter warnings.
Definition: Unused.h:81
Header file for the And class template.
BLAZE_ALWAYS_INLINE size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition: Matrix.h:386
Type relationship analysis.This class tests if the two data types A and B are equal. For this type comparison, the cv-qualifiers of both data types are ignored. If A and B are the same data type (ignoring the cv-qualifiers), then the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType.
Definition: IsSame.h:158
Header file for the IsSquare type trait.
Header file for the DisableIf class template.
Header file for the IsSymmetric type trait.
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
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2511
BLAZE_ALWAYS_INLINE void assign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the assignment of a matrix to a matrix.
Definition: Matrix.h:635
Header file for the Not class template.
BLAZE_ALWAYS_INLINE MatrixType & operator~()
Conversion operator for non-constant matrices.
Definition: Matrix.h:92
Compile time check for square matrices.This type trait tests whether or not the given template parame...
Definition: IsSquare.h:87
BLAZE_ALWAYS_INLINE MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:195
BLAZE_ALWAYS_INLINE void resize(Matrix< MT, SO > &matrix, size_t rows, size_t columns, bool preserve=true)
Changing the size of the matrix.
Definition: Matrix.h:535
Header file for the EnableIf class template.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a symmetric matrix type, a compilation error is created.
Definition: Symmetric.h:116
Header file for run time assertion macros.
BLAZE_ALWAYS_INLINE void addAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the addition assignment of a matrix to a matrix.
Definition: Matrix.h:742
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2510
Base class for matrices.The Matrix class is a base class for all dense and sparse matrix classes with...
Definition: Forward.h:87
Constraint on the data type.
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:937
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:157
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix)
Returns the current number of columns of the matrix.
Definition: Matrix.h:332
Header file for the IsResizable type trait.
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
Header file for the FunctionTrace class.
BLAZE_ALWAYS_INLINE void subAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the subtraction assignment of a matrix to matrix.
Definition: Matrix.h:849