35 #ifndef _BLAZE_MATH_VIEWS_SUBVECTOR_SPARSE_H_ 36 #define _BLAZE_MATH_VIEWS_SUBVECTOR_SPARSE_H_ 100 template<
typename VT
104 class Subvector<VT,AF,TF,false,CSAs...>
105 :
public View< SparseVector< Subvector<VT,AF,TF,false,CSAs...>, TF > >
106 ,
private SubvectorData<CSAs...>
110 using DataType = SubvectorData<CSAs...>;
111 using Operand = If_t< IsExpression_v<VT>, VT, VT& >;
117 using This = Subvector<VT,AF,TF,
false,CSAs...>;
119 using BaseType = SparseVector<This,TF>;
120 using ViewedType = VT;
137 template<
typename VectorType
138 ,
typename IteratorType >
139 class SubvectorElement
140 :
private SparseElement
149 inline SubvectorElement( IteratorType pos,
size_t offset )
161 template<
typename T >
inline SubvectorElement& operator=(
const T& v ) {
173 template<
typename T >
inline SubvectorElement&
operator+=(
const T& v ) {
185 template<
typename T >
inline SubvectorElement&
operator-=(
const T& v ) {
197 template<
typename T >
inline SubvectorElement&
operator*=(
const T& v ) {
209 template<
typename T >
inline SubvectorElement&
operator/=(
const T& v ) {
220 inline const SubvectorElement* operator->()
const {
230 inline decltype(
auto) value()
const {
231 return pos_->value();
240 inline size_t index()
const {
241 return pos_->index() - offset_;
256 template<
typename VectorType
257 ,
typename IteratorType >
258 class SubvectorIterator
262 using IteratorCategory = std::forward_iterator_tag;
263 using ValueType = SubvectorElement<VectorType,IteratorType>;
264 using PointerType = ValueType;
265 using ReferenceType = ValueType;
266 using DifferenceType = ptrdiff_t;
269 using iterator_category = IteratorCategory;
270 using value_type = ValueType;
271 using pointer = PointerType;
272 using reference = ReferenceType;
273 using difference_type = DifferenceType;
279 inline SubvectorIterator()
291 inline SubvectorIterator( IteratorType iterator,
size_t index )
302 template<
typename VectorType2,
typename IteratorType2 >
303 inline SubvectorIterator(
const SubvectorIterator<VectorType2,IteratorType2>& it )
305 , offset_( it.offset() )
314 inline SubvectorIterator& operator++() {
325 inline const SubvectorIterator operator++(
int ) {
326 const SubvectorIterator tmp( *
this );
338 return ReferenceType( pos_, offset_ );
347 inline PointerType operator->()
const {
348 return PointerType( pos_, offset_ );
358 template<
typename VectorType2,
typename IteratorType2 >
359 inline bool operator==(
const SubvectorIterator<VectorType2,IteratorType2>& rhs )
const {
360 return base() == rhs.base();
370 template<
typename VectorType2,
typename IteratorType2 >
371 inline bool operator!=(
const SubvectorIterator<VectorType2,IteratorType2>& rhs )
const {
372 return !( *
this == rhs );
382 inline DifferenceType
operator-(
const SubvectorIterator& rhs )
const {
383 return pos_ - rhs.pos_;
392 inline IteratorType base()
const {
402 inline size_t offset() const noexcept {
417 using ConstIterator = SubvectorIterator< const VT, ConstIterator_t<VT> >;
431 template<
typename... RSAs >
432 explicit inline Subvector( VT& vector, RSAs... args );
434 Subvector(
const Subvector& ) =
default;
441 ~Subvector() =
default;
448 inline Reference operator[](
size_t index );
464 inline Subvector& operator= ( initializer_list<ElementType> list );
465 inline Subvector& operator= (
const Subvector& rhs );
466 template<
typename VT2 >
inline Subvector& operator= (
const Vector<VT2,TF>& rhs );
467 template<
typename VT2 >
inline Subvector&
operator+=(
const Vector<VT2,TF>& rhs );
468 template<
typename VT2 >
inline Subvector&
operator-=(
const Vector<VT2,TF>& rhs );
469 template<
typename VT2 >
inline Subvector&
operator*=(
const Vector<VT2,TF>& rhs );
470 template<
typename VT2 >
inline Subvector&
operator/=(
const DenseVector<VT2,TF>& rhs );
471 template<
typename VT2 >
inline Subvector& operator%=(
const Vector<VT2,TF>& rhs );
478 using DataType::offset;
481 inline VT& operand() noexcept;
482 inline const VT& operand() const noexcept;
484 inline
size_t capacity() const noexcept;
487 inline
void reserve(
size_t n );
496 inline
void append(
size_t index, const
ElementType& value,
bool check=false );
503 inline
void erase(
size_t index );
508 inline
void erase( Pred predicate );
510 template< typename Pred >
518 inline
Iterator find (
size_t index );
520 inline
Iterator lowerBound(
size_t index );
522 inline
Iterator upperBound(
size_t index );
530 template< typename Other > inline Subvector& scale( const Other& scalar );
537 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
538 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
540 inline
bool canSMPAssign() const noexcept;
542 template< typename VT2 > inline
void assign ( const DenseVector <VT2,TF>& rhs );
543 template< typename VT2 > inline
void assign ( const SparseVector<VT2,TF>& rhs );
544 template< typename VT2 > inline
void addAssign( const DenseVector <VT2,TF>& rhs );
545 template< typename VT2 > inline
void addAssign( const SparseVector<VT2,TF>& rhs );
546 template< typename VT2 > inline
void subAssign( const DenseVector <VT2,TF>& rhs );
547 template< typename VT2 > inline
void subAssign( const SparseVector<VT2,TF>& rhs );
593 template< typename VT
597 template< typename... RSAs >
598 inline Subvector<VT,AF,TF,false,CSAs...>::Subvector( VT& vector, RSAs... args )
599 : DataType( args... )
603 if( offset() +
size() > vector.size() ) {
633 template<
typename VT
637 inline typename Subvector<VT,AF,TF,
false,CSAs...>
::Reference 638 Subvector<VT,AF,TF,false,CSAs...>::operator[](
size_t index )
641 return vector_[offset()+index];
657 template<
typename VT
662 Subvector<VT,AF,TF,false,CSAs...>::operator[](
size_t index )
const 665 return const_cast<const VT&
>( vector_ )[offset()+index];
682 template<
typename VT
686 inline typename Subvector<VT,AF,TF,
false,CSAs...>
::Reference 687 Subvector<VT,AF,TF,false,CSAs...>::at(
size_t index )
689 if( index >=
size() ) {
692 return (*
this)[index];
709 template<
typename VT
714 Subvector<VT,AF,TF,false,CSAs...>::at(
size_t index )
const 716 if( index >=
size() ) {
719 return (*
this)[index];
733 template<
typename VT
737 inline typename Subvector<VT,AF,TF,
false,CSAs...>
::Iterator 740 if( offset() == 0UL )
741 return Iterator( vector_.begin(), offset() );
743 return Iterator( vector_.lowerBound( offset() ), offset() );
757 template<
typename VT
764 if( offset() == 0UL )
767 return ConstIterator( vector_.lowerBound( offset() ), offset() );
781 template<
typename VT
788 if( offset() == 0UL )
791 return ConstIterator( vector_.lowerBound( offset() ), offset() );
805 template<
typename VT
809 inline typename Subvector<VT,AF,TF,
false,CSAs...>
::Iterator 812 if( offset() +
size() == vector_.size() )
813 return Iterator( vector_.end(), offset() );
815 return Iterator( vector_.lowerBound( offset() +
size() ), offset() );
829 template<
typename VT
836 if( offset() +
size() == vector_.size() )
853 template<
typename VT
860 if( offset() +
size() == vector_.size() )
892 template<
typename VT
896 inline Subvector<VT,AF,TF,
false,CSAs...>&
897 Subvector<VT,AF,TF,false,CSAs...>::operator=( initializer_list<ElementType> list )
901 if( list.size() >
size() ) {
905 const InitializerVector<ElementType,TF> tmp( list,
size() );
907 if( !tryAssign( vector_, tmp, offset() ) ) {
911 decltype(
auto) left( derestrict( *this ) );
936 template< typename VT
940 inline Subvector<VT,AF,TF,false,CSAs...>&
941 Subvector<VT,AF,TF,false,CSAs...>::operator=( const Subvector& rhs )
948 if(
this == &rhs || ( &vector_ == &rhs.vector_ && offset() == rhs.offset() ) )
951 if(
size() != rhs.size() ) {
955 if( !tryAssign( vector_, rhs, offset() ) ) {
959 decltype(
auto) left( derestrict( *this ) );
961 if( rhs.canAlias( &vector_ ) ) {
991 template<
typename VT
995 template<
typename VT2 >
996 inline Subvector<VT,AF,TF,
false,CSAs...>&
997 Subvector<VT,AF,TF,false,CSAs...>::operator=(
const Vector<VT2,TF>& rhs )
1008 using Right = If_t< IsRestricted_v<VT>, CompositeType_t<VT2>,
const VT2& >;
1009 Right right( ~rhs );
1011 if( !tryAssign( vector_, right, offset() ) ) {
1015 decltype(
auto) left( derestrict( *this ) );
1018 const ResultType_t<VT2> tmp( right );
1020 assign( left, tmp );
1024 assign( left, right );
1047 template<
typename VT
1051 template<
typename VT2 >
1052 inline Subvector<VT,AF,TF,
false,CSAs...>&
1055 using blaze::assign;
1061 using AddType = AddTrait_t< ResultType, ResultType_t<VT2> >;
1070 const AddType tmp( *
this + (~rhs) );
1072 if( !tryAssign( vector_, tmp, offset() ) ) {
1076 decltype(
auto) left( derestrict( *this ) );
1079 assign( left, tmp );
1101 template< typename VT
1105 template< typename VT2 >
1106 inline Subvector<VT,AF,TF,false,CSAs...>&
1107 Subvector<VT,AF,TF,false,CSAs...>::operator-=( const Vector<VT2,TF>& rhs )
1109 using blaze::assign;
1115 using SubType = SubTrait_t< ResultType, ResultType_t<VT2> >;
1124 const SubType tmp( *
this - (~rhs) );
1126 if( !tryAssign( vector_, tmp, offset() ) ) {
1130 decltype(
auto) left( derestrict( *this ) );
1133 assign( left, tmp );
1156 template< typename VT
1160 template< typename VT2 >
1161 inline Subvector<VT,AF,TF,false,CSAs...>&
1162 Subvector<VT,AF,TF,false,CSAs...>::operator*=( const Vector<VT2,TF>& rhs )
1164 using blaze::assign;
1170 using MultType = MultTrait_t< ResultType, ResultType_t<VT2> >;
1179 const MultType tmp( *
this * (~rhs) );
1181 if( !tryAssign( vector_, tmp, offset() ) ) {
1185 decltype(
auto) left( derestrict( *this ) );
1188 assign( left, tmp );
1210 template< typename VT
1214 template< typename VT2 >
1215 inline Subvector<VT,AF,TF,false,CSAs...>&
1216 Subvector<VT,AF,TF,false,CSAs...>::operator/=( const DenseVector<VT2,TF>& rhs )
1218 using blaze::assign;
1225 using DivType = DivTrait_t< ResultType, ResultType_t<VT2> >;
1235 const DivType tmp( *
this / (~rhs) );
1237 if( !tryAssign( vector_, tmp, offset() ) ) {
1241 decltype(
auto) left( derestrict( *this ) );
1244 assign( left, tmp );
1267 template< typename VT
1271 template< typename VT2 >
1272 inline Subvector<VT,AF,TF,false,CSAs...>&
1273 Subvector<VT,AF,TF,false,CSAs...>::operator%=( const Vector<VT2,TF>& rhs )
1275 using blaze::assign;
1280 using CrossType = CrossTrait_t< ResultType, ResultType_t<VT2> >;
1286 if(
size() != 3UL || (~rhs).
size() != 3UL ) {
1290 const CrossType tmp( *
this % (~rhs) );
1292 if( !tryAssign( vector_, tmp, offset() ) ) {
1296 decltype(
auto) left( derestrict( *this ) );
1299 assign( left, tmp );
1323 template< typename VT
1327 inline VT& Subvector<VT,AF,TF,false,CSAs...>::operand() noexcept
1341 template<
typename VT
1345 inline const VT& Subvector<VT,AF,TF,false,CSAs...>::operand() const noexcept
1359 template<
typename VT
1365 return nonZeros() + vector_.capacity() - vector_.nonZeros();
1379 template<
typename VT
1397 template<
typename VT
1403 vector_.erase( vector_.lowerBound( offset() ), vector_.lowerBound( offset() +
size() ) );
1419 template<
typename VT
1423 void Subvector<VT,AF,TF,false,CSAs...>::reserve(
size_t n )
1425 const size_t current(
capacity() );
1428 vector_.reserve( vector_.capacity() + n - current );
1455 template<
typename VT
1459 inline typename Subvector<VT,AF,TF,
false,CSAs...>
::Iterator 1462 return Iterator( vector_.set( offset() + index, value ), offset() );
1481 template<
typename VT
1485 inline typename Subvector<VT,AF,TF,
false,CSAs...>
::Iterator 1486 Subvector<VT,AF,TF,false,CSAs...>::insert(
size_t index,
const ElementType& value )
1488 return Iterator( vector_.insert( offset() + index, value ), offset() );
1519 template<
typename VT
1523 inline void Subvector<VT,AF,TF,false,CSAs...>::append(
size_t index,
const ElementType& value,
bool check )
1525 if( offset() +
size() == vector_.size() )
1526 vector_.append( offset() + index, value, check );
1527 else if( !check || !isDefault<strict>( value ) )
1528 vector_.insert( offset() + index, value );
1551 template<
typename VT
1555 inline void Subvector<VT,AF,TF,false,CSAs...>::erase(
size_t index )
1557 vector_.erase( offset() + index );
1572 template<
typename VT
1576 inline typename Subvector<VT,AF,TF,
false,CSAs...>
::Iterator 1577 Subvector<VT,AF,TF,false,CSAs...>::erase(
Iterator pos )
1579 return Iterator( vector_.erase( pos.base() ), offset() );
1595 template<
typename VT
1599 inline typename Subvector<VT,AF,TF,
false,CSAs...>
::Iterator 1602 return Iterator( vector_.erase( first.base(), last.base() ), offset() );
1631 template<
typename VT
1635 template<
typename Pred
1637 inline void Subvector<VT,AF,TF,false,CSAs...>::erase( Pred predicate )
1639 vector_.erase(
begin().base(),
end().base(), predicate );
1671 template<
typename VT
1675 template<
typename Pred >
1676 inline void Subvector<VT,AF,TF,false,CSAs...>::erase(
Iterator first,
Iterator last, Pred predicate )
1678 vector_.erase( first.base(), last.base(), predicate );
1706 template<
typename VT
1710 inline typename Subvector<VT,AF,TF,
false,CSAs...>
::Iterator 1711 Subvector<VT,AF,TF,false,CSAs...>::find(
size_t index )
1713 const Iterator_t<VT> pos( vector_.find( offset() + index ) );
1715 if( pos != vector_.end() )
1738 template<
typename VT
1743 Subvector<VT,AF,TF,false,CSAs...>::find(
size_t index )
const 1745 const ConstIterator_t<VT> pos( vector_.find( offset() + index ) );
1747 if( pos != vector_.end() )
1769 template<
typename VT
1773 inline typename Subvector<VT,AF,TF,
false,CSAs...>
::Iterator 1774 Subvector<VT,AF,TF,false,CSAs...>::lowerBound(
size_t index )
1776 return Iterator( vector_.lowerBound( offset() + index ), offset() );
1795 template<
typename VT
1800 Subvector<VT,AF,TF,false,CSAs...>::lowerBound(
size_t index )
const 1802 return ConstIterator( vector_.lowerBound( offset() + index ), offset() );
1821 template<
typename VT
1825 inline typename Subvector<VT,AF,TF,
false,CSAs...>
::Iterator 1826 Subvector<VT,AF,TF,false,CSAs...>::upperBound(
size_t index )
1828 return Iterator( vector_.upperBound( offset() + index ), offset() );
1847 template<
typename VT
1852 Subvector<VT,AF,TF,false,CSAs...>::upperBound(
size_t index )
const 1854 return ConstIterator( vector_.upperBound( offset() + index ), offset() );
1879 template<
typename VT
1883 template<
typename Other >
1884 inline Subvector<VT,AF,TF,
false,CSAs...>&
1885 Subvector<VT,AF,TF,false,CSAs...>::scale(
const Other& scalar )
1888 element->value() *= scalar;
1914 template<
typename VT
1918 template<
typename Other >
1919 inline bool Subvector<VT,AF,TF,false,CSAs...>::canAlias(
const Other* alias )
const noexcept
1921 return vector_.isAliased( alias );
1938 template<
typename VT
1942 template<
typename Other >
1943 inline bool Subvector<VT,AF,TF,false,CSAs...>::isAliased(
const Other* alias )
const noexcept
1945 return vector_.isAliased( alias );
1962 template<
typename VT
1966 inline bool Subvector<VT,AF,TF,false,CSAs...>::canSMPAssign() const noexcept
1986 template<
typename VT
1990 template<
typename VT2 >
1991 inline void Subvector<VT,AF,TF,false,CSAs...>::assign(
const DenseVector<VT2,TF>& rhs )
1996 reserve( (~rhs).
size() );
1998 for(
size_t i=0UL; i<
size(); ++i ) {
1999 append( i, (~rhs)[i],
true );
2018 template<
typename VT
2022 template<
typename VT2 >
2023 inline void Subvector<VT,AF,TF,false,CSAs...>::assign(
const SparseVector<VT2,TF>& rhs )
2030 for( ConstIterator_t<VT2> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element ) {
2031 append( element->index(), element->value(), true );
2050 template<
typename VT
2054 template<
typename VT2 >
2055 inline void Subvector<VT,AF,TF,false,CSAs...>::addAssign(
const DenseVector<VT2,TF>& rhs )
2057 using AddType = AddTrait_t< ResultType, ResultType_t<VT2> >;
2065 const AddType tmp(
serial( *
this + (~rhs) ) );
2085 template<
typename VT
2089 template<
typename VT2 >
2090 inline void Subvector<VT,AF,TF,false,CSAs...>::addAssign(
const SparseVector<VT2,TF>& rhs )
2092 using AddType = AddTrait_t< ResultType, ResultType_t<VT2> >;
2100 const AddType tmp(
serial( *
this + (~rhs) ) );
2120 template<
typename VT
2124 template<
typename VT2 >
2125 inline void Subvector<VT,AF,TF,false,CSAs...>::subAssign(
const DenseVector<VT2,TF>& rhs )
2127 using SubType = SubTrait_t< ResultType, ResultType_t<VT2> >;
2135 const SubType tmp(
serial( *
this - (~rhs) ) );
2155 template<
typename VT
2159 template<
typename VT2 >
2160 inline void Subvector<VT,AF,TF,false,CSAs...>::subAssign(
const SparseVector<VT2,TF>& rhs )
2162 using SubType = SubTrait_t< ResultType, ResultType_t<VT2> >;
2170 const SubType tmp(
serial( *
this - (~rhs) ) );
AlignmentFlag
Alignment flag for (un-)aligned vectors and matrices.Via these flags it is possible to specify subvec...
Definition: AlignmentFlag.h:62
#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
Constraint on the data type.
Header file for auxiliary alias declarations.
Header file for the blaze::checked and blaze::unchecked instances.
#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
auto operator/=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Division assignment operator for the division of a dense matrix by a scalar value ( )...
Definition: DenseMatrix.h:354
Header file for the alignment flag values.
Header file for the subtraction trait.
size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:546
Header file for basic type definitions.
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:750
Header file for the SparseVector base class.
Header file for the View base class.
Header file for the serial shim.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_COMPUTATION_TYPE(T)
Constraint on the data type.In case the given data type T is a computational expression (i...
Definition: Computation.h:81
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:3077
MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:372
CompressedMatrix< Type, true > This
Type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:3075
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:591
static constexpr bool smpAssignable
Compilation flag for SMP assignments.
Definition: CompressedMatrix.h:3113
Header file for the IsIntegral type trait.
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:3079
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:3084
constexpr bool IsReference_v
Auxiliary variable template for the IsReference type trait.The IsReference_v variable template provid...
Definition: IsReference.h:95
size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition: Matrix.h:584
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:3085
#define BLAZE_CONSTRAINT_MUST_NOT_BE_TRANSEXPR_TYPE(T)
Constraint on the data type.In case the given data type T is a transposition expression (i...
Definition: TransExpr.h:81
Header file for the extended initializer_list functionality.
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:482
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:416
Constraint on the data type.
Header file for the DisableIf class template.
Header file for the multiplication trait.
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:3083
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the If class template.
Header file for the implementation of a vector representation of an initializer list.
SparseMatrix< This, true > BaseType
Base type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:3076
Type ElementType
Type of the compressed matrix elements.
Definition: CompressedMatrix.h:3080
#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 implementation of the Subvector base template.
Header file for the implementation of the SubvectorData class template.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3086
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
Header file for the subvector trait.
constexpr bool Contains_v
Auxiliary variable template for the Contains type trait.The Contains_v variable template provides a c...
Definition: Contains.h:139
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a sparse, N-dimensional vector type...
Definition: SparseVector.h:61
Constraint on the data type.
Header file for the SparseElement base class.
Constraint on the data type.
Constraint on the data type.
Header file for the exception macros of the math module.
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:438
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:8908
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
Constraint on the data type.
Constraint on the data type.
typename SubvectorTrait< VT, CSAs... >::Type SubvectorTrait_t
Auxiliary alias declaration for the SubvectorTrait type trait.The SubvectorTrait_t alias declaration ...
Definition: SubvectorTrait.h:171
Header file for the IsConst type trait.
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:1357
Header file for run time assertion macros.
Header file for the relaxation flag types.
Header file for the addition trait.
Header file for the cross product trait.
Header file for the division trait.
Header file for the Unique class template.
Check< false > Unchecked
Type of the blaze::unchecked instance.blaze::Unchecked is the type of the blaze::unchecked instance...
Definition: Check.h:96
Header file for the isDefault shim.
BLAZE_ALWAYS_INLINE const EnableIf_t< IsIntegral_v< T > &&HasSize_v< T, 1UL >, If_t< IsSigned_v< T >, SIMDint8, SIMDuint8 > > set(T value) noexcept
Sets all values in the vector to the given 1-byte integral value.
Definition: Set.h:75
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition: Matrix.h:530
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:808
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.In case the given data type T requires an intermediate evaluation within ...
Definition: RequiresEvaluation.h:81
Header file for the IsReference type trait.
Header file for the RemoveReference type trait.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3081
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional vector type...
Definition: DenseVector.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SUBVECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is a subvector type (i.e. a dense or sparse subvector), a compilation error is created.
Definition: Subvector.h:81
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:3082
auto operator*=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Multiplication assignment operator for the multiplication of a dense matrix and a scalar value ( )...
Definition: DenseMatrix.h:290
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:263
constexpr bool IsIntegral_v
Auxiliary variable template for the IsIntegral type trait.The IsIntegral_v variable template provides...
Definition: IsIntegral.h:95
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:1375
typename DisableIf< Condition, T >::Type DisableIf_t
Auxiliary type for the DisableIf class template.The DisableIf_t alias declaration provides a convenie...
Definition: DisableIf.h:138
Header file for the IsRestricted type trait.
#define BLAZE_CONSTRAINT_MUST_BE_VECTOR_WITH_TRANSPOSE_FLAG(T, TF)
Constraint on the data type.In case the given data type T is not a dense or sparse vector type and in...
Definition: TransposeFlag.h:63
#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 IsExpression type trait class.