35 #ifndef _BLAZE_MATH_EXPRESSIONS_DVECSVECOUTEREXPR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_DVECSVECOUTEREXPR_H_ 102 template<
typename VT1
105 :
public VecTVecMultExpr< SparseMatrix< DVecSVecOuterExpr<VT1,VT2>, false > >
127 static constexpr
bool returnExpr = ( !IsTemporary_v<RN1> && !IsTemporary_v<RN2> );
143 ( IsComputation_v<VT1> || !IsNumeric_v<ET1> || IsComputation_v<VT2> || !IsNumeric_v<ET2> );
146 template<
typename MT >
148 static constexpr
bool UseAssign_v =
useAssign;
157 template<
typename T1,
typename T2,
typename T3 >
158 static constexpr
bool UseVectorizedKernel_v =
159 ( useOptimizedKernels &&
160 T1::simdEnabled && T2::simdEnabled &&
172 template<
typename T1,
typename T2,
typename T3 >
173 static constexpr
bool UseDefaultKernel_v = !UseVectorizedKernel_v<T1,T2,T3>;
281 return v_ *
it_->value();
382 if( i >=
lhs_.size() ) {
385 if( j >=
rhs_.size() ) {
419 inline size_t rows() const noexcept {
440 return lhs_.size() *
rhs_.nonZeros();
452 return rhs_.nonZeros();
521 template<
typename T >
522 inline bool canAlias(
const T* alias )
const noexcept {
523 return (
lhs_.canAlias( alias ) ||
rhs_.canAlias( alias ) );
533 template<
typename T >
534 inline bool isAliased(
const T* alias )
const noexcept {
535 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
560 template<
typename MT >
577 const auto begin( y.begin() );
578 const auto end ( y.end() );
580 for(
size_t i=0UL; i<x.size(); ++i ) {
581 for(
auto element=
begin; element!=
end; ++element ) {
582 (~lhs)(i,element->index()) = x[i] * element->
value();
602 template<
typename MT >
620 DVecSVecOuterExpr::selectAssignKernel( ~lhs, x, y );
639 template<
typename MT
642 static inline auto selectAssignKernel( MT& A,
const VT3& x,
const VT4& y )
643 -> EnableIf_t< IsColumnMajorMatrix_v<MT> && UseDefaultKernel_v<MT,VT3,VT4> >
645 const auto begin( y.begin() );
646 const auto end ( y.end() );
648 for(
auto element=
begin; element!=
end; ++element ) {
649 for(
size_t i=0UL; i<x.size(); ++i ) {
650 A(i,element->index()) = x[i] * element->
value();
671 template<
typename MT
674 static inline auto selectAssignKernel( MT& A,
const VT3& x,
const VT4& y )
675 -> EnableIf_t< IsColumnMajorMatrix_v<MT> && UseVectorizedKernel_v<MT,VT3,VT4> >
677 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT3> );
679 const size_t M( A.rows() );
681 const size_t ipos( remainder ? ( M &
size_t(-
SIMDSIZE) ) : M );
684 const auto begin( y.begin() );
685 const auto end ( y.end() );
687 for(
auto element=
begin; element!=
end; ++element )
689 const SIMDTrait_t<ElementType> y1(
set( element->value() ) );
694 A.store( i, element->index(), x.load(i) * y1 );
696 for( ; remainder && i<M; ++i ) {
697 A(i,element->index()) = x[i] * element->value();
719 template<
typename MT >
720 friend inline auto assign( SparseMatrix<MT,false>& lhs,
const DVecSVecOuterExpr& rhs )
721 -> EnableIf_t< UseAssign_v<MT> >
738 (~lhs).reserve( x.size() * y.nonZeros() );
741 const auto begin( y.begin() );
742 const auto end ( y.end() );
747 for(
size_t i=0UL; i<x.size(); ++i ) {
749 for(
auto element=
begin; element!=
end; ++element ) {
750 (~lhs).append( i, element->index(), x[i] * element->value() );
753 (~lhs).finalize( i );
772 template<
typename MT >
773 friend inline void assign( SparseMatrix<MT,true>& lhs,
const DVecSVecOuterExpr& rhs )
790 const auto begin( y.begin() );
791 const auto end ( y.end() );
796 (~lhs).reserve(
begin->
index(), rhs.nonZeros() );
800 for(
auto element=
begin; element!=
end; ++element ) {
802 for( ; index < element->index(); ++index ) {
803 (~lhs).finalize( index );
805 for(
size_t i=0UL; i<x.size(); ++i ) {
806 (~lhs).append( i, element->index(), x[i] * element->value() );
808 (~lhs).finalize( index++ );
812 for( ; index < y.size(); ++index ) {
813 (~lhs).finalize( index );
835 template<
typename MT >
836 friend inline auto addAssign( DenseMatrix<MT,false>& lhs,
const DVecSVecOuterExpr& rhs )
837 -> EnableIf_t< UseAssign_v<MT> >
852 const auto begin( y.begin() );
853 const auto end ( y.end() );
855 for(
size_t i=0UL; i<x.size(); ++i ) {
857 for(
auto element=
begin; element!=
end; ++element ) {
858 (~lhs)(i,element->index()) += x[i] * element->
value();
879 template<
typename MT >
880 friend inline void addAssign( DenseMatrix<MT,true>& lhs,
const DVecSVecOuterExpr& rhs )
897 DVecSVecOuterExpr::selectAddAssignKernel( ~lhs, x, y );
916 template<
typename MT
919 static inline auto selectAddAssignKernel( MT& A,
const VT3& x,
const VT4& y )
920 -> EnableIf_t< IsColumnMajorMatrix_v<MT> && UseDefaultKernel_v<MT,VT3,VT4> >
922 const auto begin( y.begin() );
923 const auto end ( y.end() );
925 for(
auto element=
begin; element!=
end; ++element ) {
927 for(
size_t i=0UL; i<x.size(); ++i ) {
928 A(i,element->index()) += x[i] * element->
value();
950 template<
typename MT
953 static inline auto selectAddAssignKernel( MT& A,
const VT3& x,
const VT4& y )
954 -> EnableIf_t< IsColumnMajorMatrix_v<MT> && UseVectorizedKernel_v<MT,VT3,VT4> >
956 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT3> );
958 const size_t M( A.rows() );
960 const size_t ipos( remainder ? ( M &
size_t(-
SIMDSIZE) ) : M );
963 const auto begin( y.begin() );
964 const auto end ( y.end() );
966 for(
auto element=
begin; element!=
end; ++element )
968 if(
isDefault( element->value() ) )
continue;
970 const SIMDTrait_t<ElementType> y1(
set( element->value() ) );
975 A.store( i, element->index(), A.load(i,element->index()) + x.load(i) * y1 );
977 for( ; remainder && i<M; ++i ) {
978 A(i,element->index()) += x[i] * element->value();
1005 template<
typename MT >
1006 friend inline auto subAssign( DenseMatrix<MT,false>& lhs,
const DVecSVecOuterExpr& rhs )
1007 -> EnableIf_t< UseAssign_v<MT> >
1022 const auto begin( y.begin() );
1023 const auto end ( y.end() );
1025 for(
size_t i=0UL; i<x.size(); ++i ) {
1027 for(
auto element=
begin; element!=
end; ++element ) {
1028 (~lhs)(i,element->index()) -= x[i] * element->
value();
1049 template<
typename MT >
1050 friend inline void subAssign( DenseMatrix<MT,true>& lhs,
const DVecSVecOuterExpr& rhs )
1067 DVecSVecOuterExpr::selectSubAssignKernel( ~lhs, x, y );
1086 template<
typename MT
1089 static inline auto selectSubAssignKernel( MT& A,
const VT3& x,
const VT4& y )
1090 -> EnableIf_t< IsColumnMajorMatrix_v<MT> && UseDefaultKernel_v<MT,VT3,VT4> >
1092 const auto begin( y.begin() );
1093 const auto end ( y.end() );
1095 for(
auto element=
begin; element!=
end; ++element ) {
1097 for(
size_t i=0UL; i<x.size(); ++i ) {
1098 A(i,element->index()) -= x[i] * element->
value();
1120 template<
typename MT
1123 static inline auto selectSubAssignKernel( MT& A,
const VT3& x,
const VT4& y )
1124 -> EnableIf_t< IsColumnMajorMatrix_v<MT> && UseVectorizedKernel_v<MT,VT3,VT4> >
1126 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT3> );
1128 const size_t M( A.rows() );
1130 const size_t ipos( remainder ? ( M &
size_t(-
SIMDSIZE) ) : M );
1133 const auto begin( y.begin() );
1134 const auto end ( y.end() );
1136 for(
auto element=
begin; element!=
end; ++element )
1138 if(
isDefault( element->value() ) )
continue;
1140 const SIMDTrait_t<ElementType> y1(
set( element->value() ) );
1145 A.store( i, element->index(), A.load(i,element->index()) - x.load(i) * y1 );
1147 for( ; remainder && i<M; ++i ) {
1148 A(i,element->index()) -= x[i] * element->value();
1175 template<
typename MT >
1176 friend inline auto schurAssign( DenseMatrix<MT,false>& lhs,
const DVecSVecOuterExpr& rhs )
1177 -> EnableIf_t< UseAssign_v<MT> >
1192 const auto end( y.end() );
1194 for(
size_t i=0UL; i<x.size(); ++i )
1198 for(
auto element=y.begin(); element!=
end; ++element, ++j ) {
1199 for( ; j<element->index(); ++j )
1200 reset( (~lhs)(i,j) );
1201 (~lhs)(i,element->index()) *= x[i] * element->value();
1204 for( ; j<y.size(); ++j ) {
1205 reset( (~lhs)(i,j) );
1225 template<
typename MT >
1226 friend inline void schurAssign( DenseMatrix<MT,true>& lhs,
const DVecSVecOuterExpr& rhs )
1243 DVecSVecOuterExpr::selectSchurAssignKernel( ~lhs, x, y );
1262 template<
typename MT
1265 static inline auto selectSchurAssignKernel( MT& A,
const VT3& x,
const VT4& y )
1266 -> EnableIf_t< IsColumnMajorMatrix_v<MT> && UseDefaultKernel_v<MT,VT3,VT4> >
1268 const auto end( y.end() );
1272 for(
auto element=y.begin(); element!=
end; ++element )
1274 if(
isDefault( element->value() ) )
continue;
1276 for( ; j<element->index(); ++j ) {
1277 for(
size_t i=0UL; i<x.size(); ++i )
1281 for(
size_t i=0UL; i<x.size(); ++i ) {
1282 A(i,element->index()) *= x[i] * element->value();
1288 for( ; j<y.size(); ++j ) {
1289 for(
size_t i=0UL; i<x.size(); ++i )
1310 template<
typename MT
1313 static inline auto selectSchurAssignKernel( MT& A,
const VT3& x,
const VT4& y )
1314 -> EnableIf_t< IsColumnMajorMatrix_v<MT> && UseVectorizedKernel_v<MT,VT3,VT4> >
1316 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT3> );
1318 const size_t M( A.rows() );
1319 const size_t N( A.columns() );
1321 const size_t ipos( remainder ? ( M &
size_t(-
SIMDSIZE) ) : M );
1324 const auto begin( y.begin() );
1325 const auto end ( y.end() );
1329 for(
auto element=
begin; element!=
end; ++element )
1331 if(
isDefault( element->value() ) )
continue;
1333 for( ; j<element->index(); ++j ) {
1334 for(
size_t i=0UL; i<M; ++i )
1338 const SIMDTrait_t<ElementType> y1(
set( element->value() ) );
1343 A.store( i, element->index(), A.load(i,element->index()) * ( x.load(i) * y1 ) );
1345 for( ; remainder && i<M; ++i ) {
1346 A(i,element->index()) *= x[i] * element->value();
1353 for(
size_t i=0UL; i<M; ++i )
1407 template<
typename VT1
1409 , DisableIf_t< IsZero_v<VT2> >* =
nullptr >
1410 inline const DVecSVecOuterExpr<VT1,VT2>
1411 dvecsvecouter(
const DenseVector<VT1,false>& lhs,
const SparseVector<VT2,true>& rhs )
1415 return DVecSVecOuterExpr<VT1,VT2>( ~lhs, ~rhs );
1434 template<
typename VT1
1436 , EnableIf_t< IsZero_v<VT2> >* =
nullptr >
1437 inline decltype(
auto)
1438 dvecsvecouter( const DenseVector<VT1,false>& lhs, const SparseVector<VT2,true>& rhs )
1442 using ReturnType =
const MultTrait_t< ResultType_t<VT1>, ResultType_t<VT2> >;
1447 return ReturnType( (~lhs).
size(), (~rhs).
size() );
1482 template<
typename VT1
1484 inline decltype(
auto)
1489 return dvecsvecouter( ~lhs, ~rhs );
1504 template<
typename VT1,
typename VT2 >
1505 struct Size< DVecSVecOuterExpr<VT1,VT2>, 0UL >
1506 :
public Size<VT1,0UL>
1509 template<
typename VT1,
typename VT2 >
1510 struct Size< DVecSVecOuterExpr<VT1,VT2>, 1UL >
1511 :
public Size<VT2,0UL>
const If_t< returnExpr, ExprReturnType, ElementType > ReturnType
Return type for expression template evaluations.
Definition: DVecSVecOuterExpr.h:187
If_t< IsComputation_v< VT2 >, const RT2, CT2 > RT
Type for the assignment of the right-hand side dense vector operand.
Definition: DVecSVecOuterExpr.h:202
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DVecSVecOuterExpr.h:534
Pointer difference type of the Blaze library.
Header file for auxiliary alias declarations.
static constexpr bool useAssign
Compilation switch for the evaluation strategy of the multiplication expression.
Definition: DVecSVecOuterExpr.h:142
LeftElement v_
Element of the left-hand side dense vector expression.
Definition: DVecSVecOuterExpr.h:330
const Element operator *() const
Direct access to the sparse matrix element at the current iterator position.
Definition: DVecSVecOuterExpr.h:260
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.
ElementType_t< ResultType > ElementType
Resulting element type.
Definition: DVecSVecOuterExpr.h:184
static constexpr bool returnExpr
Compilation switch for the selection of the subscript operator return type.
Definition: DVecSVecOuterExpr.h:127
typename If< Condition, T1, T2 >::Type If_t
Auxiliary alias template for the If class template.The If_t alias template provides a convenient shor...
Definition: If.h:109
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DVecSVecOuterExpr.h:429
ValueIndexPair< ElementType > Element
Element type of the sparse matrix expression.
Definition: DVecSVecOuterExpr.h:213
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.The ResultType_t alias declaration provides ...
Definition: Aliases.h:390
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a column dense or sparse vector type...
Definition: ColumnVector.h:61
Header file for the serial shim.
Expression object for dense vector-sparse vector outer products.The DVecSVecOuterExpr class represent...
Definition: DVecSVecOuterExpr.h:104
Header file for the IsSame and IsStrictlySame type traits.
Header file for the IsColumnMajorMatrix type trait.
If_t< IsExpression_v< VT2 >, const VT2, const VT2 & > RightOperand
Composite type of the right-hand side sparse vector expression.
Definition: DVecSVecOuterExpr.h:196
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:595
Constraint on the data type.
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DVecSVecOuterExpr.h:381
Header file for the MAYBE_UNUSED function template.
Header file for the Computation base class.
Header file for the reset shim.
If_t< IsComputation_v< VT1 >, const RT1, CT1 > LT
Type for the assignment of the left-hand side dense vector operand.
Definition: DVecSVecOuterExpr.h:199
Constraints on the storage order of matrix types.
ResultType_t< VT1 > RT1
Result type of the left-hand side dense vector expression.
Definition: DVecSVecOuterExpr.h:110
System settings for performance optimizations.
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.The ReturnType_t alias declaration provides ...
Definition: Aliases.h:410
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes....
Definition: DenseMatrix.h:81
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes....
Definition: Forward.h:145
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.The ElementType_t alias declaration provide...
Definition: Aliases.h:170
ValueType & ReferenceType
Reference return type.
Definition: DVecSVecOuterExpr.h:224
ReturnType_t< VT1 > RN1
Return type of the left-hand side dense vector expression.
Definition: DVecSVecOuterExpr.h:112
static constexpr size_t SIMDSIZE
The number of elements packed within a single SIMD element.
Definition: DVecSVecOuterExpr.h:343
Header file for the SparseMatrix base class.
Constraint on the transpose flag of vector types.
size_t nonZeros() const
Returns the number of non-zero elements in the sparse matrix.
Definition: DVecSVecOuterExpr.h:439
Constraint on the data type.
size_t index() const
Access to the current index of the sparse element.
Definition: DVecSVecOuterExpr.h:290
ValueType * PointerType
Pointer return type.
Definition: DVecSVecOuterExpr.h:223
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row i.
Definition: DVecSVecOuterExpr.h:409
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.The EnableIf_t alias declaration provides a convenient...
Definition: EnableIf.h:138
IteratorType it_
Iterator over the elements of the right-hand side sparse vector expression.
Definition: DVecSVecOuterExpr.h:331
CompositeType_t< VT1 > CT1
Composite type of the left-hand side dense vector expression.
Definition: DVecSVecOuterExpr.h:114
IteratorCategory iterator_category
The iterator category.
Definition: DVecSVecOuterExpr.h:228
Header file for the ValueIndexPair class.
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: DVecSVecOuterExpr.h:338
Header file for the IsTemporary type trait class.
Header file for the multiplication trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the If class template.
DVecSVecOuterExpr(const VT1 &lhs, const VT2 &rhs) noexcept
Constructor for the DVecSVecOuterExpr class.
Definition: DVecSVecOuterExpr.h:352
Iterator over the elements of the dense vector-sparse vector outer product expression.
Definition: DVecSVecOuterExpr.h:208
#define BLAZE_CONSTRAINT_MUST_BE_ZERO_TYPE(T)
Constraint on the data type.In case the given data type T is not a zero vector or matrix type,...
Definition: Zero.h:61
ConstIterator lowerBound(size_t i, size_t j) const
Returns an iterator to the first index not less then the given index.
Definition: DVecSVecOuterExpr.h:476
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DVecSVecOuterExpr.h:522
#define BLAZE_CONSTRAINT_MUST_FORM_VALID_VECTVECMULTEXPR(T1, T2)
Constraint on the data type.In case the given data types T1 and T2 do not form a valid vector/vector ...
Definition: VecTVecMultExpr.h:103
OppositeType_t< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DVecSVecOuterExpr.h:182
#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
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DVecSVecOuterExpr.h:312
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DVecSVecOuterExpr.h:225
Header file for all SIMD functionality.
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:76
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
#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
ElementType_t< VT2 > ET2
Element type of the right-hand side sparse vector expression.
Definition: DVecSVecOuterExpr.h:117
CompositeType_t< VT2 > CT2
Composite type of the right-hand side sparse vector expression.
Definition: DVecSVecOuterExpr.h:115
Constraint on the data type.
Header file for the exception macros of the math module.
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DVecSVecOuterExpr.h:301
Constraint on the data type.
Constraint on the data type.
Header file for the VecTVecMultExpr base class.
If_t< useAssign, const ResultType, const DVecSVecOuterExpr & > CompositeType
Data type for composite expression templates.
Definition: DVecSVecOuterExpr.h:190
Header file for the EnableIf class template.
If_t< IsExpression_v< VT1 >, const VT1, const VT1 & > LeftOperand
Composite type of the left-hand side dense vector expression.
Definition: DVecSVecOuterExpr.h:193
Header file for the IsPadded type trait.
ResultType_t< VT2 > RT2
Result type of the right-hand side sparse vector expression.
Definition: DVecSVecOuterExpr.h:111
ReturnType value() const
Access to the current value of the sparse element.
Definition: DVecSVecOuterExpr.h:280
typename MultTrait< T1, T2 >::Type MultTrait_t
Auxiliary alias declaration for the MultTrait class template.The MultTrait_t alias declaration provid...
Definition: MultTrait.h:240
typename T::OppositeType OppositeType_t
Alias declaration for nested OppositeType type definitions.The OppositeType_t alias declaration provi...
Definition: Aliases.h:270
Header file for the IsNumeric type trait.
RightOperand rightOperand() const noexcept
Returns the right-hand side sparse vector operand.
Definition: DVecSVecOuterExpr.h:510
ConstIterator find(size_t i, size_t j) const
Searches for a specific matrix element.
Definition: DVecSVecOuterExpr.h:463
MultTrait_t< RT1, RT2 > ResultType
Result type for expression template evaluations.
Definition: DVecSVecOuterExpr.h:181
#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,...
Definition: Symmetric.h:79
#define BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a row-major dense or sparse matrix t...
Definition: RowMajorMatrix.h:61
Header file for the HasSIMDMult type trait.
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.The TransposeType_t alias declaration pro...
Definition: Aliases.h:470
Header file for run time assertion macros.
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.The CompositeType_t alias declaration pro...
Definition: Aliases.h:90
ElementType_t< VT1 > ET1
Element type of the left-hand side dense vector expression.
Definition: DVecSVecOuterExpr.h:116
ET1 LeftElement
Element type of the dense vector expression.
Definition: DVecSVecOuterExpr.h:216
ConstIterator upperBound(size_t i, size_t j) const
Returns an iterator to the first index greater then the given index.
Definition: DVecSVecOuterExpr.h:489
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: DVecSVecOuterExpr.h:183
Header file for the IsZero type trait.
SIMD characteristics of data types.The SIMDTrait class template provides the SIMD characteristics of ...
Definition: SIMDTrait.h:295
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:94
Header file for all forward declarations for expression class templates.
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
Constraint on the data type.
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two expression iterators.
Definition: DVecSVecOuterExpr.h:323
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
Constraint on the data type.
Header file for the RemoveReference type trait.
Base class for all outer product expression templates.The VecTVecMultExpr class serves as a tag for a...
Definition: VecTVecMultExpr.h:67
typename T::ConstIterator ConstIterator_t
Alias declaration for nested ConstIterator type definitions.The ConstIterator_t alias declaration pro...
Definition: Aliases.h:110
std::forward_iterator_tag IteratorCategory
The iterator category.
Definition: DVecSVecOuterExpr.h:221
#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
LeftOperand lhs_
Left-hand side dense vector of the multiplication expression.
Definition: DVecSVecOuterExpr.h:541
Index-value-pair for sparse vectors and matrices.The ValueIndexPair class represents a single index-v...
Definition: ValueIndexPair.h:73
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DVecSVecOuterExpr.h:365
ConstIterator_t< RemoveReference_t< RightOperand > > IteratorType
Iterator type of the sparse vector expression.
Definition: DVecSVecOuterExpr.h:219
RightOperand rhs_
Right-hand side sparse vector of the multiplication expression.
Definition: DVecSVecOuterExpr.h:542
Header file for the IsComputation type trait class.
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:66
ConstIterator(LeftElement v, IteratorType it)
Constructor for the ConstIterator class.
Definition: DVecSVecOuterExpr.h:238
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row i.
Definition: DVecSVecOuterExpr.h:398
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:146
ConstIterator & operator++()
Pre-increment operator.
Definition: DVecSVecOuterExpr.h:249
LeftOperand leftOperand() const noexcept
Returns the left-hand side dense vector operand.
Definition: DVecSVecOuterExpr.h:500
#define BLAZE_CONSTRAINT_MUST_BE_ROW_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a row dense or sparse vector type (i...
Definition: RowVector.h:61
Element ValueType
Type of the underlying pointers.
Definition: DVecSVecOuterExpr.h:222
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:635
decltype(std::declval< RN1 >() *std::declval< RN2 >()) ExprReturnType
Expression return type for the subscript operator.
Definition: DVecSVecOuterExpr.h:130
size_t nonZeros(size_t i) const
Returns the number of non-zero elements in the specified row.
Definition: DVecSVecOuterExpr.h:450
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DVecSVecOuterExpr.h:419
Header file for the Size type trait.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_ZERO_TYPE(T)
Constraint on the data type.In case the given data type T is a zero vector or matrix type,...
Definition: Zero.h:81
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression,...
Definition: Assert.h:101
ReturnType_t< VT2 > RN2
Return type of the right-hand side sparse vector expression.
Definition: DVecSVecOuterExpr.h:113
Constraint on the transpose flag of vector types.
Header file for the IsExpression type trait class.
Header file for the function trace functionality.
const ConstIterator * operator->() const
Direct access to the sparse matrix element at the current iterator position.
Definition: DVecSVecOuterExpr.h:270