35#ifndef _BLAZE_MATH_ADAPTORS_UNIUPPERMATRIX_DENSE_H_
36#define _BLAZE_MATH_ADAPTORS_UNIUPPERMATRIX_DENSE_H_
113class UniUpperMatrix<MT,SO,true>
114 :
public DenseMatrix< UniUpperMatrix<MT,SO,true>, SO >
118 using OT = OppositeType_t<MT>;
119 using TT = TransposeType_t<MT>;
120 using ET = ElementType_t<MT>;
125 using This = UniUpperMatrix<MT,SO,true>;
126 using BaseType = DenseMatrix<This,SO>;
127 using ResultType = This;
128 using OppositeType = UniUpperMatrix<OT,!SO,true>;
129 using TransposeType = UniLowerMatrix<TT,!SO,true>;
130 using ElementType = ET;
131 using SIMDType = SIMDType_t<MT>;
132 using TagType = TagType_t<MT>;
133 using ReturnType = ReturnType_t<MT>;
134 using CompositeType =
const This&;
135 using Reference = UniUpperProxy<MT>;
136 using ConstReference = ConstReference_t<MT>;
137 using Pointer = Pointer_t<MT>;
138 using ConstPointer = ConstPointer_t<MT>;
139 using ConstIterator = ConstIterator_t<MT>;
145 template<
typename NewType >
148 using Other = UniUpperMatrix< typename MT::template Rebind<NewType>::Other >;
155 template<
size_t NewM
159 using Other = UniUpperMatrix< typename MT::template Resize<NewM,NewN>::Other >;
170 using IteratorCategory = std::random_access_iterator_tag;
171 using ValueType = ElementType_t<MT>;
172 using PointerType = UniUpperProxy<MT>;
173 using ReferenceType = UniUpperProxy<MT>;
177 using iterator_category = IteratorCategory;
178 using value_type = ValueType;
179 using pointer = PointerType;
180 using reference = ReferenceType;
181 using difference_type = DifferenceType;
187 inline Iterator() noexcept
201 inline Iterator( MT& matrix,
size_t row,
size_t column ) noexcept
214 inline Iterator&
operator+=(
size_t inc )
noexcept {
215 ( SO )?( row_ += inc ):( column_ += inc );
226 inline Iterator&
operator-=(
size_t dec )
noexcept {
227 ( SO )?( row_ -= dec ):( column_ -= dec );
237 inline Iterator& operator++() noexcept {
238 ( SO )?( ++row_ ):( ++column_ );
248 inline const Iterator operator++(
int )
noexcept {
249 const Iterator tmp( *
this );
260 inline Iterator& operator--() noexcept {
261 ( SO )?( --row_ ):( --column_ );
271 inline const Iterator operator--(
int ) {
272 const Iterator tmp( *
this );
284 return ReferenceType( *matrix_, row_, column_ );
293 inline PointerType operator->()
const {
294 return PointerType( *matrix_, row_, column_ );
308 inline SIMDType load()
const {
309 return (*matrix_).load(row_,column_);
323 inline SIMDType
loada()
const {
324 return (*matrix_).loada(row_,column_);
338 inline SIMDType
loadu()
const {
339 return (*matrix_).loadu(row_,column_);
348 inline operator ConstIterator()
const {
350 return matrix_->begin( column_ ) + row_;
352 return matrix_->begin( row_ ) + column_;
363 friend inline bool operator==(
const Iterator& lhs,
const Iterator& rhs )
noexcept {
364 return ( SO )?( lhs.row_ == rhs.row_ ):( lhs.column_ == rhs.column_ );
375 friend inline bool operator==(
const Iterator& lhs,
const ConstIterator& rhs ) {
376 return ( ConstIterator( lhs ) == rhs );
387 friend inline bool operator==(
const ConstIterator& lhs,
const Iterator& rhs ) {
388 return ( lhs == ConstIterator( rhs ) );
399 friend inline bool operator!=(
const Iterator& lhs,
const Iterator& rhs )
noexcept {
400 return ( SO )?( lhs.row_ != rhs.row_ ):( lhs.column_ != rhs.column_ );
411 friend inline bool operator!=(
const Iterator& lhs,
const ConstIterator& rhs ) {
412 return ( ConstIterator( lhs ) != rhs );
423 friend inline bool operator!=(
const ConstIterator& lhs,
const Iterator& rhs ) {
424 return ( lhs != ConstIterator( rhs ) );
435 friend inline bool operator<(
const Iterator& lhs,
const Iterator& rhs )
noexcept {
436 return ( SO )?( lhs.row_ < rhs.row_ ):( lhs.column_ < rhs.column_ );
447 friend inline bool operator<(
const Iterator& lhs,
const ConstIterator& rhs ) {
448 return ( ConstIterator( lhs ) < rhs );
459 friend inline bool operator<(
const ConstIterator& lhs,
const Iterator& rhs ) {
460 return ( lhs < ConstIterator( rhs ) );
471 friend inline bool operator>(
const Iterator& lhs,
const Iterator& rhs )
noexcept {
472 return ( SO )?( lhs.row_ > rhs.row_ ):( lhs.column_ > rhs.column_ );
483 friend inline bool operator>(
const Iterator& lhs,
const ConstIterator& rhs ) {
484 return ( ConstIterator( lhs ) > rhs );
495 friend inline bool operator>(
const ConstIterator& lhs,
const Iterator& rhs ) {
496 return ( lhs > ConstIterator( rhs ) );
507 friend inline bool operator<=(
const Iterator& lhs,
const Iterator& rhs )
noexcept {
508 return ( SO )?( lhs.row_ <= rhs.row_ ):( lhs.column_ <= rhs.column_ );
519 friend inline bool operator<=(
const Iterator& lhs,
const ConstIterator& rhs ) {
520 return ( ConstIterator( lhs ) <= rhs );
531 friend inline bool operator<=(
const ConstIterator& lhs,
const Iterator& rhs ) {
532 return ( lhs <= ConstIterator( rhs ) );
543 friend inline bool operator>=(
const Iterator& lhs,
const Iterator& rhs )
noexcept {
544 return ( SO )?( lhs.row_ >= rhs.row_ ):( lhs.column_ >= rhs.column_ );
555 friend inline bool operator>=(
const Iterator& lhs,
const ConstIterator& rhs ) {
556 return ( ConstIterator( lhs ) >= rhs );
567 friend inline bool operator>=(
const ConstIterator& lhs,
const Iterator& rhs ) {
568 return ( lhs >= ConstIterator( rhs ) );
578 inline DifferenceType
operator-(
const Iterator& rhs )
const noexcept {
579 return ( SO )?( row_ - rhs.row_ ):( column_ - rhs.column_ );
590 friend inline const Iterator
operator+(
const Iterator& it,
size_t inc )
noexcept {
592 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
594 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
605 friend inline const Iterator
operator+(
size_t inc,
const Iterator& it )
noexcept {
607 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
609 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
620 friend inline const Iterator
operator-(
const Iterator& it,
size_t dec )
noexcept {
622 return Iterator( *it.matrix_, it.row_ - dec, it.column_ );
624 return Iterator( *it.matrix_, it.row_, it.column_ - dec );
639 static constexpr bool simdEnabled = MT::simdEnabled;
642 static constexpr bool smpAssignable = MT::smpAssignable;
648 inline UniUpperMatrix();
649 template<
typename A1 >
explicit inline UniUpperMatrix(
const A1& a1 );
650 inline UniUpperMatrix(
size_t n,
const ElementType& init );
654 template<
typename Other >
655 inline UniUpperMatrix(
size_t n,
const Other* array );
657 template<
typename Other,
size_t N >
658 inline UniUpperMatrix(
const Other (&array)[N][N] );
660 inline UniUpperMatrix( ElementType* ptr,
size_t n );
661 inline UniUpperMatrix( ElementType* ptr,
size_t n,
size_t nn );
663 inline UniUpperMatrix(
const UniUpperMatrix& m );
664 inline UniUpperMatrix( UniUpperMatrix&& m )
noexcept;
671 ~UniUpperMatrix() =
default;
678 inline Reference operator()(
size_t i,
size_t j );
679 inline ConstReference operator()(
size_t i,
size_t j )
const;
680 inline Reference at(
size_t i,
size_t j );
681 inline ConstReference at(
size_t i,
size_t j )
const;
682 inline ConstPointer
data () const noexcept;
683 inline ConstPointer
data (
size_t i ) const noexcept;
684 inline Iterator
begin (
size_t i );
685 inline ConstIterator
begin (
size_t i ) const;
686 inline ConstIterator
cbegin(
size_t i ) const;
687 inline Iterator
end (
size_t i );
688 inline ConstIterator
end (
size_t i ) const;
689 inline ConstIterator
cend (
size_t i ) const;
696 inline UniUpperMatrix& operator=( const ElementType& rhs );
699 template< typename Other,
size_t N >
700 inline UniUpperMatrix& operator=( const Other (&array)[N][N] );
702 inline UniUpperMatrix& operator=( const UniUpperMatrix& rhs );
703 inline UniUpperMatrix& operator=( UniUpperMatrix&& rhs ) noexcept;
705 template< typename MT2,
bool SO2 >
706 inline auto operator=( const Matrix<MT2,SO2>& rhs )
709 template< typename MT2,
bool SO2 >
710 inline auto operator=( const Matrix<MT2,SO2>& rhs )
713 template< typename MT2,
bool SO2 >
714 inline auto operator+=( const Matrix<MT2,SO2>& rhs )
717 template< typename MT2,
bool SO2 >
718 inline auto operator+=( const Matrix<MT2,SO2>& rhs )
721 template< typename MT2,
bool SO2 >
722 inline auto operator-=( const Matrix<MT2,SO2>& rhs )
725 template< typename MT2,
bool SO2 >
726 inline auto operator-=( const Matrix<MT2,SO2>& rhs )
729 template< typename MT2,
bool SO2 >
730 inline auto operator%=( const Matrix<MT2,SO2>& rhs ) -> UniUpperMatrix&;
737 inline
size_t rows() const noexcept;
738 inline
size_t columns() const noexcept;
739 inline
size_t spacing() const noexcept;
740 inline
size_t capacity() const noexcept;
741 inline
size_t capacity(
size_t i ) const noexcept;
743 inline
size_t nonZeros(
size_t i ) const;
745 inline
void reset(
size_t i );
747 void resize (
size_t n,
bool preserve=true );
748 inline
void extend (
size_t n,
bool preserve=true );
749 inline
void reserve(
size_t elements );
751 inline
void swap( UniUpperMatrix& m ) noexcept;
753 static constexpr
size_t maxNonZeros() noexcept;
754 static constexpr
size_t maxNonZeros(
size_t n ) noexcept;
761 inline
bool isIntact() const noexcept;
768 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
769 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
771 inline
bool isAligned () const noexcept;
772 inline
bool canSMPAssign() const noexcept;
784 inline const MT construct(
size_t n ,
TrueType );
785 inline const MT construct( const ElementType& value,
FalseType );
787 template< typename MT2,
bool SO2, typename T >
788 inline const MT construct( const Matrix<MT2,SO2>& m, T );
800 template< typename MT2,
bool SO2,
bool DF2 >
801 friend MT2& derestrict( UniUpperMatrix<MT2,SO2,DF2>& m );
842inline UniUpperMatrix<MT,SO,true>::UniUpperMatrix()
845 for(
size_t i=0UL; i<
rows(); ++i )
846 matrix_(i,i) = ElementType(1);
875template<
typename A1 >
876inline UniUpperMatrix<MT,SO,true>::UniUpperMatrix(
const A1& a1 )
877 : matrix_( construct( a1, IsResizable<MT>() ) )
895inline UniUpperMatrix<MT,SO,true>::UniUpperMatrix(
size_t n,
const ElementType& init )
896 : matrix_( n, n, ElementType() )
901 for(
size_t j=0UL; j<
columns(); ++j ) {
902 for(
size_t i=0UL; i<j; ++i )
904 matrix_(j,j) = ElementType(1);
908 for(
size_t i=0UL; i<
rows(); ++i ) {
909 matrix_(i,i) = ElementType(1);
910 for(
size_t j=i+1UL; j<
columns(); ++j )
989template<
typename Other >
990inline UniUpperMatrix<MT,SO,true>::UniUpperMatrix(
size_t n,
const Other* array )
991 : matrix_( n, n, array )
1026template<
typename MT
1028template<
typename Other
1030inline UniUpperMatrix<MT,SO,true>::UniUpperMatrix(
const Other (&array)[N][N] )
1078template<
typename MT
1080inline UniUpperMatrix<MT,SO,true>::UniUpperMatrix( ElementType* ptr,
size_t n )
1081 : matrix_( ptr, n, n )
1130template<
typename MT
1132inline UniUpperMatrix<MT,SO,true>::UniUpperMatrix( ElementType* ptr,
size_t n,
size_t nn )
1133 : matrix_( ptr, n, n, nn )
1151template<
typename MT
1153inline UniUpperMatrix<MT,SO,true>::UniUpperMatrix(
const UniUpperMatrix& m )
1154 : matrix_( m.matrix_ )
1169template<
typename MT
1171inline UniUpperMatrix<MT,SO,true>::UniUpperMatrix( UniUpperMatrix&& m ) noexcept
1172 : matrix_( std::move( m.matrix_ ) )
1205template<
typename MT
1207inline typename UniUpperMatrix<MT,SO,true>::Reference
1208 UniUpperMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
1213 return Reference( matrix_, i, j );
1235template<
typename MT
1237inline typename UniUpperMatrix<MT,SO,true>::ConstReference
1238 UniUpperMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
const
1243 return matrix_(i,j);
1266template<
typename MT
1268inline typename UniUpperMatrix<MT,SO,true>::Reference
1269 UniUpperMatrix<MT,SO,true>::at(
size_t i,
size_t j )
1277 return (*
this)(i,j);
1300template<
typename MT
1302inline typename UniUpperMatrix<MT,SO,true>::ConstReference
1303 UniUpperMatrix<MT,SO,true>::at(
size_t i,
size_t j )
const
1311 return (*
this)(i,j);
1330template<
typename MT
1332inline typename UniUpperMatrix<MT,SO,true>::ConstPointer
1335 return matrix_.data();
1350template<
typename MT
1352inline typename UniUpperMatrix<MT,SO,true>::ConstPointer
1355 return matrix_.data(i);
1373template<
typename MT
1375inline typename UniUpperMatrix<MT,SO,true>::Iterator
1379 return Iterator( matrix_, 0UL, i );
1381 return Iterator( matrix_, i, 0UL );
1399template<
typename MT
1401inline typename UniUpperMatrix<MT,SO,true>::ConstIterator
1404 return matrix_.begin(i);
1422template<
typename MT
1424inline typename UniUpperMatrix<MT,SO,true>::ConstIterator
1427 return matrix_.cbegin(i);
1445template<
typename MT
1447inline typename UniUpperMatrix<MT,SO,true>::Iterator
1451 return Iterator( matrix_,
rows(), i );
1453 return Iterator( matrix_, i,
columns() );
1471template<
typename MT
1473inline typename UniUpperMatrix<MT,SO,true>::ConstIterator
1476 return matrix_.end(i);
1494template<
typename MT
1496inline typename UniUpperMatrix<MT,SO,true>::ConstIterator
1499 return matrix_.cend(i);
1520template<
typename MT
1522inline UniUpperMatrix<MT,SO,true>&
1523 UniUpperMatrix<MT,SO,true>::operator=(
const ElementType& rhs )
1526 for(
size_t j=1UL; j<
columns(); ++j )
1527 for(
size_t i=0UL; i<j; ++i )
1531 for(
size_t i=0UL; i<
rows(); ++i )
1532 for(
size_t j=i+1UL; j<
columns(); ++j )
1567template<
typename MT
1569inline UniUpperMatrix<MT,SO,true>&
1572 const InitializerMatrix<ElementType> tmp( list, list.size() );
1613template<
typename MT
1615template<
typename Other
1617inline UniUpperMatrix<MT,SO,true>&
1618 UniUpperMatrix<MT,SO,true>::operator=(
const Other (&array)[N][N] )
1626 matrix_ = std::move( tmp );
1647template<
typename MT
1649inline UniUpperMatrix<MT,SO,true>&
1650 UniUpperMatrix<MT,SO,true>::operator=(
const UniUpperMatrix& rhs )
1652 matrix_ = rhs.matrix_;
1670template<
typename MT
1672inline UniUpperMatrix<MT,SO,true>&
1673 UniUpperMatrix<MT,SO,true>::operator=( UniUpperMatrix&& rhs )
noexcept
1675 matrix_ = std::move( rhs.matrix_ );
1699template<
typename MT
1701template<
typename MT2
1703inline auto UniUpperMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1704 -> DisableIf_t< IsComputation_v<MT2>, UniUpperMatrix& >
1706 if( IsStrictlyTriangular_v<MT2> || ( !IsUniUpper_v<MT2> && !
isUniUpper( *rhs ) ) ) {
1734template<
typename MT
1736template<
typename MT2
1738inline auto UniUpperMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1739 -> EnableIf_t< IsComputation_v<MT2>, UniUpperMatrix& >
1741 if( IsStrictlyTriangular_v<MT2> || ( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) ) {
1745 if( IsUniUpper_v<MT2> ) {
1755 matrix_ = std::move( tmp );
1780template<
typename MT
1782template<
typename MT2
1785 -> DisableIf_t< IsComputation_v<MT2>, UniUpperMatrix& >
1787 if( IsLower_v<MT2> || IsUniTriangular_v<MT2> ||
1816template<
typename MT
1818template<
typename MT2
1821 -> EnableIf_t< IsComputation_v<MT2>, UniUpperMatrix& >
1823 if( IsLower_v<MT2> || IsUniTriangular_v<MT2> ||
1824 ( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) ) {
1828 if( IsStrictlyUpper_v<MT2> ) {
1832 const ResultType_t<MT2> tmp( *rhs );
1863template<
typename MT
1865template<
typename MT2
1868 -> DisableIf_t< IsComputation_v<MT2>, UniUpperMatrix& >
1870 if( IsLower_v<MT2> || IsUniTriangular_v<MT2> ||
1899template<
typename MT
1901template<
typename MT2
1904 -> EnableIf_t< IsComputation_v<MT2>, UniUpperMatrix& >
1906 if( IsLower_v<MT2> || IsUniTriangular_v<MT2> ||
1907 ( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) ) {
1911 if( IsStrictlyUpper_v<MT2> ) {
1915 const ResultType_t<MT2> tmp( *rhs );
1946template<
typename MT
1948template<
typename MT2
1950inline auto UniUpperMatrix<MT,SO,true>::operator%=(
const Matrix<MT2,SO2>& rhs )
1953 if( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) {
1957 If_t< IsComputation_v<MT2>, ResultType_t<MT2>,
const MT2& > tmp( *rhs );
1959 for(
size_t i=0UL; i<(*rhs).rows(); ++i ) {
1960 if( !
isOne( tmp(i,i) ) ) {
1990template<
typename MT
1994 return matrix_.rows();
2006template<
typename MT
2010 return matrix_.columns();
2027template<
typename MT
2031 return matrix_.spacing();
2043template<
typename MT
2047 return matrix_.capacity();
2065template<
typename MT
2069 return matrix_.capacity(i);
2081template<
typename MT
2085 return matrix_.nonZeros();
2103template<
typename MT
2107 return matrix_.nonZeros(i);
2119template<
typename MT
2126 for(
size_t j=1UL; j<
columns(); ++j )
2127 for(
size_t i=0UL; i<j; ++i )
2128 clear( matrix_(i,j) );
2131 for(
size_t i=0UL; i<
rows(); ++i )
2132 for(
size_t j=i+1UL; j<
columns(); ++j )
2133 clear( matrix_(i,j) );
2153template<
typename MT
2160 for(
size_t j=0UL; j<i; ++j )
2161 clear( matrix_(j,i) );
2164 for(
size_t j=i+1UL; j<
columns(); ++j )
2165 clear( matrix_(i,j) );
2184template<
typename MT
2233template<
typename MT
2243 const size_t oldsize( matrix_.rows() );
2245 matrix_.resize( n, n,
true );
2249 const size_t increment( n - oldsize );
2250 submatrix( matrix_, oldsize, 0UL, increment, n-1UL ).reset();
2252 for(
size_t i=oldsize; i<n; ++i )
2253 matrix_(i,i) = ElementType(1);
2273template<
typename MT
2275inline void UniUpperMatrix<MT,SO,true>::extend(
size_t n,
bool preserve )
2296template<
typename MT
2298inline void UniUpperMatrix<MT,SO,true>::reserve(
size_t elements )
2316template<
typename MT
2320 matrix_.shrinkToFit();
2333template<
typename MT
2339 swap( matrix_, m.matrix_ );
2357template<
typename MT
2359constexpr size_t UniUpperMatrix<MT,SO,true>::maxNonZeros() noexcept
2363 return maxNonZeros( Size_v<MT,0UL> );
2379template<
typename MT
2381constexpr size_t UniUpperMatrix<MT,SO,true>::maxNonZeros(
size_t n )
noexcept
2383 return ( ( n + 1UL ) * n ) / 2UL;
2407template<
typename MT
2438template<
typename MT
2440template<
typename Other >
2441inline bool UniUpperMatrix<MT,SO,true>::canAlias(
const Other* alias )
const noexcept
2443 return matrix_.canAlias( alias );
2460template<
typename MT
2462template<
typename Other >
2463inline bool UniUpperMatrix<MT,SO,true>::isAliased(
const Other* alias )
const noexcept
2465 return matrix_.isAliased( alias );
2481template<
typename MT
2483inline bool UniUpperMatrix<MT,SO,true>::isAligned() const noexcept
2485 return matrix_.isAligned();
2502template<
typename MT
2504inline bool UniUpperMatrix<MT,SO,true>::canSMPAssign() const noexcept
2506 return matrix_.canSMPAssign();
2528template<
typename MT
2531 UniUpperMatrix<MT,SO,true>::load(
size_t i,
size_t j )
const noexcept
2533 return matrix_.load( i, j );
2555template<
typename MT
2560 return matrix_.loada( i, j );
2582template<
typename MT
2587 return matrix_.loadu( i, j );
2608template<
typename MT
2610inline const MT UniUpperMatrix<MT,SO,true>::construct(
size_t n,
TrueType )
2614 MT tmp( n, n, ElementType() );
2616 for(
size_t i=0UL; i<n; ++i )
2617 tmp(i,i) = ElementType(1);
2632template<
typename MT
2634inline const MT UniUpperMatrix<MT,SO,true>::construct(
const ElementType& init,
FalseType )
2642 for(
size_t j=0UL; j<
columns(); ++j ) {
2643 for(
size_t i=0UL; i<j; ++i )
2645 tmp(j,j) = ElementType(1);
2649 for(
size_t i=0UL; i<
rows(); ++i ) {
2650 tmp(i,i) = ElementType(1);
2651 for(
size_t j=i+1UL; j<
columns(); ++j )
2673template<
typename MT
2675template<
typename MT2
2678inline const MT UniUpperMatrix<MT,SO,true>::construct(
const Matrix<MT2,SO2>& m, T )
2682 if( IsStrictlyTriangular_v<MT2> || ( !IsUniUpper_v<MT2> && !
isUniUpper( tmp ) ) ) {
Header file for auxiliary alias declarations.
Header file for run time assertion macros.
Constraint on the data type.
constexpr 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:751
constexpr 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:719
Header file for the EnableIf class template.
Constraint on the data type.
Header file for the IntegralConstant class template.
Header file for the IsComputation type trait class.
Header file for the isDefault shim.
Header file for the IsLower type trait.
Header file for the isOne shim.
Header file for the IsResizable type trait.
Header file for the IsSquare type trait.
Header file for the IsStrictlyTriangular type trait.
Header file for the IsStrictlyUpper type trait.
Header file for the IsUniTriangular type trait.
Header file for the IsUniUpper type trait.
Constraint on the data type.
Header file for the MAYBE_UNUSED function template.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Header file for the UniUpperProxy class.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Header file for the implementation of the base template of the UniUpperMatrix.
Initializer list type of the Blaze library.
Pointer difference type of the Blaze library.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Header file for utility functions for dense matrices.
Header file for the implementation of a matrix representation of an initializer list.
Header file for the DenseMatrix base class.
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition: Column.h:137
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.
Definition: Volatile.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_POINTER_TYPE(T)
Constraint on the data type.
Definition: Pointer.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.
Definition: Const.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.
Definition: Reference.h:79
MT::ElementType * data(DenseMatrix< MT, SO > &dm) noexcept
Low-level data access to the dense matrix elements.
Definition: DenseMatrix.h:182
auto operator+=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsScalar_v< ST >, MT & >
Addition assignment operator for the addition of a dense matrix and a scalar value ( ).
Definition: DenseMatrix.h:386
bool isStrictlyUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly upper triangular matrix.
Definition: DenseMatrix.h:2363
size_t spacing(const DenseMatrix< MT, SO > &dm) noexcept
Returns the spacing between the beginning of two rows/columns.
Definition: DenseMatrix.h:265
decltype(auto) declupp(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as upper.
Definition: DMatDeclUppExpr.h:1004
decltype(auto) operator*(const DenseMatrix< MT1, false > &lhs, const DenseMatrix< MT2, false > &rhs)
Multiplication operator for the multiplication of two row-major dense matrices ( ).
Definition: DMatDMatMultExpr.h:9640
bool isUniUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is an upper unitriangular matrix.
Definition: DenseMatrix.h:2276
auto operator-=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsScalar_v< ST >, MT & >
Subtraction assignment operator for the subtraction of a dense matrix and a scalar value ( ).
Definition: DenseMatrix.h:448
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:207
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:225
decltype(auto) elements(Vector< VT, TF > &vector, REAs... args)
Creating a view on a selection of elements of the given vector.
Definition: Elements.h:143
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Symmetric.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VIEW_TYPE(T)
Constraint on the data type.
Definition: View.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_HERMITIAN_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Hermitian.h:79
#define BLAZE_CONSTRAINT_MUST_BE_SQUARE_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Square.h:60
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UPPER_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Upper.h:81
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.
Definition: DenseMatrix.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_COMPUTATION_TYPE(T)
Constraint on the data type.
Definition: Computation.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_RESIZABLE_TYPE(T)
Constraint on the data type.
Definition: Resizable.h:81
#define BLAZE_CONSTRAINT_MUST_BE_STATIC_TYPE(T)
Constraint on the data type.
Definition: Static.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UNIFORM_TYPE(T)
Constraint on the data type.
Definition: Uniform.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_LOWER_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Lower.h:81
#define BLAZE_CONSTRAINT_MUST_BE_RESIZABLE_TYPE(T)
Constraint on the data type.
Definition: Resizable.h:61
#define BLAZE_CONSTRAINT_MUST_BE_SCALAR_TYPE(T)
Constraint on the data type.
Definition: Scalar.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_TRANSFORMATION_TYPE(T)
Constraint on the data type.
Definition: Transformation.h:81
#define BLAZE_CONSTRAINT_MUST_BE_MATRIX_WITH_STORAGE_ORDER(T, SO)
Constraint on the data type.
Definition: StorageOrder.h:63
constexpr ptrdiff_t Size_v
Auxiliary variable template for the Size type trait.
Definition: Size.h:176
constexpr bool IsComputation_v
Auxiliary variable template for the IsComputation type trait.
Definition: IsComputation.h:90
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:370
bool isOne(const Proxy< PT, RT > &proxy)
Returns whether the represented element is 1.
Definition: Proxy.h:2337
constexpr bool operator==(const NegativeAccuracy< A > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:253
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:332
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:446
constexpr bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:293
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:408
constexpr void clear(Matrix< MT, SO > &matrix)
Clearing the given matrix.
Definition: Matrix.h:960
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:628
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:644
size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition: Matrix.h:730
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:562
size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:692
constexpr void reset(Matrix< MT, SO > &matrix)
Resetting the given matrix.
Definition: Matrix.h:806
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:660
void resize(Matrix< MT, SO > &matrix, size_t rows, size_t columns, bool preserve=true)
Changing the size of the matrix.
Definition: Matrix.h:1108
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:584
MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:518
void shrinkToFit(Matrix< MT, SO > &matrix)
Requesting the removal of unused capacity.
Definition: Matrix.h:1169
bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:1383
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition: Row.h:137
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition: Assert.h:101
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.
Definition: Assert.h:117
BLAZE_ALWAYS_INLINE const EnableIf_t< IsIntegral_v< T > &&HasSize_v< T, 1UL >, If_t< IsSigned_v< T >, SIMDint8, SIMDuint8 > > loadu(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition: Loadu.h:76
BLAZE_ALWAYS_INLINE const EnableIf_t< IsIntegral_v< T > &&HasSize_v< T, 1UL >, If_t< IsSigned_v< T >, SIMDint8, SIMDuint8 > > loada(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition: Loada.h:79
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.
Definition: StaticAssert.h:112
decltype(auto) submatrix(Matrix< MT, SO > &, RSAs...)
Creating a view on a specific submatrix of the given matrix.
Definition: Submatrix.h:181
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
BoolConstant< true > TrueType
Type traits base class.
Definition: IntegralConstant.h:132
BoolConstant< false > FalseType
Type/value traits base class.
Definition: IntegralConstant.h:121
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition: EnableIf.h:138
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.
Definition: Exception.h:331
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.
Definition: Exception.h:235
typename EnableIf<!Condition, T >::Type DisableIf_t
Auxiliary type for the EnableIf class template.
Definition: EnableIf.h:175
Header file for the exception macros of the math module.
Header file for the extended initializer_list functionality.
Header file for all adaptor forward declarations.
Constraints on the storage order of matrix types.
Header file for the Size type trait.
Header file for the clear shim.
System settings for the inline keywords.
Header file for basic type definitions.
Header file for the implementation of the Submatrix view.