35 #ifndef _BLAZE_MATH_EXPRESSIONS_SVECDVECOUTEREXPR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_SVECDVECOUTEREXPR_H_ 102 template<
typename VT1
104 class SVecDVecOuterExpr
105 :
public VecTVecMultExpr< SparseMatrix< SVecDVecOuterExpr<VT1,VT2>, true > >
106 ,
private Computation
127 static constexpr
bool returnExpr = ( !IsTemporary_v<RN1> && !IsTemporary_v<RN2> );
142 ( IsComputation_v<VT1> || !IsNumeric_v<ET1> || IsComputation_v<VT2> || !IsNumeric_v<ET2> );
145 template<
typename MT >
147 static constexpr
bool UseAssign_v =
useAssign;
156 template<
typename T1,
typename T2,
typename T3 >
157 static constexpr
bool UseVectorizedKernel_v =
158 ( useOptimizedKernels &&
159 T1::simdEnabled && T3::simdEnabled &&
171 template<
typename T1,
typename T2,
typename T3 >
172 static constexpr
bool UseDefaultKernel_v = !UseVectorizedKernel_v<T1,T2,T3>;
280 return it_->value() *
v_;
381 if( i >=
lhs_.size() ) {
384 if( j >=
rhs_.size() ) {
418 inline size_t rows() const noexcept {
439 return lhs_.nonZeros() *
rhs_.size();
451 return lhs_.nonZeros();
520 template<
typename T >
521 inline bool canAlias(
const T* alias )
const noexcept {
522 return (
lhs_.canAlias( alias ) ||
rhs_.canAlias( alias ) );
532 template<
typename T >
533 inline bool isAliased(
const T* alias )
const noexcept {
534 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
556 template<
typename MT >
574 SVecDVecOuterExpr::selectAssignKernel( ~lhs, x, y );
593 template<
typename MT
596 static inline auto selectAssignKernel( MT& A,
const VT3& x,
const VT4& y )
599 const auto end( x.end() );
601 for(
auto element=x.begin(); element!=
end; ++element ) {
603 for(
size_t j=0UL; j<y.size(); ++j ) {
604 A(element->index(),j) = element->
value() * y[j];
626 template<
typename MT
629 static inline auto selectAssignKernel( MT& A,
const VT3& x,
const VT4& y )
630 -> EnableIf_t< IsRowMajorMatrix_v<MT> && UseVectorizedKernel_v<MT,VT3,VT4> >
632 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT4> );
634 const size_t N( A.columns() );
636 const size_t jpos( remainder ? ( N &
size_t(-
SIMDSIZE) ) : N );
639 const auto begin( x.begin() );
640 const auto end ( x.end() );
642 for(
auto element=
begin; element!=
end; ++element )
644 const SIMDTrait_t<ElementType> x1(
set( element->value() ) );
649 A.store( element->index(), j, x1 * y.load(j) );
651 for( ; remainder && j<N; ++j ) {
652 A(element->index(),j) = element->value() * y[j];
675 template<
typename MT >
676 friend inline auto assign( DenseMatrix<MT,true>& lhs,
const SVecDVecOuterExpr& rhs )
677 -> EnableIf_t< UseAssign_v<MT> >
692 const auto end( x.end() );
694 for(
size_t i=0UL; i<y.size(); ++i ) {
696 for(
auto element=x.begin(); element!=
end; ++element ) {
697 (~lhs)(element->index(),i) = element->
value() * y[i];
717 template<
typename MT >
718 friend inline void assign( SparseMatrix<MT,false>& lhs,
const SVecDVecOuterExpr& rhs )
736 (~lhs).reserve( x.nonZeros() * y.size() );
739 const auto begin( x.begin() );
740 const auto end ( x.end() );
745 (~lhs).reserve(
begin->
index(), rhs.nonZeros() );
749 for(
auto element=
begin; element!=
end; ++element ) {
751 for( ; index < element->index(); ++index ) {
752 (~lhs).finalize( index );
754 for(
size_t i=0UL; i<y.size(); ++i ) {
755 (~lhs).append( element->index(), i, element->value() * y[i] );
757 (~lhs).finalize( index++ );
761 for( ; index < x.size(); ++index ) {
762 (~lhs).finalize( index );
784 template<
typename MT >
785 friend inline auto assign( SparseMatrix<MT,true>& lhs,
const SVecDVecOuterExpr& rhs )
786 -> EnableIf_t< UseAssign_v<MT> >
802 const auto begin( x.begin() );
803 const auto end ( x.end() );
808 for(
size_t i=0UL; i<y.size(); ++i ) {
810 for(
auto element=
begin; element!=
end; ++element ) {
811 (~lhs).append( element->index(), i, element->value() * y[i] );
814 (~lhs).finalize( i );
833 template<
typename MT >
834 friend inline void addAssign( DenseMatrix<MT,false>& lhs,
const SVecDVecOuterExpr& rhs )
851 SVecDVecOuterExpr::selectAddAssignKernel( ~lhs, x, y );
870 template<
typename MT
873 static inline auto selectAddAssignKernel( MT& A,
const VT3& x,
const VT4& y )
874 -> EnableIf_t< IsRowMajorMatrix_v<MT> && UseDefaultKernel_v<MT,VT3,VT4> >
876 const auto end( x.end() );
878 for(
auto element=x.begin(); element!=
end; ++element ) {
880 for(
size_t i=0UL; i<y.size(); ++i ) {
881 A(element->index(),i) += element->
value() * y[i];
903 template<
typename MT
906 static inline auto selectAddAssignKernel( MT& A,
const VT3& x,
const VT4& y )
907 -> EnableIf_t< IsRowMajorMatrix_v<MT> && UseVectorizedKernel_v<MT,VT3,VT4> >
909 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT4> );
911 const size_t N( A.columns() );
913 const size_t jpos( remainder ? ( N &
size_t(-
SIMDSIZE) ) : N );
916 const auto begin( x.begin() );
917 const auto end ( x.end() );
919 for(
auto element=
begin; element!=
end; ++element )
921 if(
isDefault( element->value() ) )
continue;
923 const SIMDTrait_t<ElementType> x1(
set( element->value() ) );
928 A.store( element->index(), j, A.load(element->index(),j) + x1 * y.load(j) );
930 for( ; remainder && j<N; ++j ) {
931 A(element->index(),j) += element->value() * y[j];
954 template<
typename MT >
955 friend inline auto addAssign( DenseMatrix<MT,true>& lhs,
const SVecDVecOuterExpr& rhs )
956 -> EnableIf_t< UseAssign_v<MT> >
971 const auto end( x.end() );
973 for(
size_t i=0UL; i<y.size(); ++i ) {
975 for(
auto element=x.begin(); element!=
end; ++element ) {
976 (~lhs)(element->index(),i) += element->
value() * y[i];
1001 template<
typename MT >
1002 friend inline void subAssign( DenseMatrix<MT,false>& lhs,
const SVecDVecOuterExpr& rhs )
1019 SVecDVecOuterExpr::selectSubAssignKernel( ~lhs, x, y );
1038 template<
typename MT
1041 static inline auto selectSubAssignKernel( MT& A,
const VT3& x,
const VT4& y )
1042 -> EnableIf_t< IsRowMajorMatrix_v<MT> && UseDefaultKernel_v<MT,VT3,VT4> >
1044 const auto end( x.end() );
1046 for(
auto element=x.begin(); element!=
end; ++element ) {
1048 for(
size_t i=0UL; i<y.size(); ++i ) {
1049 A(element->index(),i) -= element->
value() * y[i];
1071 template<
typename MT
1074 static inline auto selectSubAssignKernel( MT& A,
const VT3& x,
const VT4& y )
1075 -> EnableIf_t< IsRowMajorMatrix_v<MT> && UseVectorizedKernel_v<MT,VT3,VT4> >
1077 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT4> );
1079 const size_t N( A.columns() );
1081 const size_t jpos( remainder ? ( N &
size_t(-
SIMDSIZE) ) : N );
1084 const auto begin( x.begin() );
1085 const auto end ( x.end() );
1087 for(
auto element=
begin; element!=
end; ++element )
1089 if(
isDefault( element->value() ) )
continue;
1091 const SIMDTrait_t<ElementType> x1(
set( element->value() ) );
1096 A.store( element->index(), j, A.load(element->index(),j) - x1 * y.load(j) );
1098 for( ; remainder && j<N; ++j ) {
1099 A(element->index(),j) -= element->value() * y[j];
1122 template<
typename MT >
1123 friend inline auto subAssign( DenseMatrix<MT,true>& lhs,
const SVecDVecOuterExpr& rhs )
1124 -> EnableIf_t< UseAssign_v<MT> >
1139 const auto end( x.end() );
1141 for(
size_t i=0UL; i<y.size(); ++i ) {
1143 for(
auto element=x.begin(); element!=
end; ++element ) {
1144 (~lhs)(element->index(),i) -= element->
value() * y[i];
1169 template<
typename MT >
1170 friend inline void schurAssign( DenseMatrix<MT,false>& lhs,
const SVecDVecOuterExpr& rhs )
1187 SVecDVecOuterExpr::selectSchurAssignKernel( ~lhs, x, y );
1206 template<
typename MT
1209 static inline auto selectSchurAssignKernel( MT& A,
const VT3& x,
const VT4& y )
1210 -> EnableIf_t< IsRowMajorMatrix_v<MT> && UseDefaultKernel_v<MT,VT3,VT4> >
1212 const auto end( x.end() );
1216 for(
auto element=x.begin(); element!=
end; ++element )
1218 if(
isDefault( element->value() ) )
continue;
1220 for( ; i<element->index(); ++i ) {
1221 for(
size_t j=0UL; j<y.size(); ++j )
1225 for(
size_t j=0UL; j<y.size(); ++j ) {
1226 A(element->index(),j) *= element->value() * y[j];
1232 for( ; i<x.size(); ++i ) {
1233 for(
size_t j=0UL; j<y.size(); ++j )
1254 template<
typename MT
1257 static inline auto selectSchurAssignKernel( MT& A,
const VT3& x,
const VT4& y )
1258 -> EnableIf_t< IsRowMajorMatrix_v<MT> && UseVectorizedKernel_v<MT,VT3,VT4> >
1260 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT4> );
1262 const size_t M( A.rows() );
1263 const size_t N( A.columns() );
1265 const size_t jpos( remainder ? ( N &
size_t(-
SIMDSIZE) ) : N );
1268 const auto begin( x.begin() );
1269 const auto end ( x.end() );
1273 for(
auto element=
begin; element!=
end; ++element )
1275 if(
isDefault( element->value() ) )
continue;
1277 for( ; i<element->index(); ++i ) {
1278 for(
size_t j=0UL; j<N; ++j )
1282 const SIMDTrait_t<ElementType> x1(
set( element->value() ) );
1287 A.store( element->index(), j, A.load(element->index(),j) * ( x1 * y.load(j) ) );
1289 for( ; remainder && j<N; ++j ) {
1290 A(element->index(),j) *= element->value() * y[j];
1297 for(
size_t j=0UL; j<N; ++j )
1320 template<
typename MT >
1321 friend inline auto schurAssign( DenseMatrix<MT,true>& lhs,
const SVecDVecOuterExpr& rhs )
1322 -> EnableIf_t< UseAssign_v<MT> >
1337 const auto end( x.end() );
1339 for(
size_t j=0UL; j<y.size(); ++j )
1343 for(
auto element=x.begin(); element!=
end; ++element, ++i ) {
1344 for( ; i<element->index(); ++i )
1345 reset( (~lhs)(i,j) );
1346 (~lhs)(element->index(),j) *= element->value() * y[j];
1349 for( ; i<x.size(); ++i ) {
1350 reset( (~lhs)(i,j) );
1404 template<
typename VT1
1406 , DisableIf_t< IsZero_v<VT1> >* =
nullptr >
1407 inline const SVecDVecOuterExpr<VT1,VT2>
1408 svecdvecouter(
const SparseVector<VT1,false>& lhs,
const DenseVector<VT2,true>& rhs )
1412 return SVecDVecOuterExpr<VT1,VT2>( ~lhs, ~rhs );
1431 template<
typename VT1
1433 , EnableIf_t< IsZero_v<VT1> >* =
nullptr >
1434 inline decltype(
auto)
1435 svecdvecouter( const SparseVector<VT1,false>& lhs, const DenseVector<VT2,true>& rhs )
1439 using ReturnType =
const MultTrait_t< ResultType_t<VT1>, ResultType_t<VT2> >;
1479 template<
typename VT1
1481 inline decltype(
auto)
1486 return svecdvecouter( ~lhs, ~rhs );
1501 template<
typename VT1,
typename VT2 >
1502 struct Size< SVecDVecOuterExpr<VT1,VT2>, 0UL >
1503 :
public Size<VT1,0UL>
1506 template<
typename VT1,
typename VT2 >
1507 struct Size< SVecDVecOuterExpr<VT1,VT2>, 1UL >
1508 :
public Size<VT2,0UL>
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: SVecDVecOuterExpr.h:380
Pointer difference type of the Blaze library.
ValueType * PointerType
Pointer return type.
Definition: SVecDVecOuterExpr.h:222
Header file for auxiliary alias declarations.
CompositeType_t< VT2 > CT2
Composite type of the right-hand side dense vector expression.
Definition: SVecDVecOuterExpr.h:115
Element ValueType
Type of the underlying pointers.
Definition: SVecDVecOuterExpr.h:221
Header file for the UNUSED_PARAMETER function template.
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.
SVecDVecOuterExpr(const VT1 &lhs, const VT2 &rhs) noexcept
Constructor for the SVecDVecOuterExpr class.
Definition: SVecDVecOuterExpr.h:351
typename If< Condition, T1, T2 >::Type If_t
Auxiliary alias declaration for the If class template.The If_t alias declaration provides a convenien...
Definition: If.h:109
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: SVecDVecOuterExpr.h:533
size_t nonZeros(size_t i) const
Returns the number of non-zero elements in the specified column.
Definition: SVecDVecOuterExpr.h:449
RightOperand rhs_
Right-hand side dense vector of the multiplication expression.
Definition: SVecDVecOuterExpr.h:541
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.
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: SVecDVecOuterExpr.h:428
ValueIndexPair< ElementType > Element
Element type of the sparse matrix expression.
Definition: SVecDVecOuterExpr.h:212
Header file for the IsSame and IsStrictlySame type traits.
std::forward_iterator_tag IteratorCategory
The iterator category.
Definition: SVecDVecOuterExpr.h:220
ConstIterator & operator++()
Pre-increment operator.
Definition: SVecDVecOuterExpr.h:248
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:591
IteratorType it_
Iterator over the elements of the left-hand side sparse vector expression.
Definition: SVecDVecOuterExpr.h:329
If_t< IsExpression_v< VT2 >, const VT2, const VT2 &> RightOperand
Composite type of the right-hand side dense vector expression.
Definition: SVecDVecOuterExpr.h:195
Constraint on the data type.
Header file for the Computation base class.
Header file for the reset shim.
System settings for performance optimizations.
constexpr void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.The ReturnType_t alias declaration provides ...
Definition: Aliases.h:410
ET2 RightElement
Element type of the dense vector expression.
Definition: SVecDVecOuterExpr.h:218
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:80
RightElement v_
Element of the right-hand side dense vector expression.
Definition: SVecDVecOuterExpr.h:330
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:137
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.The ElementType_t alias declaration provide...
Definition: Aliases.h:170
Header file for the SparseMatrix base class.
Constraint on the transpose flag of vector types.
Constraint on the data type.
ConstIterator find(size_t i, size_t j) const
Searches for a specific matrix element.
Definition: SVecDVecOuterExpr.h:462
If_t< IsComputation_v< VT1 >, const RT1, CT1 > LT
Type for the assignment of the left-hand side dense vector operand.
Definition: SVecDVecOuterExpr.h:198
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
If_t< useAssign, const ResultType, const SVecDVecOuterExpr &> CompositeType
Data type for composite expression templates.
Definition: SVecDVecOuterExpr.h:189
RightOperand rightOperand() const noexcept
Returns the right-hand side dense vector operand.
Definition: SVecDVecOuterExpr.h:509
Header file for the ValueIndexPair class.
Header file for the IsTemporary type trait class.
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: SVecDVecOuterExpr.h:337
Header file for the multiplication trait.
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: SVecDVecOuterExpr.h:300
const Element operator*() const
Direct access to the sparse matrix element at the current iterator position.
Definition: SVecDVecOuterExpr.h:259
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the If class template.
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a column-major dense or sparse matri...
Definition: ColumnMajorMatrix.h:61
static constexpr bool useAssign
Compilation switch for the evaluation strategy of the multiplication expression.
Definition: SVecDVecOuterExpr.h:141
#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
#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
ReturnType_t< VT1 > RN1
Return type of the left-hand side sparse vector expression.
Definition: SVecDVecOuterExpr.h:112
#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
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3086
Header file for all SIMD functionality.
LeftOperand leftOperand() const noexcept
Returns the left-hand side sparse vector operand.
Definition: SVecDVecOuterExpr.h:499
LeftOperand lhs_
Left-hand side sparse vector of the multiplication expression.
Definition: SVecDVecOuterExpr.h:540
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:76
#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
ConstIterator(IteratorType it, RightElement v)
Constructor for the ConstIterator class.
Definition: SVecDVecOuterExpr.h:237
ElementType_t< VT2 > ET2
Element type of the right-hand side dense vector expression.
Definition: SVecDVecOuterExpr.h:117
size_t index() const
Access to the current index of the sparse element.
Definition: SVecDVecOuterExpr.h:289
static constexpr size_t SIMDSIZE
The number of elements packed within a single SIMD element.
Definition: SVecDVecOuterExpr.h:342
Constraint on the data type.
Header file for the exception macros of the math module.
IteratorCategory iterator_category
The iterator category.
Definition: SVecDVecOuterExpr.h:227
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two expression iterators.
Definition: SVecDVecOuterExpr.h:322
Constraint on the data type.
Header file for all forward declarations for expression class templates.
Constraint on the data type.
ReturnType_t< VT2 > RN2
Return type of the right-hand side dense vector expression.
Definition: SVecDVecOuterExpr.h:113
Header file for the VecTVecMultExpr base class.
const If_t< returnExpr, ExprReturnType, ElementType > ReturnType
Return type for expression template evaluations.
Definition: SVecDVecOuterExpr.h:186
Iterator over the elements of the sparse vector-dense vector outer product expression.
Definition: SVecDVecOuterExpr.h:207
ElementType_t< VT1 > ET1
Element type of the left-hand side sparse vector expression.
Definition: SVecDVecOuterExpr.h:116
Header file for the EnableIf class template.
Header file for the IsPadded type trait.
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
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: SVecDVecOuterExpr.h:224
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.
If_t< IsComputation_v< VT2 >, const RT2, CT2 > RT
Type for the assignment of the right-hand side dense vector operand.
Definition: SVecDVecOuterExpr.h:201
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a symmetric matrix type, a compilation error is created.
Definition: Symmetric.h:79
Header file for the HasSIMDMult type trait.
Expression object for sparse vector-dense vector outer products.The SVecDVecOuterExpr class represent...
Definition: Forward.h:142
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.
If_t< IsExpression_v< VT1 >, const VT1, const VT1 &> LeftOperand
Composite type of the left-hand side sparse vector expression.
Definition: SVecDVecOuterExpr.h:192
const ConstIterator * operator->() const
Direct access to the sparse matrix element at the current iterator position.
Definition: SVecDVecOuterExpr.h:269
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.The CompositeType_t alias declaration pro...
Definition: Aliases.h:90
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of column i.
Definition: SVecDVecOuterExpr.h:408
ReturnType value() const
Access to the current value of the sparse element.
Definition: SVecDVecOuterExpr.h:279
ResultType_t< VT1 > RT1
Result type of the left-hand side sparse vector expression.
Definition: SVecDVecOuterExpr.h:110
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: SVecDVecOuterExpr.h:521
Header file for the IsZero type trait.
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: SVecDVecOuterExpr.h:311
MultTrait_t< RT1, RT2 > ResultType
Result type for expression template evaluations.
Definition: SVecDVecOuterExpr.h:180
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: SVecDVecOuterExpr.h:418
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
OppositeType_t< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: SVecDVecOuterExpr.h:181
Header file for the isDefault shim.
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.
static constexpr bool returnExpr
Compilation switch for the selection of the subscript operator return type.
Definition: SVecDVecOuterExpr.h:127
Constraints on the storage order of matrix types.
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.
decltype(std::declval< RN1 >() *std::declval< RN2 >()) ExprReturnType
Expression return type for the subscript operator.
Definition: SVecDVecOuterExpr.h:130
typename T::ConstIterator ConstIterator_t
Alias declaration for nested ConstIterator type definitions.The ConstIterator_t alias declaration pro...
Definition: Aliases.h:110
ResultType_t< VT2 > RT2
Result type of the right-hand side dense vector expression.
Definition: SVecDVecOuterExpr.h:111
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
ElementType_t< ResultType > ElementType
Resulting element type.
Definition: SVecDVecOuterExpr.h:183
ValueType & ReferenceType
Reference return type.
Definition: SVecDVecOuterExpr.h:223
Index-value-pair for sparse vectors and matrices.The ValueIndexPair class represents a single index-v...
Definition: ValueIndexPair.h:73
Header file for the IsRowMajorMatrix type trait.
Header file for the IsComputation type trait class.
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of column i.
Definition: SVecDVecOuterExpr.h:397
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:138
CompositeType_t< VT1 > CT1
Composite type of the left-hand side sparse vector expression.
Definition: SVecDVecOuterExpr.h:114
#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
size_t nonZeros() const
Returns the number of non-zero elements in the sparse matrix.
Definition: SVecDVecOuterExpr.h:438
ConstIterator_t< RemoveReference_t< LeftOperand > > IteratorType
Iterator type of the sparse vector expression.
Definition: SVecDVecOuterExpr.h:215
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:631
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: SVecDVecOuterExpr.h:182
ConstIterator upperBound(size_t i, size_t j) const
Returns an iterator to the first index greater then the given index.
Definition: SVecDVecOuterExpr.h:488
ConstIterator lowerBound(size_t i, size_t j) const
Returns an iterator to the first index not less then the given index.
Definition: SVecDVecOuterExpr.h:475
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, 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
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: SVecDVecOuterExpr.h:364
Constraint on the transpose flag of vector types.
Header file for the IsExpression type trait class.
Header file for the function trace functionality.