35 #ifndef _BLAZE_MATH_VIEWS_SUBVECTOR_SPARSE_H_ 36 #define _BLAZE_MATH_VIEWS_SUBVECTOR_SPARSE_H_ 100 class Subvector<VT,AF,TF,false>
101 :
public View< SparseVector< Subvector<VT,AF,TF,false>, TF > >
106 using Operand = If_< IsExpression<VT>, VT, VT& >;
111 using This = Subvector<VT,AF,TF,false>;
112 using BaseType = SparseVector<This,TF>;
129 template<
typename VectorType
130 ,
typename IteratorType >
131 class SubvectorElement
132 :
private SparseElement
141 inline SubvectorElement( IteratorType pos,
size_t offset )
153 template<
typename T >
inline SubvectorElement& operator=(
const T& v ) {
165 template<
typename T >
inline SubvectorElement&
operator+=(
const T& v ) {
177 template<
typename T >
inline SubvectorElement&
operator-=(
const T& v ) {
189 template<
typename T >
inline SubvectorElement&
operator*=(
const T& v ) {
201 template<
typename T >
inline SubvectorElement&
operator/=(
const T& v ) {
212 inline const SubvectorElement* operator->()
const {
222 inline decltype(
auto) value()
const {
223 return pos_->value();
232 inline size_t index()
const {
233 return pos_->index() - offset_;
248 template<
typename VectorType
249 ,
typename IteratorType >
250 class SubvectorIterator
254 using IteratorCategory = std::forward_iterator_tag;
255 using ValueType = SubvectorElement<VectorType,IteratorType>;
256 using PointerType = ValueType;
257 using ReferenceType = ValueType;
258 using DifferenceType = ptrdiff_t;
261 using iterator_category = IteratorCategory;
262 using value_type = ValueType;
263 using pointer = PointerType;
264 using reference = ReferenceType;
265 using difference_type = DifferenceType;
271 inline SubvectorIterator()
283 inline SubvectorIterator( IteratorType iterator,
size_t index )
294 template<
typename VectorType2,
typename IteratorType2 >
295 inline SubvectorIterator(
const SubvectorIterator<VectorType2,IteratorType2>& it )
297 , offset_( it.offset() )
306 inline SubvectorIterator& operator++() {
317 inline const SubvectorIterator operator++(
int ) {
318 const SubvectorIterator tmp( *
this );
330 return ReferenceType( pos_, offset_ );
339 inline PointerType operator->()
const {
340 return PointerType( pos_, offset_ );
350 template<
typename VectorType2,
typename IteratorType2 >
351 inline bool operator==(
const SubvectorIterator<VectorType2,IteratorType2>& rhs )
const {
352 return base() == rhs.base();
362 template<
typename VectorType2,
typename IteratorType2 >
363 inline bool operator!=(
const SubvectorIterator<VectorType2,IteratorType2>& rhs )
const {
364 return !( *
this == rhs );
374 inline DifferenceType
operator-(
const SubvectorIterator& rhs )
const {
375 return pos_ - rhs.pos_;
384 inline IteratorType base()
const {
394 inline size_t offset() const noexcept {
409 using ConstIterator = SubvectorIterator< const VT, ConstIterator_<VT> >;
417 enum :
bool { smpAssignable = VT::smpAssignable };
423 explicit inline Subvector( Operand vector,
size_t index,
size_t n );
435 inline Reference operator[](
size_t index );
436 inline ConstReference operator[](
size_t index )
const;
438 inline ConstReference at(
size_t index )
const;
440 inline ConstIterator
begin ()
const;
441 inline ConstIterator
cbegin()
const;
443 inline ConstIterator
end ()
const;
444 inline ConstIterator
cend ()
const;
451 inline Subvector& operator= (
const Subvector& rhs );
452 template<
typename VT2 >
inline Subvector& operator= (
const Vector<VT2,TF>& rhs );
453 template<
typename VT2 >
inline Subvector&
operator+=(
const Vector<VT2,TF>& rhs );
454 template<
typename VT2 >
inline Subvector&
operator-=(
const Vector<VT2,TF>& rhs );
455 template<
typename VT2 >
inline Subvector&
operator*=(
const Vector<VT2,TF>& rhs );
456 template<
typename VT2 >
inline Subvector&
operator/=(
const DenseVector<VT2,TF>& rhs );
457 template<
typename VT2 >
inline Subvector& operator%=(
const Vector<VT2,TF>& rhs );
459 template<
typename Other >
460 inline EnableIf_<IsNumeric<Other>, Subvector >&
operator*=( Other rhs );
462 template<
typename Other >
463 inline EnableIf_<IsNumeric<Other>, Subvector >&
operator/=( Other rhs );
470 inline Operand operand() const noexcept;
471 inline
size_t offset() const noexcept;
472 inline
size_t size() const noexcept;
473 inline
size_t capacity() const noexcept;
476 inline
void reserve(
size_t n );
485 inline
void append(
size_t index, const
ElementType& value,
bool check=false );
492 inline
void erase(
size_t index );
496 template< typename Pred, typename =
DisableIf_< IsIntegral<Pred> > >
497 inline
void erase( Pred predicate );
499 template< typename Pred >
507 inline
Iterator find (
size_t index );
508 inline ConstIterator find (
size_t index ) const;
509 inline
Iterator lowerBound(
size_t index );
510 inline ConstIterator lowerBound(
size_t index ) const;
511 inline
Iterator upperBound(
size_t index );
512 inline ConstIterator upperBound(
size_t index ) const;
519 template< typename Other > inline Subvector& scale( const Other& scalar );
526 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
527 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
529 inline
bool canSMPAssign() const noexcept;
531 template< typename VT2 > inline
void assign ( const DenseVector <VT2,TF>& rhs );
532 template< typename VT2 > inline
void assign ( const SparseVector<VT2,TF>& rhs );
533 template< typename VT2 > inline
void addAssign( const DenseVector <VT2,TF>& rhs );
534 template< typename VT2 > inline
void addAssign( const SparseVector<VT2,TF>& rhs );
535 template< typename VT2 > inline
void subAssign( const DenseVector <VT2,TF>& rhs );
536 template< typename VT2 > inline
void subAssign( const SparseVector<VT2,TF>& rhs );
545 const
size_t offset_;
583 template< typename VT
586 inline Subvector<VT,AF,TF,false>::Subvector( Operand vector,
size_t index,
size_t n )
591 if( index + n > vector.size() ) {
617 template<
typename VT
621 Subvector<VT,AF,TF,false>::operator[](
size_t index )
624 return vector_[offset_+index];
640 template<
typename VT
644 Subvector<VT,AF,TF,false>::operator[](
size_t index )
const 647 return const_cast<const VT&
>( vector_ )[offset_+index];
664 template<
typename VT
668 Subvector<VT,AF,TF,false>::at(
size_t index )
670 if( index >=
size() ) {
673 return (*
this)[index];
690 template<
typename VT
694 Subvector<VT,AF,TF,false>::at(
size_t index )
const 696 if( index >=
size() ) {
699 return (*
this)[index];
713 template<
typename VT
719 return Iterator( vector_.begin(), offset_ );
721 return Iterator( vector_.lowerBound( offset_ ), offset_ );
735 template<
typename VT
743 return ConstIterator( vector_.lowerBound( offset_ ), offset_ );
757 template<
typename VT
765 return ConstIterator( vector_.lowerBound( offset_ ), offset_ );
779 template<
typename VT
784 if( offset_ + size_ == vector_.size() )
785 return Iterator( vector_.end(), offset_ );
787 return Iterator( vector_.lowerBound( offset_ + size_ ), offset_ );
801 template<
typename VT
806 if( offset_ + size_ == vector_.size() )
809 return ConstIterator( vector_.lowerBound( offset_ + size_ ), offset_ );
823 template<
typename VT
828 if( offset_ + size_ == vector_.size() )
831 return ConstIterator( vector_.lowerBound( offset_ + size_ ), offset_ );
857 template<
typename VT
860 inline Subvector<VT,AF,TF,false>&
861 Subvector<VT,AF,TF,false>::operator=(
const Subvector& rhs )
868 if(
this == &rhs || ( &vector_ == &rhs.vector_ && offset_ == rhs.offset_ ) )
871 if(
size() != rhs.size() ) {
875 if( !tryAssign( vector_, rhs, offset_ ) ) {
879 decltype(
auto) left( derestrict( *this ) );
881 if( rhs.canAlias( &vector_ ) ) {
911 template<
typename VT
914 template<
typename VT2 >
915 inline Subvector<VT,AF,TF,false>&
916 Subvector<VT,AF,TF,false>::operator=(
const Vector<VT2,TF>& rhs )
927 using Right = If_< IsRestricted<VT>, CompositeType_<VT2>,
const VT2& >;
930 if( !tryAssign( vector_, right, offset_ ) ) {
934 decltype(
auto) left( derestrict( *this ) );
936 if( IsReference<Right>::value || right.canAlias( &vector_ ) ) {
937 const ResultType_<VT2> tmp( right );
943 assign( left, right );
966 template<
typename VT
969 template<
typename VT2 >
970 inline Subvector<VT,AF,TF,false>&
979 using AddType = AddTrait_< ResultType, ResultType_<VT2> >;
988 const AddType tmp( *
this + (~rhs) );
990 if( !tryAssign( vector_, tmp, offset_ ) ) {
994 decltype(
auto) left( derestrict( *this ) );
1019 template< typename VT
1022 template< typename VT2 >
1023 inline Subvector<VT,AF,TF,false>&
1024 Subvector<VT,AF,TF,false>::operator-=( const Vector<VT2,TF>& rhs )
1026 using blaze::assign;
1032 using SubType = SubTrait_< ResultType, ResultType_<VT2> >;
1041 const SubType tmp( *
this - (~rhs) );
1043 if( !tryAssign( vector_, tmp, offset_ ) ) {
1047 decltype(
auto) left( derestrict( *this ) );
1050 assign( left, tmp );
1073 template< typename VT
1076 template< typename VT2 >
1077 inline Subvector<VT,AF,TF,false>&
1078 Subvector<VT,AF,TF,false>::operator*=( const Vector<VT2,TF>& rhs )
1080 using blaze::assign;
1086 using MultType = MultTrait_< ResultType, ResultType_<VT2> >;
1095 const MultType tmp( *
this * (~rhs) );
1097 if( !tryAssign( vector_, tmp, offset_ ) ) {
1101 decltype(
auto) left( derestrict( *this ) );
1104 assign( left, tmp );
1126 template< typename VT
1129 template< typename VT2 >
1130 inline Subvector<VT,AF,TF,false>&
1131 Subvector<VT,AF,TF,false>::operator/=( const DenseVector<VT2,TF>& rhs )
1133 using blaze::assign;
1140 using DivType = DivTrait_< ResultType, ResultType_<VT2> >;
1150 const DivType tmp( *
this / (~rhs) );
1152 if( !tryAssign( vector_, tmp, offset_ ) ) {
1156 decltype(
auto) left( derestrict( *this ) );
1159 assign( left, tmp );
1182 template< typename VT
1185 template< typename VT2 >
1186 inline Subvector<VT,AF,TF,false>&
1187 Subvector<VT,AF,TF,false>::operator%=( const Vector<VT2,TF>& rhs )
1189 using blaze::assign;
1194 using CrossType = CrossTrait_< ResultType, ResultType_<VT2> >;
1200 if(
size() != 3UL || (~rhs).
size() != 3UL ) {
1204 const CrossType tmp( *
this % (~rhs) );
1206 if( !tryAssign( vector_, tmp, offset_ ) ) {
1210 decltype(
auto) left( derestrict( *this ) );
1213 assign( left, tmp );
1235 template< typename VT
1238 template< typename Other >
1239 inline
EnableIf_<IsNumeric<Other>, Subvector<VT,AF,TF,false> >&
1240 Subvector<VT,AF,TF,false>::operator*=( Other rhs )
1244 element->value() *= rhs;
1264 template<
typename VT
1267 template<
typename Other >
1268 inline EnableIf_<IsNumeric<Other>, Subvector<VT,AF,TF,false> >&
1273 using DT = DivTrait_<ElementType,Other>;
1274 using Tmp = If_< IsNumeric<DT>, DT, Other >;
1280 if( IsNumeric<DT>::value && IsFloatingPoint<DT>::value ) {
1281 const Tmp tmp( Tmp(1)/static_cast<Tmp>( rhs ) );
1283 element->value() *= tmp;
1287 element->value() /= rhs;
1310 template<
typename VT
1313 inline typename Subvector<VT,AF,TF,false>::Operand
1314 Subvector<VT,AF,TF,false>::operand() const noexcept
1328 template<
typename VT
1331 inline size_t Subvector<VT,AF,TF,false>::offset() const noexcept
1345 template<
typename VT
1362 template<
typename VT
1367 return nonZeros() + vector_.capacity() - vector_.nonZeros();
1381 template<
typename VT
1398 template<
typename VT
1403 vector_.erase( vector_.lowerBound( offset_ ), vector_.lowerBound( offset_ + size_ ) );
1419 template<
typename VT
1422 void Subvector<VT,AF,TF,false>::reserve(
size_t n )
1424 const size_t current(
capacity() );
1427 vector_.reserve( vector_.capacity() + n - current );
1454 template<
typename VT
1460 return Iterator( vector_.set( offset_ + index, value ), offset_ );
1479 template<
typename VT
1483 Subvector<VT,AF,TF,false>::insert(
size_t index,
const ElementType& value )
1485 return Iterator( vector_.insert( offset_ + index, value ), offset_ );
1516 template<
typename VT
1519 inline void Subvector<VT,AF,TF,false>::append(
size_t index,
const ElementType& value,
bool check )
1521 if( offset_ + size_ == vector_.size() )
1522 vector_.append( offset_ + index, value, check );
1523 else if( !check || !
isDefault( value ) )
1524 vector_.insert( offset_ + index, value );
1547 template<
typename VT
1550 inline void Subvector<VT,AF,TF,false>::erase(
size_t index )
1552 vector_.erase( offset_ + index );
1567 template<
typename VT
1572 return Iterator( vector_.erase( pos.base() ), offset_ );
1588 template<
typename VT
1594 return Iterator( vector_.erase( first.base(), last.base() ), offset_ );
1623 template<
typename VT
1626 template<
typename Pred
1628 inline void Subvector<VT,AF,TF,false>::erase( Pred predicate )
1630 vector_.erase(
begin().base(),
end().base(), predicate );
1662 template<
typename VT
1665 template<
typename Pred >
1666 inline void Subvector<VT,AF,TF,false>::erase(
Iterator first,
Iterator last, Pred predicate )
1668 vector_.erase( first.base(), last.base(), predicate );
1696 template<
typename VT
1700 Subvector<VT,AF,TF,false>::find(
size_t index )
1702 const Iterator_<VT> pos( vector_.find( offset_ + index ) );
1704 if( pos != vector_.end() )
1727 template<
typename VT
1731 Subvector<VT,AF,TF,false>::find(
size_t index )
const 1733 const ConstIterator_<VT> pos( vector_.find( offset_ + index ) );
1735 if( pos != vector_.end() )
1757 template<
typename VT
1761 Subvector<VT,AF,TF,false>::lowerBound(
size_t index )
1763 return Iterator( vector_.lowerBound( offset_ + index ), offset_ );
1782 template<
typename VT
1786 Subvector<VT,AF,TF,false>::lowerBound(
size_t index )
const 1788 return ConstIterator( vector_.lowerBound( offset_ + index ), offset_ );
1807 template<
typename VT
1811 Subvector<VT,AF,TF,false>::upperBound(
size_t index )
1813 return Iterator( vector_.upperBound( offset_ + index ), offset_ );
1832 template<
typename VT
1836 Subvector<VT,AF,TF,false>::upperBound(
size_t index )
const 1838 return ConstIterator( vector_.upperBound( offset_ + index ), offset_ );
1863 template<
typename VT
1866 template<
typename Other >
1867 inline Subvector<VT,AF,TF,false>& Subvector<VT,AF,TF,false>::scale(
const Other& scalar )
1870 element->value() *= scalar;
1896 template<
typename VT
1899 template<
typename Other >
1900 inline bool Subvector<VT,AF,TF,false>::canAlias(
const Other* alias )
const noexcept
1902 return vector_.isAliased( alias );
1919 template<
typename VT
1922 template<
typename Other >
1923 inline bool Subvector<VT,AF,TF,false>::isAliased(
const Other* alias )
const noexcept
1925 return vector_.isAliased( alias );
1942 template<
typename VT
1945 inline bool Subvector<VT,AF,TF,false>::canSMPAssign() const noexcept
1965 template<
typename VT
1968 template<
typename VT2 >
1969 inline void Subvector<VT,AF,TF,false>::assign(
const DenseVector<VT2,TF>& rhs )
1974 reserve( (~rhs).
size() );
1976 for(
size_t i=0UL; i<
size(); ++i ) {
1977 append( i, (~rhs)[i],
true );
1996 template<
typename VT
1999 template<
typename VT2 >
2000 inline void Subvector<VT,AF,TF,false>::assign(
const SparseVector<VT2,TF>& rhs )
2007 for( ConstIterator_<VT2> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element ) {
2008 append( element->index(), element->value(), true );
2027 template<
typename VT
2030 template<
typename VT2 >
2031 inline void Subvector<VT,AF,TF,false>::addAssign(
const DenseVector<VT2,TF>& rhs )
2033 using AddType = AddTrait_< ResultType, ResultType_<VT2> >;
2041 const AddType tmp(
serial( *
this + (~rhs) ) );
2061 template<
typename VT
2064 template<
typename VT2 >
2065 inline void Subvector<VT,AF,TF,false>::addAssign(
const SparseVector<VT2,TF>& rhs )
2067 using AddType = AddTrait_< ResultType, ResultType_<VT2> >;
2075 const AddType tmp(
serial( *
this + (~rhs) ) );
2095 template<
typename VT
2098 template<
typename VT2 >
2099 inline void Subvector<VT,AF,TF,false>::subAssign(
const DenseVector<VT2,TF>& rhs )
2101 using SubType = SubTrait_< ResultType, ResultType_<VT2> >;
2109 const SubType tmp(
serial( *
this - (~rhs) ) );
2129 template<
typename VT
2132 template<
typename VT2 >
2133 inline void Subvector<VT,AF,TF,false>::subAssign(
const SparseVector<VT2,TF>& rhs )
2135 using SubType = SubTrait_< ResultType, ResultType_<VT2> >;
2143 const SubType tmp(
serial( *
this - (~rhs) ) );
#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.
#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 alignment flag values.
Header file for the subtraction trait.
BLAZE_ALWAYS_INLINE size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:356
Header file for basic type definitions.
Header file for the SparseVector base class.
Header file for the View base class.
Header file for the serial shim.
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector) noexcept
Returns the current size/dimension of the vector.
Definition: Vector.h:265
#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
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:1411
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:3078
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:198
CompressedMatrix< Type, true > This
Type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:3076
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:560
typename DisableIf< Condition, T >::Type DisableIf_
Auxiliary type for the DisableIf class template.The DisableIf_ alias declaration provides a convenien...
Definition: DisableIf.h:224
Header file for the IsIntegral type trait.
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:3080
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:3085
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:394
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
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:3086
#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
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:1393
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:308
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:242
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:3084
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the If class template.
Header file for the IsFloatingPoint type trait.
SparseMatrix< This, true > BaseType
Base type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:3077
Type ElementType
Type of the compressed matrix elements.
Definition: CompressedMatrix.h:3081
#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.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3087
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 the subvector trait.
#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.
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:264
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:8893
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
Constraint on the data type.
Constraint on the data type.
Header file for the EnableIf class template.
Header file for the IsNumeric type trait.
BLAZE_ALWAYS_INLINE const EnableIf_< And< IsIntegral< T >, HasSize< T, 1UL > >, If_< IsSigned< T >, SIMDint8, SIMDuint8 > > set(T value) noexcept
Sets all values in the vector to the given 1-byte integral value.
Definition: Set.h:76
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 addition trait.
Header file for the cross product trait.
Header file for the division trait.
Header file for the isDefault shim.
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:819
#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.
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:224
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3082
#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:3083
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:252
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:600
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
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.