35 #ifndef _BLAZE_MATH_ADAPTORS_HERMITIANMATRIX_DENSE_H_ 36 #define _BLAZE_MATH_ADAPTORS_HERMITIANMATRIX_DENSE_H_ 110 template<
typename MT
112 class HermitianMatrix<MT,SO,true>
113 :
public DenseMatrix< HermitianMatrix<MT,SO,true>, SO >
117 typedef OppositeType_<MT> OT;
118 typedef TransposeType_<MT> TT;
119 typedef ElementType_<MT> ET;
124 typedef HermitianMatrix<MT,SO,true>
This;
125 typedef DenseMatrix<This,SO>
BaseType;
130 typedef SIMDType_<MT> SIMDType;
135 typedef Pointer_<MT> Pointer;
136 typedef ConstPointer_<MT> ConstPointer;
143 template<
typename NewType >
146 typedef HermitianMatrix< typename MT::template Rebind<NewType>::Other > Other;
153 template<
size_t NewM
157 typedef HermitianMatrix< typename MT::template Resize<NewM,NewN>::Other > Other;
168 typedef std::random_access_iterator_tag IteratorCategory;
169 typedef ElementType_<MT> ValueType;
170 typedef HermitianProxy<MT> PointerType;
171 typedef HermitianProxy<MT> ReferenceType;
172 typedef ptrdiff_t DifferenceType;
175 typedef IteratorCategory iterator_category;
176 typedef ValueType value_type;
177 typedef PointerType pointer;
178 typedef ReferenceType reference;
179 typedef DifferenceType difference_type;
213 ( SO )?( row_ += inc ):( column_ += inc );
225 ( SO )?( row_ -= dec ):( column_ -= dec );
235 inline Iterator& operator++() noexcept {
236 ( SO )?( ++row_ ):( ++column_ );
246 inline const Iterator operator++(
int ) noexcept {
258 inline Iterator& operator--() noexcept {
259 ( SO )?( --row_ ):( --column_ );
269 inline const Iterator operator--(
int ) noexcept {
282 return ReferenceType( *matrix_, row_, column_ );
291 inline PointerType operator->()
const {
292 return PointerType( *matrix_, row_, column_ );
306 inline SIMDType load()
const {
307 return (*matrix_).load(row_,column_);
321 inline SIMDType
loada()
const {
322 return (*matrix_).loada(row_,column_);
336 inline SIMDType
loadu()
const {
337 return (*matrix_).loadu(row_,column_);
352 inline void store(
const SIMDType& value )
const {
353 (*matrix_).store( row_, column_, value );
369 inline void storea(
const SIMDType& value )
const {
370 (*matrix_).storea( row_, column_, value );
386 inline void storeu(
const SIMDType& value )
const {
387 (*matrix_).storeu( row_, column_, value );
403 inline void stream(
const SIMDType& value )
const {
404 (*matrix_).stream( row_, column_, value );
416 return matrix_->begin( column_ ) + row_;
418 return matrix_->begin( row_ ) + column_;
430 return ( SO )?( lhs.row_ == rhs.row_ ):( lhs.column_ == rhs.column_ );
466 return ( SO )?( lhs.row_ != rhs.row_ ):( lhs.column_ != rhs.column_ );
502 return ( SO )?( lhs.row_ < rhs.row_ ):( lhs.column_ < rhs.column_ );
538 return ( SO )?( lhs.row_ > rhs.row_ ):( lhs.column_ > rhs.column_ );
574 return ( SO )?( lhs.row_ <= rhs.row_ ):( lhs.column_ <= rhs.column_ );
610 return ( SO )?( lhs.row_ >= rhs.row_ ):( lhs.column_ >= rhs.column_ );
645 return ( SO )?( row_ - rhs.row_ ):( column_ - rhs.column_ );
658 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
660 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
673 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
675 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
688 return Iterator( *it.matrix_, it.row_ - dec, it.column_ );
690 return Iterator( *it.matrix_, it.row_, it.column_ - dec );
702 const size_t kend(
min( row_+SIMDSIZE, (*matrix_).rows() ) );
703 for(
size_t k=row_; k<kend; ++k )
704 (*matrix_)(column_,k) =
conj( (*matrix_)(k,column_) );
707 const size_t kend(
min( column_+SIMDSIZE, (*matrix_).columns() ) );
708 for(
size_t k=column_; k<kend; ++k )
709 (*matrix_)(k,row_) =
conj( (*matrix_)(row_,k) );
724 enum :
bool { simdEnabled = MT::simdEnabled };
727 enum :
bool { smpAssignable = MT::smpAssignable };
733 explicit inline HermitianMatrix();
734 explicit inline HermitianMatrix(
size_t n );
735 explicit inline HermitianMatrix( initializer_list< initializer_list<ElementType> > list );
737 template<
typename Other >
738 explicit inline HermitianMatrix(
size_t n,
const Other* array );
740 template<
typename Other,
size_t N >
741 explicit inline HermitianMatrix(
const Other (&array)[N][N] );
743 explicit inline HermitianMatrix( ElementType* ptr,
size_t n );
744 explicit inline HermitianMatrix( ElementType* ptr,
size_t n,
size_t nn );
746 template<
typename Deleter >
747 explicit inline HermitianMatrix( ElementType* ptr,
size_t n, Deleter d );
749 template<
typename Deleter >
750 explicit inline HermitianMatrix( ElementType* ptr,
size_t n,
size_t nn, Deleter d );
752 inline HermitianMatrix(
const HermitianMatrix& m );
753 inline HermitianMatrix( HermitianMatrix&& m ) noexcept;
755 template<
typename MT2,
bool SO2 >
756 inline HermitianMatrix(
const Matrix<MT2,SO2>& m );
767 inline Reference operator()(
size_t i,
size_t j );
768 inline ConstReference operator()(
size_t i,
size_t j )
const;
769 inline Reference at(
size_t i,
size_t j );
770 inline ConstReference at(
size_t i,
size_t j )
const;
771 inline ConstPointer data () const noexcept;
772 inline ConstPointer data (
size_t i ) const noexcept;
774 inline ConstIterator
begin (
size_t i ) const;
775 inline ConstIterator
cbegin(
size_t i ) const;
777 inline ConstIterator
end (
size_t i ) const;
778 inline ConstIterator
cend (
size_t i ) const;
785 inline HermitianMatrix& operator=( initializer_list< initializer_list<ElementType> > list );
787 template< typename Other,
size_t N >
788 inline HermitianMatrix& operator=( const Other (&array)[N][N] );
790 inline HermitianMatrix& operator=( const HermitianMatrix& rhs );
791 inline HermitianMatrix& operator=( HermitianMatrix&& rhs ) noexcept;
793 template< typename MT2,
bool SO2 >
794 inline
DisableIf_< IsComputation<MT2>, HermitianMatrix& > operator=( const Matrix<MT2,SO2>& rhs );
796 template< typename MT2,
bool SO2 >
797 inline
EnableIf_< IsComputation<MT2>, HermitianMatrix& > operator=( const Matrix<MT2,SO2>& rhs );
799 template< typename MT2 >
801 operator=( const Matrix<MT2,!SO>& rhs );
803 template< typename MT2,
bool SO2 >
804 inline
DisableIf_< IsComputation<MT2>, HermitianMatrix& > operator+=( const Matrix<MT2,SO2>& rhs );
806 template< typename MT2,
bool SO2 >
807 inline
EnableIf_< IsComputation<MT2>, HermitianMatrix& > operator+=( const Matrix<MT2,SO2>& rhs );
809 template< typename MT2 >
811 operator+=( const Matrix<MT2,!SO>& rhs );
813 template< typename MT2,
bool SO2 >
814 inline
DisableIf_< IsComputation<MT2>, HermitianMatrix& > operator-=( const Matrix<MT2,SO2>& rhs );
816 template< typename MT2,
bool SO2 >
817 inline
EnableIf_< IsComputation<MT2>, HermitianMatrix& > operator-=( const Matrix<MT2,SO2>& rhs );
819 template< typename MT2 >
821 operator-=( const Matrix<MT2,!SO>& rhs );
823 template< typename MT2,
bool SO2 >
824 inline HermitianMatrix& operator*=( const Matrix<MT2,SO2>& rhs );
826 template< typename Other >
827 inline
EnableIf_< IsNumeric<Other>, HermitianMatrix >& operator*=( Other rhs );
829 template< typename Other >
830 inline
EnableIf_< IsNumeric<Other>, HermitianMatrix >& operator/=( Other rhs );
837 inline
size_t rows() const noexcept;
838 inline
size_t columns() const noexcept;
839 inline
size_t spacing() const noexcept;
840 inline
size_t capacity() const noexcept;
841 inline
size_t capacity(
size_t i ) const noexcept;
843 inline
size_t nonZeros(
size_t i ) const;
845 inline
void reset(
size_t i );
847 void resize (
size_t n,
bool preserve=true );
848 inline
void extend (
size_t n,
bool preserve=true );
849 inline
void reserve(
size_t elements );
850 inline
void swap( HermitianMatrix& m ) noexcept;
860 template< typename Other > inline HermitianMatrix& scale( const Other& scalar );
867 inline
bool isIntact() const noexcept;
874 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
875 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
877 inline
bool isAligned () const noexcept;
878 inline
bool canSMPAssign() const noexcept;
884 inline
void store (
size_t i,
size_t j, const SIMDType& value ) noexcept;
885 inline
void storea(
size_t i,
size_t j, const SIMDType& value ) noexcept;
886 inline
void storeu(
size_t i,
size_t j, const SIMDType& value ) noexcept;
887 inline
void stream(
size_t i,
size_t j, const SIMDType& value ) noexcept;
895 template< typename MT2,
bool SO2, typename T >
896 inline const MT2& construct( const Matrix<MT2,SO2>& m, T );
898 template< typename MT2 >
916 template<
bool RF,
typename MT2,
bool SO2,
bool DF2 >
917 friend bool isDefault(
const HermitianMatrix<MT2,SO2,DF2>& m );
920 template< InversionFlag IF,
typename MT2,
bool SO2 >
921 friend void invert( HermitianMatrix<MT2,SO2,true>& m );
957 template<
typename MT
959 inline HermitianMatrix<MT,SO,true>::HermitianMatrix()
975 template<
typename MT
977 inline HermitianMatrix<MT,SO,true>::HermitianMatrix(
size_t n )
978 : matrix_( n, n, ElementType() )
1015 template<
typename MT
1017 inline HermitianMatrix<MT,SO,true>::HermitianMatrix( initializer_list< initializer_list<ElementType> > list )
1059 template<
typename MT
1061 template<
typename Other >
1062 inline HermitianMatrix<MT,SO,true>::HermitianMatrix(
size_t n,
const Other* array )
1063 : matrix_( n, n, array )
1100 template<
typename MT
1102 template<
typename Other
1104 inline HermitianMatrix<MT,SO,true>::HermitianMatrix(
const Other (&array)[N][N] )
1138 template<
typename MT
1140 inline HermitianMatrix<MT,SO,true>::HermitianMatrix( ElementType* ptr,
size_t n )
1141 : matrix_( ptr, n, n )
1176 template<
typename MT
1178 inline HermitianMatrix<MT,SO,true>::HermitianMatrix( ElementType* ptr,
size_t n,
size_t nn )
1179 : matrix_( ptr, n, n, nn )
1212 template<
typename MT
1214 template<
typename Deleter >
1215 inline HermitianMatrix<MT,SO,true>::HermitianMatrix( ElementType* ptr,
size_t n, Deleter d )
1216 : matrix_( ptr, n, n, d )
1250 template<
typename MT
1252 template<
typename Deleter >
1253 inline HermitianMatrix<MT,SO,true>::HermitianMatrix( ElementType* ptr,
size_t n,
size_t nn, Deleter d )
1254 : matrix_( ptr, n, n, nn, d )
1272 template<
typename MT
1274 inline HermitianMatrix<MT,SO,true>::HermitianMatrix(
const HermitianMatrix& m )
1275 : matrix_( m.matrix_ )
1290 template<
typename MT
1292 inline HermitianMatrix<MT,SO,true>::HermitianMatrix( HermitianMatrix&& m ) noexcept
1293 : matrix_( std::move( m.matrix_ ) )
1312 template<
typename MT
1314 template<
typename MT2
1316 inline HermitianMatrix<MT,SO,true>::HermitianMatrix(
const Matrix<MT2,SO2>& m )
1317 : matrix_( construct( m, typename IsBuiltin<
ElementType_<MT2> >::Type() ) )
1319 if( !IsHermitian<MT2>::value && !
isHermitian( matrix_ ) ) {
1353 template<
typename MT
1356 HermitianMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
1383 template<
typename MT
1386 HermitianMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
const 1391 return matrix_(i,j);
1414 template<
typename MT
1417 HermitianMatrix<MT,SO,true>::at(
size_t i,
size_t j )
1425 return (*
this)(i,j);
1448 template<
typename MT
1451 HermitianMatrix<MT,SO,true>::at(
size_t i,
size_t j )
const 1459 return (*
this)(i,j);
1479 template<
typename MT
1481 inline typename HermitianMatrix<MT,SO,true>::ConstPointer
1482 HermitianMatrix<MT,SO,true>::data() const noexcept
1484 return matrix_.data();
1501 template<
typename MT
1503 inline typename HermitianMatrix<MT,SO,true>::ConstPointer
1504 HermitianMatrix<MT,SO,true>::data(
size_t i )
const noexcept
1506 return matrix_.data(i);
1524 template<
typename MT
1530 return Iterator( matrix_, 0UL, i );
1532 return Iterator( matrix_, i, 0UL );
1550 template<
typename MT
1555 return matrix_.begin(i);
1573 template<
typename MT
1578 return matrix_.cbegin(i);
1596 template<
typename MT
1622 template<
typename MT
1627 return matrix_.end(i);
1645 template<
typename MT
1650 return matrix_.cend(i);
1690 template<
typename MT
1692 inline HermitianMatrix<MT,SO,true>&
1693 HermitianMatrix<MT,SO,true>::operator=( initializer_list< initializer_list<ElementType> > list )
1701 matrix_ = std::move( tmp );
1738 template<
typename MT
1740 template<
typename Other
1742 inline HermitianMatrix<MT,SO,true>&
1743 HermitianMatrix<MT,SO,true>::operator=(
const Other (&array)[N][N] )
1751 matrix_ = std::move( tmp );
1772 template<
typename MT
1774 inline HermitianMatrix<MT,SO,true>&
1775 HermitianMatrix<MT,SO,true>::operator=(
const HermitianMatrix& rhs )
1777 matrix_ = rhs.matrix_;
1795 template<
typename MT
1797 inline HermitianMatrix<MT,SO,true>&
1798 HermitianMatrix<MT,SO,true>::operator=( HermitianMatrix&& rhs ) noexcept
1800 matrix_ = std::move( rhs.matrix_ );
1824 template<
typename MT
1826 template<
typename MT2
1828 inline DisableIf_< IsComputation<MT2>, HermitianMatrix<MT,SO,true>& >
1829 HermitianMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1831 if( !IsHermitian<MT2>::value && !
isHermitian( ~rhs ) ) {
1859 template<
typename MT
1861 template<
typename MT2
1863 inline EnableIf_< IsComputation<MT2>, HermitianMatrix<MT,SO,true>& >
1864 HermitianMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1866 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1870 if( IsHermitian<MT2>::value ) {
1880 matrix_ = std::move( tmp );
1905 template<
typename MT
1907 template<
typename MT2 >
1908 inline EnableIf_< IsBuiltin< ElementType_<MT2> >, HermitianMatrix<MT,SO,true>& >
1909 HermitianMatrix<MT,SO,true>::operator=(
const Matrix<MT2,!SO>& rhs )
1911 return this->operator=(
trans( ~rhs ) );
1930 template<
typename MT
1932 template<
typename MT2
1934 inline DisableIf_< IsComputation<MT2>, HermitianMatrix<MT,SO,true>& >
1937 if( !IsHermitian<MT2>::value && !
isHermitian( ~rhs ) ) {
1965 template<
typename MT
1967 template<
typename MT2
1969 inline EnableIf_< IsComputation<MT2>, HermitianMatrix<MT,SO,true>& >
1972 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1976 if( IsHermitian<MT2>::value ) {
1980 const ResultType_<MT2> tmp( ~rhs );
2012 template<
typename MT
2014 template<
typename MT2 >
2015 inline EnableIf_< IsBuiltin< ElementType_<MT2> >, HermitianMatrix<MT,SO,true>& >
2037 template<
typename MT
2039 template<
typename MT2
2041 inline DisableIf_< IsComputation<MT2>, HermitianMatrix<MT,SO,true>& >
2044 if( !IsHermitian<MT2>::value && !
isHermitian( ~rhs ) ) {
2072 template<
typename MT
2074 template<
typename MT2
2076 inline EnableIf_< IsComputation<MT2>, HermitianMatrix<MT,SO,true>& >
2079 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
2083 if( IsHermitian<MT2>::value ) {
2087 const ResultType_<MT2> tmp( ~rhs );
2119 template<
typename MT
2121 template<
typename MT2 >
2122 inline EnableIf_< IsBuiltin< ElementType_<MT2> >, HermitianMatrix<MT,SO,true>& >
2143 template<
typename MT
2145 template<
typename MT2
2147 inline HermitianMatrix<MT,SO,true>&
2150 if( matrix_.rows() != (~rhs).
columns() ) {
2154 MT tmp( matrix_ * ~rhs );
2160 matrix_ = std::move( tmp );
2179 template<
typename MT
2181 template<
typename Other >
2182 inline EnableIf_< IsNumeric<Other>, HermitianMatrix<MT,SO,true> >&
2199 template<
typename MT
2201 template<
typename Other >
2202 inline EnableIf_< IsNumeric<Other>, HermitianMatrix<MT,SO,true> >&
2228 template<
typename MT
2232 return matrix_.rows();
2244 template<
typename MT
2248 return matrix_.columns();
2266 template<
typename MT
2270 return matrix_.spacing();
2282 template<
typename MT
2286 return matrix_.capacity();
2303 template<
typename MT
2307 return matrix_.capacity(i);
2319 template<
typename MT
2323 return matrix_.nonZeros();
2341 template<
typename MT
2345 return matrix_.nonZeros(i);
2357 template<
typename MT
2403 template<
typename MT
2407 row ( matrix_, i ).reset();
2408 column( matrix_, i ).reset();
2426 template<
typename MT
2473 template<
typename MT
2483 const size_t oldsize( matrix_.rows() );
2485 matrix_.resize( n, n,
true );
2488 const size_t increment( n - oldsize );
2489 submatrix( matrix_, 0UL, oldsize, oldsize, increment ).reset();
2490 submatrix( matrix_, oldsize, 0UL, increment, n ).reset();
2510 template<
typename MT
2512 inline void HermitianMatrix<MT,SO,true>::extend(
size_t n,
bool preserve )
2533 template<
typename MT
2535 inline void HermitianMatrix<MT,SO,true>::reserve(
size_t elements )
2537 matrix_.reserve( elements );
2550 template<
typename MT
2556 swap( matrix_, m.matrix_ );
2576 template<
typename MT
2580 if( IsComplex<ElementType>::value )
2581 matrix_.transpose();
2594 template<
typename MT
2611 template<
typename MT
2613 template<
typename Other >
2614 inline HermitianMatrix<MT,SO,true>&
2615 HermitianMatrix<MT,SO,true>::scale(
const Other& scalar )
2617 matrix_.scale( scalar );
2642 template<
typename MT
2673 template<
typename MT
2675 template<
typename Other >
2676 inline bool HermitianMatrix<MT,SO,true>::canAlias(
const Other* alias )
const noexcept
2678 return matrix_.canAlias( alias );
2695 template<
typename MT
2697 template<
typename Other >
2698 inline bool HermitianMatrix<MT,SO,true>::isAliased(
const Other* alias )
const noexcept
2700 return matrix_.isAliased( alias );
2716 template<
typename MT
2718 inline bool HermitianMatrix<MT,SO,true>::isAligned() const noexcept
2720 return matrix_.isAligned();
2737 template<
typename MT
2739 inline bool HermitianMatrix<MT,SO,true>::canSMPAssign() const noexcept
2741 return matrix_.canSMPAssign();
2763 template<
typename MT
2766 HermitianMatrix<MT,SO,true>::load(
size_t i,
size_t j )
const noexcept
2768 return matrix_.load( i, j );
2790 template<
typename MT
2795 return matrix_.loada( i, j );
2817 template<
typename MT
2822 return matrix_.loadu( i, j );
2845 template<
typename MT
2848 HermitianMatrix<MT,SO,true>::store(
size_t i,
size_t j,
const SIMDType& value ) noexcept
2850 matrix_.store( i, j, value );
2853 const size_t kend(
min( i+SIMDSIZE,
rows() ) );
2854 for(
size_t k=i; k<kend; ++k )
2855 matrix_(j,k) =
conj( matrix_(k,j) );
2858 const size_t kend(
min( j+SIMDSIZE,
columns() ) );
2859 for(
size_t k=j; k<kend; ++k )
2860 matrix_(k,i) =
conj( matrix_(i,k) );
2884 template<
typename MT
2889 matrix_.storea( i, j, value );
2892 const size_t kend(
min( i+SIMDSIZE,
rows() ) );
2893 for(
size_t k=i; k<kend; ++k )
2894 matrix_(j,k) =
conj( matrix_(k,j) );
2897 const size_t kend(
min( j+SIMDSIZE,
columns() ) );
2898 for(
size_t k=j; k<kend; ++k )
2899 matrix_(k,i) =
conj( matrix_(i,k) );
2923 template<
typename MT
2928 matrix_.storeu( i, j, value );
2931 const size_t kend(
min( i+SIMDSIZE,
rows() ) );
2932 for(
size_t k=i; k<kend; ++k )
2933 matrix_(j,k) =
conj( matrix_(k,j) );
2936 const size_t kend(
min( j+SIMDSIZE,
columns() ) );
2937 for(
size_t k=j; k<kend; ++k )
2938 matrix_(k,i) =
conj( matrix_(i,k) );
2962 template<
typename MT
2967 matrix_.stream( i, j, value );
2970 const size_t kend(
min( i+SIMDSIZE,
rows() ) );
2971 for(
size_t k=i; k<kend; ++k )
2972 matrix_(j,k) =
conj( matrix_(k,j) );
2975 const size_t kend(
min( j+SIMDSIZE,
columns() ) );
2976 for(
size_t k=j; k<kend; ++k )
2977 matrix_(k,i) =
conj( matrix_(i,k) );
2994 template<
typename MT
2996 template<
typename MT2
2999 inline const MT2& HermitianMatrix<MT,SO,true>::construct(
const Matrix<MT2,SO2>& m, T )
3009 template<
typename MT
3011 template<
typename MT2 >
3012 inline TransExprTrait_<MT2>
3013 HermitianMatrix<MT,SO,true>::construct(
const Matrix<MT2,!SO>& m,
TrueType )
Header file for the implementation of the Submatrix view.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.In case the given data type is a const-qualified type, a compilation error is created.
Definition: Const.h:79
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.This macro encapsulates the default way o...
Definition: Exception.h:235
BLAZE_ALWAYS_INLINE size_t spacing(const DenseMatrix< MT, SO > &dm) noexcept
Returns the spacing between the beginning of two rows/columns.
Definition: DenseMatrix.h:102
const DMatForEachExpr< MT, Conj, SO > conj(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the complex conjugate of each single element of dm.
Definition: DMatForEachExpr.h:1214
Header file for auxiliary alias declarations.
Constraint on the data type.
Header file for mathematical functions.
#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
Header file for the Rows type trait.
Header file for the UNUSED_PARAMETER function template.
BLAZE_ALWAYS_INLINE size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:352
Header file for basic type definitions.
BLAZE_ALWAYS_INLINE EnableIf_< And< IsIntegral< T1 >, HasSize< T1, 1UL > > > storea(T1 *address, const SIMDi8< T2 > &value) noexcept
Aligned store of a vector of 1-byte integral values.
Definition: Storea.h:79
#define BLAZE_CONSTRAINT_MUST_BE_MATRIX_WITH_STORAGE_ORDER(T, SO)
Constraint on the data type.In case the given data type T is not a dense or sparse matrix type and in...
Definition: StorageOrder.h:63
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector) noexcept
Returns the current size/dimension of the vector.
Definition: Vector.h:261
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional matrix type...
Definition: DenseMatrix.h:61
constexpr bool operator<(const NegativeAccuracy< A > &lhs, const T &rhs)
Less-than comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:329
BLAZE_ALWAYS_INLINE T1 & operator/=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Division assignment operator for the division of two SIMD packs.
Definition: BasicTypes.h:1339
Constraint on the data type.
Header file for the dense matrix inversion flags.
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:194
Constraint on the data type.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:533
const DenseIterator< Type, AF > operator+(const DenseIterator< Type, AF > &it, ptrdiff_t inc) noexcept
Addition between a DenseIterator and an integral value.
Definition: DenseIterator.h:699
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2935
typename DisableIf< Condition, T >::Type DisableIf_
Auxiliary type for the DisableIf class template.The DisableIf_ alias declaration provides a convenien...
Definition: DisableIf.h:223
void clear(CompressedMatrix< Type, SO > &m)
Clearing the given compressed matrix.
Definition: CompressedMatrix.h:5556
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1755
BLAZE_ALWAYS_INLINE void ctranspose(Matrix< MT, SO > &matrix)
In-place conjugate transpose of the given matrix.
Definition: Matrix.h:596
CompressedMatrix< Type, true > This
Type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:2928
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.In case the given data type is a volatile-qualified type, a compilation error is created.
Definition: Volatile.h:79
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:390
const DenseIterator< Type, AF > operator-(const DenseIterator< Type, AF > &it, ptrdiff_t inc) noexcept
Subtraction between a DenseIterator and an integral value.
Definition: DenseIterator.h:731
BoolConstant< true > TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: TrueType.h:61
BLAZE_ALWAYS_INLINE T1 & operator*=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Multiplication assignment operator for the multiplication of two SIMD packs.
Definition: BasicTypes.h:1321
Constraint on the data type.
BLAZE_ALWAYS_INLINE const EnableIf_< And< IsIntegral< T >, HasSize< T, 1UL > >, If_< IsSigned< T >, SIMDint8, SIMDuint8 > > loadu(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition: Loadu.h:77
CompressedMatrix< Type, false > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CompressedMatrix.h:2931
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:304
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:238
Constraint on the data type.
Constraint on the data type.
Header file for the std::initializer_list aliases.
Header file for the IsSquare type trait.
Constraint on the data type.
void invert(const HermitianProxy< MT > &proxy)
In-place inversion of the represented element.
Definition: HermitianProxy.h:741
typename TransExprTrait< T >::Type TransExprTrait_
Auxiliary alias declaration for the TransExprTrait class template.The TransExprTrait_ alias declarati...
Definition: TransExprTrait.h:143
Header file for the DisableIf class template.
Header file for the clear shim.
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 swap(CompressedMatrix< Type, SO > &a, CompressedMatrix< Type, SO > &b) noexcept
Swapping the contents of two compressed matrices.
Definition: CompressedMatrix.h:5635
Header file for the If class template.
bool isIntact(const CompressedMatrix< Type, SO > &m)
Returns whether the invariants of the given compressed matrix are intact.
Definition: CompressedMatrix.h:5618
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2939
#define BLAZE_CONSTRAINT_MUST_NOT_BE_POINTER_TYPE(T)
Constraint on the data type.In case the given data type T is not a pointer type, a compilation error ...
Definition: Pointer.h:79
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
Header file for the DenseMatrix base class.
Header file for the Columns type trait.
constexpr bool operator>(const NegativeAccuracy< A > &lhs, const T &rhs)
Greater-than comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:367
constexpr bool operator>=(const NegativeAccuracy< A > &, const T &rhs)
Greater-or-equal-than comparison between a NegativeAccuracy object and a floating point value...
Definition: Accuracy.h:443
constexpr bool operator==(const NegativeAccuracy< A > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value. ...
Definition: Accuracy.h:250
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
Header file for all SIMD functionality.
Constraint on the data type.
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:336
BLAZE_ALWAYS_INLINE const EnableIf_< And< IsIntegral< T >, HasSize< T, 1UL > >, If_< IsSigned< T >, SIMDint8, SIMDuint8 > > loada(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition: Loada.h:80
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT >, IsDeclExpr< MT > >, RowExprTrait_< MT > > row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:128
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2932
Constraints on the storage order of matrix types.
Header file for the exception macros of the math module.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UPPER_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a upper triangular matrix type...
Definition: Upper.h:81
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:544
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:260
Type ElementType
Type of the compressed matrix elements.
Definition: CompressedMatrix.h:2933
constexpr bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:290
Header file for the implementation of the base template of the HeritianMatrix.
Header file for all forward declarations for expression class templates.
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:2937
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT >, IsDeclExpr< MT > >, ColumnExprTrait_< MT > > column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:128
Header file for the EnableIf class template.
Header file for utility functions for dense matrices.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:553
Header file for all restructuring column functions.
Header file for the conjugate shim.
Header file for the IsNumeric type trait.
BLAZE_ALWAYS_INLINE EnableIf_< And< IsIntegral< T1 >, HasSize< T1, 1UL > > > stream(T1 *address, const SIMDi8< T2 > &value) noexcept
Aligned, non-temporal store of a vector of 1-byte integral values.
Definition: Stream.h:75
#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:79
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2934
BLAZE_ALWAYS_INLINE T1 & operator+=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Addition assignment operator for the addition of two SIMD packs.
Definition: BasicTypes.h:1285
Header file for run time assertion macros.
Constraint on the data type.
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_BE_NUMERIC_TYPE(T)
Constraint on the data type.In case the given data type T is not a numeric (integral or floating poin...
Definition: Numeric.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_LOWER_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a lower triangular matrix type...
Definition: Lower.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type, a compilation error is created.
Definition: Reference.h:79
bool isHermitian(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is Hermitian.
Definition: DenseMatrix.h:775
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2938
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:267
Header file for the TransExprTrait class template.
Constraint on the data type.
Constraint on the data type.
constexpr bool operator<=(const NegativeAccuracy< A > &, const T &rhs)
Less-or-equal-than comparison between a NegativeAccuracy object and a floating point value...
Definition: Accuracy.h:405
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:223
BLAZE_ALWAYS_INLINE EnableIf_< And< IsIntegral< T1 >, HasSize< T1, 1UL > > > storeu(T1 *address, const SIMDi8< T2 > &value) noexcept
Unaligned store of a vector of 1-byte integral values.
Definition: Storeu.h:76
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:320
SparseMatrix< This, true > BaseType
Base type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:2929
#define BLAZE_CONSTRAINT_MUST_BE_RESIZABLE(T)
Constraint on the data type.In case the given data type T is not resizable, i.e. does not have a 'res...
Definition: Resizable.h:61
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:733
Header file for the IsComputation type trait class.
Header file for the IsBuiltin type trait.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_EXPRESSION_TYPE(T)
Constraint on the data type.In case the given data type T is an expression (i.e. a type derived from ...
Definition: Expression.h:81
Header file for the HermitianProxy class.
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2930
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:249
Header file for the IsComplex type trait.
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:573
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2936
#define BLAZE_CONSTRAINT_MUST_NOT_BE_HERMITIAN_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is an Hermitian matrix type, a compilation error is created.
Definition: Hermitian.h:79
BLAZE_ALWAYS_INLINE T1 & operator-=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Subtraction assignment operator for the subtraction of two SIMD packs.
Definition: BasicTypes.h:1303
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.In case of an invalid compile time expression, a compilation error is cr...
Definition: StaticAssert.h:112
SubmatrixExprTrait_< MT, unaligned > submatrix(Matrix< MT, SO > &matrix, size_t row, size_t column, size_t m, size_t n)
Creating a view on a specific submatrix of the given matrix.
Definition: Submatrix.h:168
Header file for the IsHermitian type trait.
BLAZE_ALWAYS_INLINE bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:677
const DMatDMatMultExpr< T1, T2, false, false, false, false > operator*(const DenseMatrix< T1, false > &lhs, const DenseMatrix< T2, false > &rhs)
Multiplication operator for the multiplication of two row-major dense matrices ( ).
Definition: DMatDMatMultExpr.h:7505
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 implementation of the Row view.
Header file for the TrueType type/value trait base class.
BLAZE_ALWAYS_INLINE void transpose(Matrix< MT, SO > &matrix)
In-place transpose of the given matrix.
Definition: Matrix.h:570