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 ET >
146 typedef HermitianMatrix< typename MT::template Rebind<ET>::Other > Other;
157 typedef std::random_access_iterator_tag IteratorCategory;
158 typedef ElementType_<MT> ValueType;
159 typedef HermitianProxy<MT> PointerType;
160 typedef HermitianProxy<MT> ReferenceType;
161 typedef ptrdiff_t DifferenceType;
164 typedef IteratorCategory iterator_category;
165 typedef ValueType value_type;
166 typedef PointerType pointer;
167 typedef ReferenceType reference;
168 typedef DifferenceType difference_type;
202 ( SO )?( row_ += inc ):( column_ += inc );
214 ( SO )?( row_ -= dec ):( column_ -= dec );
224 inline Iterator& operator++() noexcept {
225 ( SO )?( ++row_ ):( ++column_ );
235 inline const Iterator operator++(
int ) noexcept {
247 inline Iterator& operator--() noexcept {
248 ( SO )?( --row_ ):( --column_ );
258 inline const Iterator operator--(
int ) noexcept {
271 return ReferenceType( *matrix_, row_, column_ );
280 inline PointerType operator->()
const {
281 return PointerType( *matrix_, row_, column_ );
295 inline SIMDType load()
const {
296 return (*matrix_).load(row_,column_);
310 inline SIMDType
loada()
const {
311 return (*matrix_).loada(row_,column_);
325 inline SIMDType
loadu()
const {
326 return (*matrix_).loadu(row_,column_);
341 inline void store(
const SIMDType& value )
const {
342 (*matrix_).store( row_, column_, value );
358 inline void storea(
const SIMDType& value )
const {
359 (*matrix_).storea( row_, column_, value );
375 inline void storeu(
const SIMDType& value )
const {
376 (*matrix_).storeu( row_, column_, value );
392 inline void stream(
const SIMDType& value )
const {
393 (*matrix_).stream( row_, column_, value );
405 return matrix_->begin( column_ ) + row_;
407 return matrix_->begin( row_ ) + column_;
419 return ( SO )?( lhs.row_ == rhs.row_ ):( lhs.column_ == rhs.column_ );
455 return ( SO )?( lhs.row_ != rhs.row_ ):( lhs.column_ != rhs.column_ );
491 return ( SO )?( lhs.row_ < rhs.row_ ):( lhs.column_ < rhs.column_ );
527 return ( SO )?( lhs.row_ > rhs.row_ ):( lhs.column_ > rhs.column_ );
563 return ( SO )?( lhs.row_ <= rhs.row_ ):( lhs.column_ <= rhs.column_ );
599 return ( SO )?( lhs.row_ >= rhs.row_ ):( lhs.column_ >= rhs.column_ );
634 return ( SO )?( row_ - rhs.row_ ):( column_ - rhs.column_ );
647 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
649 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
662 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
664 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
677 return Iterator( *it.matrix_, it.row_ - dec, it.column_ );
679 return Iterator( *it.matrix_, it.row_, it.column_ - dec );
691 const size_t kend(
min( row_+SIMDSIZE, (*matrix_).rows() ) );
692 for(
size_t k=row_; k<kend; ++k )
693 (*matrix_)(column_,k) =
conj( (*matrix_)(k,column_) );
696 const size_t kend(
min( column_+SIMDSIZE, (*matrix_).columns() ) );
697 for(
size_t k=column_; k<kend; ++k )
698 (*matrix_)(k,row_) =
conj( (*matrix_)(row_,k) );
713 enum :
bool { simdEnabled = MT::simdEnabled };
716 enum :
bool { smpAssignable = MT::smpAssignable };
722 explicit inline HermitianMatrix();
723 explicit inline HermitianMatrix(
size_t n );
724 explicit inline HermitianMatrix( initializer_list< initializer_list<ElementType> > list );
726 template<
typename Other >
727 explicit inline HermitianMatrix(
size_t n,
const Other* array );
729 template<
typename Other,
size_t N >
730 explicit inline HermitianMatrix(
const Other (&array)[N][N] );
732 explicit inline HermitianMatrix( ElementType* ptr,
size_t n );
733 explicit inline HermitianMatrix( ElementType* ptr,
size_t n,
size_t nn );
735 template<
typename Deleter >
736 explicit inline HermitianMatrix( ElementType* ptr,
size_t n, Deleter d );
738 template<
typename Deleter >
739 explicit inline HermitianMatrix( ElementType* ptr,
size_t n,
size_t nn, Deleter d );
741 inline HermitianMatrix(
const HermitianMatrix& m );
742 inline HermitianMatrix( HermitianMatrix&& m ) noexcept;
744 template< typename MT2,
bool SO2 >
745 inline HermitianMatrix( const Matrix<MT2,SO2>& m );
756 inline Reference operator()(
size_t i,
size_t j );
757 inline ConstReference operator()(
size_t i,
size_t j ) const;
758 inline Reference at(
size_t i,
size_t j );
759 inline ConstReference at(
size_t i,
size_t j ) const;
760 inline ConstPointer data () const noexcept;
761 inline ConstPointer data (
size_t i ) const noexcept;
763 inline ConstIterator
begin (
size_t i ) const;
764 inline ConstIterator
cbegin(
size_t i ) const;
766 inline ConstIterator
end (
size_t i ) const;
767 inline ConstIterator
cend (
size_t i ) const;
774 inline HermitianMatrix& operator=( initializer_list< initializer_list<ElementType> > list );
776 template< typename Other,
size_t N >
777 inline HermitianMatrix& operator=( const Other (&array)[N][N] );
779 inline HermitianMatrix& operator=( const HermitianMatrix& rhs );
780 inline HermitianMatrix& operator=( HermitianMatrix&& rhs ) noexcept;
782 template< typename MT2,
bool SO2 >
783 inline
DisableIf_< IsComputation<MT2>, HermitianMatrix& > operator=( const Matrix<MT2,SO2>& rhs );
785 template< typename MT2,
bool SO2 >
786 inline
EnableIf_< IsComputation<MT2>, HermitianMatrix& > operator=( const Matrix<MT2,SO2>& rhs );
788 template< typename MT2 >
790 operator=( const Matrix<MT2,!SO>& rhs );
792 template< typename MT2,
bool SO2 >
793 inline
DisableIf_< IsComputation<MT2>, HermitianMatrix& > operator+=( const Matrix<MT2,SO2>& rhs );
795 template< typename MT2,
bool SO2 >
796 inline
EnableIf_< IsComputation<MT2>, HermitianMatrix& > operator+=( const Matrix<MT2,SO2>& rhs );
798 template< typename MT2 >
800 operator+=( const Matrix<MT2,!SO>& rhs );
802 template< typename MT2,
bool SO2 >
803 inline
DisableIf_< IsComputation<MT2>, HermitianMatrix& > operator-=( const Matrix<MT2,SO2>& rhs );
805 template< typename MT2,
bool SO2 >
806 inline
EnableIf_< IsComputation<MT2>, HermitianMatrix& > operator-=( const Matrix<MT2,SO2>& rhs );
808 template< typename MT2 >
810 operator-=( const Matrix<MT2,!SO>& rhs );
812 template< typename MT2,
bool SO2 >
813 inline HermitianMatrix& operator*=( const Matrix<MT2,SO2>& rhs );
815 template< typename Other >
816 inline
EnableIf_< IsNumeric<Other>, HermitianMatrix >& operator*=( Other rhs );
818 template< typename Other >
819 inline
EnableIf_< IsNumeric<Other>, HermitianMatrix >& operator/=( Other rhs );
826 inline
size_t rows() const noexcept;
827 inline
size_t columns() const noexcept;
828 inline
size_t spacing() const noexcept;
829 inline
size_t capacity() const noexcept;
830 inline
size_t capacity(
size_t i ) const noexcept;
832 inline
size_t nonZeros(
size_t i ) const;
834 inline
void reset(
size_t i );
836 void resize (
size_t n,
bool preserve=true );
837 inline
void extend (
size_t n,
bool preserve=true );
838 inline
void reserve(
size_t elements );
841 template< typename Other > inline HermitianMatrix& scale( const Other& scalar );
842 inline
void swap( HermitianMatrix& m ) noexcept;
849 inline
bool isIntact() const noexcept;
856 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
857 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
859 inline
bool isAligned () const noexcept;
860 inline
bool canSMPAssign() const noexcept;
866 inline
void store (
size_t i,
size_t j, const SIMDType& value ) noexcept;
867 inline
void storea(
size_t i,
size_t j, const SIMDType& value ) noexcept;
868 inline
void storeu(
size_t i,
size_t j, const SIMDType& value ) noexcept;
869 inline
void stream(
size_t i,
size_t j, const SIMDType& value ) noexcept;
877 template< typename MT2,
bool SO2, typename T >
878 inline const MT2& construct( const Matrix<MT2,SO2>& m, T );
880 template< typename MT2 >
898 template<
typename MT2,
bool SO2,
bool DF2 >
899 friend bool isDefault(
const HermitianMatrix<MT2,SO2,DF2>& m );
902 template< InversionFlag IF,
typename MT2,
bool SO2 >
903 friend void invert( HermitianMatrix<MT2,SO2,true>& m );
939 template<
typename MT
941 inline HermitianMatrix<MT,SO,true>::HermitianMatrix()
957 template<
typename MT
959 inline HermitianMatrix<MT,SO,true>::HermitianMatrix(
size_t n )
960 : matrix_( n, n, ElementType() )
997 template<
typename MT
999 inline HermitianMatrix<MT,SO,true>::HermitianMatrix( initializer_list< initializer_list<ElementType> > list )
1041 template<
typename MT
1043 template<
typename Other >
1044 inline HermitianMatrix<MT,SO,true>::HermitianMatrix(
size_t n,
const Other* array )
1045 : matrix_( n, n, array )
1082 template<
typename MT
1084 template<
typename Other
1086 inline HermitianMatrix<MT,SO,true>::HermitianMatrix(
const Other (&array)[N][N] )
1120 template<
typename MT
1122 inline HermitianMatrix<MT,SO,true>::HermitianMatrix( ElementType* ptr,
size_t n )
1123 : matrix_( ptr, n, n )
1158 template<
typename MT
1160 inline HermitianMatrix<MT,SO,true>::HermitianMatrix( ElementType* ptr,
size_t n,
size_t nn )
1161 : matrix_( ptr, n, n, nn )
1194 template<
typename MT
1196 template<
typename Deleter >
1197 inline HermitianMatrix<MT,SO,true>::HermitianMatrix( ElementType* ptr,
size_t n, Deleter d )
1198 : matrix_( ptr, n, n, d )
1232 template<
typename MT
1234 template<
typename Deleter >
1235 inline HermitianMatrix<MT,SO,true>::HermitianMatrix( ElementType* ptr,
size_t n,
size_t nn, Deleter d )
1236 : matrix_( ptr, n, n, nn, d )
1254 template<
typename MT
1256 inline HermitianMatrix<MT,SO,true>::HermitianMatrix(
const HermitianMatrix& m )
1257 : matrix_( m.matrix_ )
1272 template<
typename MT
1274 inline HermitianMatrix<MT,SO,true>::HermitianMatrix( HermitianMatrix&& m ) noexcept
1275 : matrix_(
std::move( m.matrix_ ) )
1294 template<
typename MT
1296 template<
typename MT2
1298 inline HermitianMatrix<MT,SO,true>::HermitianMatrix(
const Matrix<MT2,SO2>& m )
1299 : matrix_( construct( m, typename IsBuiltin<
ElementType_<MT2> >::Type() ) )
1301 if( !IsHermitian<MT2>::value && !
isHermitian( matrix_ ) ) {
1335 template<
typename MT
1338 HermitianMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
1365 template<
typename MT
1368 HermitianMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
const
1373 return matrix_(i,j);
1396 template<
typename MT
1399 HermitianMatrix<MT,SO,true>::at(
size_t i,
size_t j )
1407 return (*
this)(i,j);
1430 template<
typename MT
1433 HermitianMatrix<MT,SO,true>::at(
size_t i,
size_t j )
const
1441 return (*
this)(i,j);
1461 template<
typename MT
1463 inline typename HermitianMatrix<MT,SO,true>::ConstPointer
1464 HermitianMatrix<MT,SO,true>::data() const noexcept
1466 return matrix_.data();
1483 template<
typename MT
1485 inline typename HermitianMatrix<MT,SO,true>::ConstPointer
1486 HermitianMatrix<MT,SO,true>::data(
size_t i )
const noexcept
1488 return matrix_.data(i);
1506 template<
typename MT
1512 return Iterator( matrix_, 0UL, i );
1514 return Iterator( matrix_, i, 0UL );
1532 template<
typename MT
1537 return matrix_.begin(i);
1555 template<
typename MT
1560 return matrix_.cbegin(i);
1578 template<
typename MT
1604 template<
typename MT
1609 return matrix_.end(i);
1627 template<
typename MT
1632 return matrix_.cend(i);
1672 template<
typename MT
1674 inline HermitianMatrix<MT,SO,true>&
1675 HermitianMatrix<MT,SO,true>::operator=( initializer_list< initializer_list<ElementType> > list )
1683 matrix_ = std::move( tmp );
1720 template<
typename MT
1722 template<
typename Other
1724 inline HermitianMatrix<MT,SO,true>&
1725 HermitianMatrix<MT,SO,true>::operator=(
const Other (&array)[N][N] )
1733 matrix_ = std::move( tmp );
1754 template<
typename MT
1756 inline HermitianMatrix<MT,SO,true>&
1757 HermitianMatrix<MT,SO,true>::operator=(
const HermitianMatrix& rhs )
1759 matrix_ = rhs.matrix_;
1777 template<
typename MT
1779 inline HermitianMatrix<MT,SO,true>&
1780 HermitianMatrix<MT,SO,true>::operator=( HermitianMatrix&& rhs ) noexcept
1782 matrix_ = std::move( rhs.matrix_ );
1806 template<
typename MT
1808 template<
typename MT2
1810 inline DisableIf_< IsComputation<MT2>, HermitianMatrix<MT,SO,true>& >
1811 HermitianMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1813 if( !IsHermitian<MT2>::value && !
isHermitian( ~rhs ) ) {
1841 template<
typename MT
1843 template<
typename MT2
1845 inline EnableIf_< IsComputation<MT2>, HermitianMatrix<MT,SO,true>& >
1846 HermitianMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1848 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1852 if( IsHermitian<MT2>::value ) {
1862 matrix_ = std::move( tmp );
1887 template<
typename MT
1889 template<
typename MT2 >
1890 inline EnableIf_< IsBuiltin< ElementType_<MT2> >, HermitianMatrix<MT,SO,true>& >
1891 HermitianMatrix<MT,SO,true>::operator=(
const Matrix<MT2,!SO>& rhs )
1893 return this->operator=(
trans( ~rhs ) );
1912 template<
typename MT
1914 template<
typename MT2
1916 inline DisableIf_< IsComputation<MT2>, HermitianMatrix<MT,SO,true>& >
1919 if( !IsHermitian<MT2>::value && !
isHermitian( ~rhs ) ) {
1947 template<
typename MT
1949 template<
typename MT2
1951 inline EnableIf_< IsComputation<MT2>, HermitianMatrix<MT,SO,true>& >
1954 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1958 if( IsHermitian<MT2>::value ) {
1962 const ResultType_<MT2> tmp( ~rhs );
1994 template<
typename MT
1996 template<
typename MT2 >
1997 inline EnableIf_< IsBuiltin< ElementType_<MT2> >, HermitianMatrix<MT,SO,true>& >
2019 template<
typename MT
2021 template<
typename MT2
2023 inline DisableIf_< IsComputation<MT2>, HermitianMatrix<MT,SO,true>& >
2026 if( !IsHermitian<MT2>::value && !
isHermitian( ~rhs ) ) {
2054 template<
typename MT
2056 template<
typename MT2
2058 inline EnableIf_< IsComputation<MT2>, HermitianMatrix<MT,SO,true>& >
2061 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
2065 if( IsHermitian<MT2>::value ) {
2069 const ResultType_<MT2> tmp( ~rhs );
2101 template<
typename MT
2103 template<
typename MT2 >
2104 inline EnableIf_< IsBuiltin< ElementType_<MT2> >, HermitianMatrix<MT,SO,true>& >
2125 template<
typename MT
2127 template<
typename MT2
2129 inline HermitianMatrix<MT,SO,true>&
2132 if( matrix_.rows() != (~rhs).
columns() ) {
2136 MT tmp( matrix_ * ~rhs );
2142 matrix_ = std::move( tmp );
2161 template<
typename MT
2163 template<
typename Other >
2164 inline EnableIf_< IsNumeric<Other>, HermitianMatrix<MT,SO,true> >&
2181 template<
typename MT
2183 template<
typename Other >
2184 inline EnableIf_< IsNumeric<Other>, HermitianMatrix<MT,SO,true> >&
2210 template<
typename MT
2214 return matrix_.rows();
2226 template<
typename MT
2230 return matrix_.columns();
2248 template<
typename MT
2252 return matrix_.spacing();
2264 template<
typename MT
2268 return matrix_.capacity();
2285 template<
typename MT
2289 return matrix_.capacity(i);
2301 template<
typename MT
2305 return matrix_.nonZeros();
2323 template<
typename MT
2327 return matrix_.nonZeros(i);
2339 template<
typename MT
2385 template<
typename MT
2389 row ( matrix_, i ).reset();
2390 column( matrix_, i ).reset();
2408 template<
typename MT
2455 template<
typename MT
2465 const size_t oldsize( matrix_.rows() );
2467 matrix_.resize( n, n,
true );
2470 const size_t increment( n - oldsize );
2471 submatrix( matrix_, 0UL, oldsize, oldsize, increment ).reset();
2472 submatrix( matrix_, oldsize, 0UL, increment, n ).reset();
2492 template<
typename MT
2494 inline void HermitianMatrix<MT,SO,true>::extend(
size_t n,
bool preserve )
2515 template<
typename MT
2517 inline void HermitianMatrix<MT,SO,true>::reserve(
size_t elements )
2519 matrix_.reserve( elements );
2531 template<
typename MT
2535 if( IsComplex<ElementType>::value )
2536 matrix_.transpose();
2549 template<
typename MT
2566 template<
typename MT
2568 template<
typename Other >
2569 inline HermitianMatrix<MT,SO,true>&
2570 HermitianMatrix<MT,SO,true>::scale(
const Other& scalar )
2572 matrix_.scale( scalar );
2586 template<
typename MT
2592 swap( matrix_, m.matrix_ );
2616 template<
typename MT
2647 template<
typename MT
2649 template<
typename Other >
2650 inline bool HermitianMatrix<MT,SO,true>::canAlias(
const Other* alias )
const noexcept
2652 return matrix_.canAlias( alias );
2669 template<
typename MT
2671 template<
typename Other >
2672 inline bool HermitianMatrix<MT,SO,true>::isAliased(
const Other* alias )
const noexcept
2674 return matrix_.isAliased( alias );
2690 template<
typename MT
2692 inline bool HermitianMatrix<MT,SO,true>::isAligned() const noexcept
2694 return matrix_.isAligned();
2711 template<
typename MT
2713 inline bool HermitianMatrix<MT,SO,true>::canSMPAssign() const noexcept
2715 return matrix_.canSMPAssign();
2737 template<
typename MT
2740 HermitianMatrix<MT,SO,true>::load(
size_t i,
size_t j )
const noexcept
2742 return matrix_.load( i, j );
2764 template<
typename MT
2769 return matrix_.loada( i, j );
2791 template<
typename MT
2796 return matrix_.loadu( i, j );
2819 template<
typename MT
2822 HermitianMatrix<MT,SO,true>::store(
size_t i,
size_t j,
const SIMDType& value ) noexcept
2824 matrix_.store( i, j, value );
2827 const size_t kend(
min( i+SIMDSIZE,
rows() ) );
2828 for(
size_t k=i; k<kend; ++k )
2829 matrix_(j,k) =
conj( matrix_(k,j) );
2832 const size_t kend(
min( j+SIMDSIZE,
columns() ) );
2833 for(
size_t k=j; k<kend; ++k )
2834 matrix_(k,i) =
conj( matrix_(i,k) );
2858 template<
typename MT
2863 matrix_.storea( i, j, value );
2866 const size_t kend(
min( i+SIMDSIZE,
rows() ) );
2867 for(
size_t k=i; k<kend; ++k )
2868 matrix_(j,k) =
conj( matrix_(k,j) );
2871 const size_t kend(
min( j+SIMDSIZE,
columns() ) );
2872 for(
size_t k=j; k<kend; ++k )
2873 matrix_(k,i) =
conj( matrix_(i,k) );
2897 template<
typename MT
2902 matrix_.storeu( i, j, value );
2905 const size_t kend(
min( i+SIMDSIZE,
rows() ) );
2906 for(
size_t k=i; k<kend; ++k )
2907 matrix_(j,k) =
conj( matrix_(k,j) );
2910 const size_t kend(
min( j+SIMDSIZE,
columns() ) );
2911 for(
size_t k=j; k<kend; ++k )
2912 matrix_(k,i) =
conj( matrix_(i,k) );
2936 template<
typename MT
2941 matrix_.stream( i, j, value );
2944 const size_t kend(
min( i+SIMDSIZE,
rows() ) );
2945 for(
size_t k=i; k<kend; ++k )
2946 matrix_(j,k) =
conj( matrix_(k,j) );
2949 const size_t kend(
min( j+SIMDSIZE,
columns() ) );
2950 for(
size_t k=j; k<kend; ++k )
2951 matrix_(k,i) =
conj( matrix_(i,k) );
2968 template<
typename MT
2970 template<
typename MT2
2973 inline const MT2& HermitianMatrix<MT,SO,true>::construct(
const Matrix<MT2,SO2>& m, T )
2983 template<
typename MT
2985 template<
typename MT2 >
2986 inline TransExprTrait_<MT2>
2987 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
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:1158
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.
const DMatDMatMultExpr< T1, T2 > 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:7800
BLAZE_ALWAYS_INLINE size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:346
Header file for basic type definitions.
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:404
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:258
#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
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:188
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:2643
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:5077
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1669
bool operator>(const NegativeAccuracy< A > &lhs, const T &rhs)
Greater-than comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:366
BLAZE_ALWAYS_INLINE void ctranspose(Matrix< MT, SO > &matrix)
In-place conjugate transpose of the given matrix.
Definition: Matrix.h:590
CompressedMatrix< Type, true > This
Type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:2636
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:442
#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:384
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:2639
DisableIf_< Or< IsComputation< MT >, IsTransExpr< 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:126
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:298
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:232
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:573
Constraint on the data type.
Constraint on the data type.
constexpr bool spacing
Adding an additional spacing line between two log messages.This setting gives the opportunity to add ...
Definition: Logging.h:70
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:5148
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:5131
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2647
#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.
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:330
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
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2640
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:538
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:254
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2641
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:2645
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.
DisableIf_< Or< IsComputation< MT >, IsTransExpr< 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:126
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:2642
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
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2646
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:258
Header file for the TransExprTrait class template.
Constraint on the data type.
Constraint on the data type.
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:314
SparseMatrix< This, true > BaseType
Base type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:2637
bool operator<(const NegativeAccuracy< A > &lhs, const T &rhs)
Less-than comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:328
#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:950
Header file for the IsComputation type trait class.
Header file for the IsBuiltin type trait.
bool isHermitian(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is Hermitian.
Definition: DenseMatrix.h:759
#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.
bool operator==(const NegativeAccuracy< A > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value. ...
Definition: Accuracy.h:249
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2638
bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:289
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:240
Header file for the IsComplex type trait.
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2644
#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:167
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:609
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:564