35 #ifndef _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_DENSENUMERIC_H_ 36 #define _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_DENSENUMERIC_H_ 107 template<
typename MT
109 class SymmetricMatrix<MT,SO,true,true>
110 :
public DenseMatrix< SymmetricMatrix<MT,SO,true,true>, SO >
114 typedef OppositeType_<MT> OT;
115 typedef TransposeType_<MT> TT;
116 typedef ElementType_<MT> ET;
121 typedef SymmetricMatrix<MT,SO,true,true>
This;
122 typedef DenseMatrix<This,SO>
BaseType;
127 typedef SIMDType_<MT> SIMDType;
132 typedef Pointer_<MT> Pointer;
133 typedef ConstPointer_<MT> ConstPointer;
140 template<
typename NewType >
143 typedef SymmetricMatrix< typename MT::template Rebind<NewType>::Other > Other;
150 template<
size_t NewM
154 typedef SymmetricMatrix< typename MT::template Resize<NewM,NewN>::Other > Other;
165 typedef std::random_access_iterator_tag IteratorCategory;
166 typedef ElementType_<MT> ValueType;
167 typedef NumericProxy<MT> PointerType;
168 typedef NumericProxy<MT> ReferenceType;
169 typedef ptrdiff_t DifferenceType;
172 typedef IteratorCategory iterator_category;
173 typedef ValueType value_type;
174 typedef PointerType pointer;
175 typedef ReferenceType reference;
176 typedef DifferenceType difference_type;
210 ( SO )?( row_ += inc ):( column_ += inc );
222 ( SO )?( row_ -= dec ):( column_ -= dec );
232 inline Iterator& operator++() noexcept {
233 ( SO )?( ++row_ ):( ++column_ );
243 inline const Iterator operator++(
int ) noexcept {
255 inline Iterator& operator--() noexcept {
256 ( SO )?( --row_ ):( --column_ );
266 inline const Iterator operator--(
int ) noexcept {
279 return ReferenceType( *matrix_, row_, column_ );
288 inline PointerType operator->()
const {
289 return PointerType( *matrix_, row_, column_ );
303 inline SIMDType load()
const {
304 return (*matrix_).load(row_,column_);
318 inline SIMDType
loada()
const {
319 return (*matrix_).loada(row_,column_);
333 inline SIMDType
loadu()
const {
334 return (*matrix_).loadu(row_,column_);
349 inline void store(
const SIMDType& value )
const {
350 (*matrix_).store( row_, column_, value );
366 inline void storea(
const SIMDType& value )
const {
367 (*matrix_).storea( row_, column_, value );
383 inline void storeu(
const SIMDType& value )
const {
384 (*matrix_).storeu( row_, column_, value );
400 inline void stream(
const SIMDType& value )
const {
401 (*matrix_).stream( row_, column_, value );
413 return matrix_->begin( column_ ) + row_;
415 return matrix_->begin( row_ ) + column_;
427 return ( SO )?( lhs.row_ == rhs.row_ ):( lhs.column_ == rhs.column_ );
463 return ( SO )?( lhs.row_ != rhs.row_ ):( lhs.column_ != rhs.column_ );
499 return ( SO )?( lhs.row_ < rhs.row_ ):( lhs.column_ < rhs.column_ );
535 return ( SO )?( lhs.row_ > rhs.row_ ):( lhs.column_ > rhs.column_ );
571 return ( SO )?( lhs.row_ <= rhs.row_ ):( lhs.column_ <= rhs.column_ );
607 return ( SO )?( lhs.row_ >= rhs.row_ ):( lhs.column_ >= rhs.column_ );
642 return ( SO )?( row_ - rhs.row_ ):( column_ - rhs.column_ );
655 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
657 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
670 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
672 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
685 return Iterator( *it.matrix_, it.row_ - dec, it.column_ );
687 return Iterator( *it.matrix_, it.row_, it.column_ - dec );
699 const size_t kend(
min( row_+SIMDSIZE, (*matrix_).rows() ) );
700 for(
size_t k=row_; k<kend; ++k )
701 (*matrix_)(column_,k) = (*matrix_)(k,column_);
704 const size_t kend(
min( column_+SIMDSIZE, (*matrix_).columns() ) );
705 for(
size_t k=column_; k<kend; ++k )
706 (*matrix_)(k,row_) = (*matrix_)(row_,k);
721 enum :
bool { simdEnabled = MT::simdEnabled };
724 enum :
bool { smpAssignable = MT::smpAssignable };
730 explicit inline SymmetricMatrix();
731 explicit inline SymmetricMatrix(
size_t n );
732 explicit inline SymmetricMatrix( initializer_list< initializer_list<ElementType> > list );
734 template<
typename Other >
735 explicit inline SymmetricMatrix(
size_t n,
const Other* array );
737 template<
typename Other,
size_t N >
738 explicit inline SymmetricMatrix(
const Other (&array)[N][N] );
740 explicit inline SymmetricMatrix( ElementType* ptr,
size_t n );
741 explicit inline SymmetricMatrix( ElementType* ptr,
size_t n,
size_t nn );
743 template<
typename Deleter >
744 explicit inline SymmetricMatrix( ElementType* ptr,
size_t n, Deleter d );
746 template<
typename Deleter >
747 explicit inline SymmetricMatrix( ElementType* ptr,
size_t n,
size_t nn, Deleter d );
749 inline SymmetricMatrix(
const SymmetricMatrix& m );
750 inline SymmetricMatrix( SymmetricMatrix&& m ) noexcept;
752 template<
typename MT2 >
inline SymmetricMatrix(
const Matrix<MT2,SO>& m );
753 template<
typename MT2 >
inline SymmetricMatrix(
const Matrix<MT2,!SO>& m );
764 inline Reference operator()(
size_t i,
size_t j );
765 inline ConstReference operator()(
size_t i,
size_t j )
const;
766 inline Reference at(
size_t i,
size_t j );
767 inline ConstReference at(
size_t i,
size_t j )
const;
768 inline ConstPointer data () const noexcept;
769 inline ConstPointer data (
size_t i ) const noexcept;
771 inline ConstIterator
begin (
size_t i ) const;
772 inline ConstIterator
cbegin(
size_t i ) const;
774 inline ConstIterator
end (
size_t i ) const;
775 inline ConstIterator
cend (
size_t i ) const;
782 inline SymmetricMatrix& operator=( initializer_list< initializer_list<ElementType> > list );
784 template< typename Other,
size_t N >
785 inline SymmetricMatrix& operator=( const Other (&array)[N][N] );
787 inline SymmetricMatrix& operator=( const SymmetricMatrix& rhs );
788 inline SymmetricMatrix& operator=( SymmetricMatrix&& rhs ) noexcept;
790 template< typename MT2 >
791 inline
DisableIf_< IsComputation<MT2>, SymmetricMatrix& > operator=( const Matrix<MT2,SO>& rhs );
793 template< typename MT2 >
794 inline
EnableIf_< IsComputation<MT2>, SymmetricMatrix& > operator=( const Matrix<MT2,SO>& rhs );
796 template< typename MT2 >
797 inline SymmetricMatrix& operator=( const Matrix<MT2,!SO>& rhs );
799 template< typename MT2 >
800 inline
DisableIf_< IsComputation<MT2>, SymmetricMatrix& > operator+=( const Matrix<MT2,SO>& rhs );
802 template< typename MT2 >
803 inline
EnableIf_< IsComputation<MT2>, SymmetricMatrix& > operator+=( const Matrix<MT2,SO>& rhs );
805 template< typename MT2 >
806 inline SymmetricMatrix& operator+=( const Matrix<MT2,!SO>& rhs );
808 template< typename MT2 >
809 inline
DisableIf_< IsComputation<MT2>, SymmetricMatrix& > operator-=( const Matrix<MT2,SO>& rhs );
811 template< typename MT2 >
812 inline
EnableIf_< IsComputation<MT2>, SymmetricMatrix& > operator-=( const Matrix<MT2,SO>& rhs );
814 template< typename MT2 >
815 inline SymmetricMatrix& operator-=( const Matrix<MT2,!SO>& rhs );
817 template< typename MT2,
bool SO2 >
818 inline SymmetricMatrix& operator*=( const Matrix<MT2,SO2>& rhs );
820 template< typename Other >
821 inline
EnableIf_< IsNumeric<Other>, SymmetricMatrix >& operator*=( Other rhs );
823 template< typename Other >
824 inline
EnableIf_< IsNumeric<Other>, SymmetricMatrix >& operator/=( Other rhs );
831 inline
size_t rows() const noexcept;
832 inline
size_t columns() const noexcept;
833 inline
size_t spacing() const noexcept;
834 inline
size_t capacity() const noexcept;
835 inline
size_t capacity(
size_t i ) const noexcept;
837 inline
size_t nonZeros(
size_t i ) const;
839 inline
void reset(
size_t i );
841 void resize (
size_t n,
bool preserve=true );
842 inline
void extend (
size_t n,
bool preserve=true );
843 inline
void reserve(
size_t elements );
844 inline
void swap( SymmetricMatrix& m ) noexcept;
854 template< typename Other > inline SymmetricMatrix& scale( const Other& scalar );
861 inline
bool isIntact() const noexcept;
868 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
869 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
871 inline
bool isAligned () const noexcept;
872 inline
bool canSMPAssign() const noexcept;
878 inline
void store (
size_t i,
size_t j, const SIMDType& value ) noexcept;
879 inline
void storea(
size_t i,
size_t j, const SIMDType& value ) noexcept;
880 inline
void storeu(
size_t i,
size_t j, const SIMDType& value ) noexcept;
881 inline
void stream(
size_t i,
size_t j, const SIMDType& value ) noexcept;
899 template<
bool RF,
typename MT2,
bool SO2,
bool DF2,
bool NF2 >
900 friend bool isDefault(
const SymmetricMatrix<MT2,SO2,DF2,NF2>& m );
902 template< InversionFlag IF,
typename MT2,
bool SO2 >
903 friend void invert( SymmetricMatrix<MT2,SO2,true,true>& m );
939 template<
typename MT
941 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix()
957 template<
typename MT
959 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix(
size_t n )
960 : matrix_( n, n, ElementType() )
994 template<
typename MT
996 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix( initializer_list< initializer_list<ElementType> > list )
1035 template<
typename MT
1037 template<
typename Other >
1038 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix(
size_t n,
const Other* array )
1039 : matrix_( n, n, array )
1074 template<
typename MT
1076 template<
typename Other
1078 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix(
const Other (&array)[N][N] )
1112 template<
typename MT
1114 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix( ElementType* ptr,
size_t n )
1115 : matrix_( ptr, n, n )
1150 template<
typename MT
1152 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix( ElementType* ptr,
size_t n,
size_t nn )
1153 : matrix_( ptr, n, n, nn )
1186 template<
typename MT
1188 template<
typename Deleter >
1189 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix( ElementType* ptr,
size_t n, Deleter d )
1190 : matrix_( ptr, n, n, d )
1224 template<
typename MT
1226 template<
typename Deleter >
1227 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix( ElementType* ptr,
size_t n,
size_t nn, Deleter d )
1228 : matrix_( ptr, n, n, nn, d )
1246 template<
typename MT
1248 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix(
const SymmetricMatrix& m )
1249 : matrix_( m.matrix_ )
1264 template<
typename MT
1266 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix( SymmetricMatrix&& m ) noexcept
1267 : matrix_( std::move( m.matrix_ ) )
1286 template<
typename MT
1288 template<
typename MT2 >
1289 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix(
const Matrix<MT2,SO>& m )
1292 if( !IsSymmetric<MT2>::value && !
isSymmetric( matrix_ ) ) {
1313 template<
typename MT
1315 template<
typename MT2 >
1316 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix(
const Matrix<MT2,!SO>& m )
1317 : matrix_(
trans( ~m ) )
1319 if( !IsSymmetric<MT2>::value && !
isSymmetric( matrix_ ) ) {
1353 template<
typename MT
1356 SymmetricMatrix<MT,SO,true,true>::operator()(
size_t i,
size_t j )
1382 template<
typename MT
1385 SymmetricMatrix<MT,SO,true,true>::operator()(
size_t i,
size_t j )
const 1390 return matrix_(i,j);
1412 template<
typename MT
1415 SymmetricMatrix<MT,SO,true,true>::at(
size_t i,
size_t j )
1423 return (*
this)(i,j);
1445 template<
typename MT
1448 SymmetricMatrix<MT,SO,true,true>::at(
size_t i,
size_t j )
const 1456 return (*
this)(i,j);
1476 template<
typename MT
1478 inline typename SymmetricMatrix<MT,SO,true,true>::ConstPointer
1479 SymmetricMatrix<MT,SO,true,true>::data() const noexcept
1481 return matrix_.data();
1498 template<
typename MT
1500 inline typename SymmetricMatrix<MT,SO,true,true>::ConstPointer
1501 SymmetricMatrix<MT,SO,true,true>::data(
size_t i )
const noexcept
1503 return matrix_.data(i);
1521 template<
typename MT
1527 return Iterator( matrix_, 0UL, i );
1529 return Iterator( matrix_, i, 0UL );
1547 template<
typename MT
1552 return matrix_.begin(i);
1570 template<
typename MT
1575 return matrix_.cbegin(i);
1593 template<
typename MT
1619 template<
typename MT
1624 return matrix_.end(i);
1642 template<
typename MT
1647 return matrix_.cend(i);
1685 template<
typename MT
1687 inline SymmetricMatrix<MT,SO,true,true>&
1688 SymmetricMatrix<MT,SO,true,true>::operator=( initializer_list< initializer_list<ElementType> > list )
1696 matrix_ = std::move( tmp );
1731 template<
typename MT
1733 template<
typename Other
1735 inline SymmetricMatrix<MT,SO,true,true>&
1736 SymmetricMatrix<MT,SO,true,true>::operator=(
const Other (&array)[N][N] )
1744 matrix_ = std::move( tmp );
1765 template<
typename MT
1767 inline SymmetricMatrix<MT,SO,true,true>&
1768 SymmetricMatrix<MT,SO,true,true>::operator=(
const SymmetricMatrix& rhs )
1770 matrix_ = rhs.matrix_;
1788 template<
typename MT
1790 inline SymmetricMatrix<MT,SO,true,true>&
1791 SymmetricMatrix<MT,SO,true,true>::operator=( SymmetricMatrix&& rhs ) noexcept
1793 matrix_ = std::move( rhs.matrix_ );
1817 template<
typename MT
1819 template<
typename MT2 >
1820 inline DisableIf_< IsComputation<MT2>, SymmetricMatrix<MT,SO,true,true>& >
1821 SymmetricMatrix<MT,SO,true,true>::operator=(
const Matrix<MT2,SO>& rhs )
1823 if( !IsSymmetric<MT2>::value && !
isSymmetric( ~rhs ) ) {
1851 template<
typename MT
1853 template<
typename MT2 >
1854 inline EnableIf_< IsComputation<MT2>, SymmetricMatrix<MT,SO,true,true>& >
1855 SymmetricMatrix<MT,SO,true,true>::operator=(
const Matrix<MT2,SO>& rhs )
1857 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1861 if( IsSymmetric<MT2>::value ) {
1871 matrix_ = std::move( tmp );
1896 template<
typename MT
1898 template<
typename MT2 >
1899 inline SymmetricMatrix<MT,SO,true,true>&
1900 SymmetricMatrix<MT,SO,true,true>::operator=(
const Matrix<MT2,!SO>& rhs )
1902 return this->operator=(
trans( ~rhs ) );
1921 template<
typename MT
1923 template<
typename MT2 >
1924 inline DisableIf_< IsComputation<MT2>, SymmetricMatrix<MT,SO,true,true>& >
1927 if( !IsSymmetric<MT2>::value && !
isSymmetric( ~rhs ) ) {
1955 template<
typename MT
1957 template<
typename MT2 >
1958 inline EnableIf_< IsComputation<MT2>, SymmetricMatrix<MT,SO,true,true>& >
1961 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1965 if( IsSymmetric<MT2>::value ) {
1969 const ResultType_<MT2> tmp( ~rhs );
2001 template<
typename MT
2003 template<
typename MT2 >
2004 inline SymmetricMatrix<MT,SO,true,true>&
2026 template<
typename MT
2028 template<
typename MT2 >
2029 inline DisableIf_< IsComputation<MT2>, SymmetricMatrix<MT,SO,true,true>& >
2032 if( !IsSymmetric<MT2>::value && !
isSymmetric( ~rhs ) ) {
2060 template<
typename MT
2062 template<
typename MT2 >
2063 inline EnableIf_< IsComputation<MT2>, SymmetricMatrix<MT,SO,true,true>& >
2066 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
2070 if( IsSymmetric<MT2>::value ) {
2074 const ResultType_<MT2> tmp( ~rhs );
2106 template<
typename MT
2108 template<
typename MT2 >
2109 inline SymmetricMatrix<MT,SO,true,true>&
2130 template<
typename MT
2132 template<
typename MT2
2134 inline SymmetricMatrix<MT,SO,true,true>&
2137 if( matrix_.rows() != (~rhs).
columns() ) {
2141 MT tmp( matrix_ * ~rhs );
2147 matrix_ = std::move( tmp );
2166 template<
typename MT
2168 template<
typename Other >
2169 inline EnableIf_< IsNumeric<Other>, SymmetricMatrix<MT,SO,true,true> >&
2186 template<
typename MT
2188 template<
typename Other >
2189 inline EnableIf_< IsNumeric<Other>, SymmetricMatrix<MT,SO,true,true> >&
2215 template<
typename MT
2219 return matrix_.rows();
2231 template<
typename MT
2235 return matrix_.columns();
2253 template<
typename MT
2257 return matrix_.spacing();
2269 template<
typename MT
2273 return matrix_.capacity();
2290 template<
typename MT
2294 return matrix_.capacity(i);
2306 template<
typename MT
2310 return matrix_.nonZeros();
2328 template<
typename MT
2332 return matrix_.nonZeros(i);
2344 template<
typename MT
2390 template<
typename MT
2394 row ( matrix_, i ).reset();
2395 column( matrix_, i ).reset();
2413 template<
typename MT
2460 template<
typename MT
2470 const size_t oldsize( matrix_.rows() );
2472 matrix_.resize( n, n,
true );
2475 const size_t increment( n - oldsize );
2476 submatrix( matrix_, 0UL, oldsize, oldsize, increment ).reset();
2477 submatrix( matrix_, oldsize, 0UL, increment, n ).reset();
2497 template<
typename MT
2499 inline void SymmetricMatrix<MT,SO,true,true>::extend(
size_t n,
bool preserve )
2520 template<
typename MT
2522 inline void SymmetricMatrix<MT,SO,true,true>::reserve(
size_t elements )
2524 matrix_.reserve( elements );
2537 template<
typename MT
2543 swap( matrix_, m.matrix_ );
2563 template<
typename MT
2579 template<
typename MT
2583 if( !IsBuiltin<ElementType>::value )
2599 template<
typename MT
2601 template<
typename Other >
2602 inline SymmetricMatrix<MT,SO,true,true>&
2603 SymmetricMatrix<MT,SO,true,true>::scale(
const Other& scalar )
2605 matrix_.scale( scalar );
2630 template<
typename MT
2661 template<
typename MT
2663 template<
typename Other >
2664 inline bool SymmetricMatrix<MT,SO,true,true>::canAlias(
const Other* alias )
const noexcept
2666 return matrix_.canAlias( alias );
2683 template<
typename MT
2685 template<
typename Other >
2686 inline bool SymmetricMatrix<MT,SO,true,true>::isAliased(
const Other* alias )
const noexcept
2688 return matrix_.isAliased( alias );
2704 template<
typename MT
2706 inline bool SymmetricMatrix<MT,SO,true,true>::isAligned() const noexcept
2708 return matrix_.isAligned();
2725 template<
typename MT
2727 inline bool SymmetricMatrix<MT,SO,true,true>::canSMPAssign() const noexcept
2729 return matrix_.canSMPAssign();
2751 template<
typename MT
2754 SymmetricMatrix<MT,SO,true,true>::load(
size_t i,
size_t j )
const noexcept
2756 return matrix_.load( i, j );
2778 template<
typename MT
2783 return matrix_.loada( i, j );
2805 template<
typename MT
2810 return matrix_.loadu( i, j );
2833 template<
typename MT
2836 SymmetricMatrix<MT,SO,true,true>::store(
size_t i,
size_t j,
const SIMDType& value ) noexcept
2838 matrix_.store( i, j, value );
2841 const size_t kend(
min( i+SIMDSIZE,
rows() ) );
2842 for(
size_t k=i; k<kend; ++k )
2843 matrix_(j,k) = matrix_(k,j);
2846 const size_t kend(
min( j+SIMDSIZE,
columns() ) );
2847 for(
size_t k=j; k<kend; ++k )
2848 matrix_(k,i) = matrix_(i,k);
2872 template<
typename MT
2877 matrix_.storea( i, j, value );
2880 const size_t kend(
min( i+SIMDSIZE,
rows() ) );
2881 for(
size_t k=i; k<kend; ++k )
2882 matrix_(j,k) = matrix_(k,j);
2885 const size_t kend(
min( j+SIMDSIZE,
columns() ) );
2886 for(
size_t k=j; k<kend; ++k )
2887 matrix_(k,i) = matrix_(i,k);
2911 template<
typename MT
2916 matrix_.storeu( i, j, value );
2919 const size_t kend(
min( i+SIMDSIZE,
rows() ) );
2920 for(
size_t k=i; k<kend; ++k )
2921 matrix_(j,k) = matrix_(k,j);
2924 const size_t kend(
min( j+SIMDSIZE,
columns() ) );
2925 for(
size_t k=j; k<kend; ++k )
2926 matrix_(k,i) = matrix_(i,k);
2950 template<
typename MT
2955 matrix_.stream( i, j, value );
2958 const size_t kend(
min( i+SIMDSIZE,
rows() ) );
2959 for(
size_t k=i; k<kend; ++k )
2960 matrix_(j,k) = matrix_(k,j);
2963 const size_t kend(
min( j+SIMDSIZE,
columns() ) );
2964 for(
size_t k=j; k<kend; ++k )
2965 matrix_(k,i) = matrix_(i,k);
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
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
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
Header file for the NumericProxy class.
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
Header file for the implementation of the base template of the SymmetricMatrix.
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
Header file for the DisableIf class template.
Header file for the IsSymmetric type trait.
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
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 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
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
Constraint on the data type.
Constraint on the data type.
BLAZE_ALWAYS_INLINE void conjugate(T &a) noexcept(IsNumeric< T >::value)
In-place conjugation of the given value/object.
Definition: Conjugate.h:120
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
bool isSymmetric(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is symmetric.
Definition: DenseMatrix.h:697
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
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
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
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.
BLAZE_ALWAYS_INLINE void transpose(Matrix< MT, SO > &matrix)
In-place transpose of the given matrix.
Definition: Matrix.h:570