35 #ifndef _BLAZE_MATH_EXPRESSIONS_SMATREDUCEEXPR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_SMATREDUCEEXPR_H_ 116 template<
typename MT
119 :
public MatReduceExpr< DenseVector< SMatReduceExpr<MT,OP,0UL>, true >, 0UL >
137 template<
typename VT >
138 static constexpr
bool UseSMPAssign_v = ( !
MT::smpAssignable && RequiresEvaluation_v<MT> );
162 static constexpr
bool simdEnabled =
false;
200 if( index >= sm_.columns() ) {
203 return (*
this)[index];
212 inline size_t size() const noexcept {
213 return sm_.columns();
243 template<
typename T >
244 inline bool canAlias(
const T* alias )
const noexcept {
245 return ( sm_.isAliased( alias ) );
255 template<
typename T >
256 inline bool isAliased(
const T* alias )
const noexcept {
257 return ( sm_.isAliased( alias ) );
277 return sm_.canSMPAssign() || (
size() > SMP_SMATREDUCE_THRESHOLD );
299 template<
typename VT1 >
311 assign( ~lhs, reduce<0UL>( tmp, rhs.op_ ) );
329 template<
typename VT1 >
359 template<
typename VT1 >
360 friend inline void addAssign( DenseVector<VT1,true>& lhs,
const SMatReduceExpr& rhs )
370 const OT tmp(
serial( rhs.sm_ ) );
371 addAssign( ~lhs, reduce<0UL>( tmp, rhs.op_ ) );
389 template<
typename VT1 >
390 friend inline void addAssign( SparseVector<VT1,true>& lhs,
const SMatReduceExpr& rhs )
401 addAssign( ~lhs, tmp );
419 template<
typename VT1 >
420 friend inline void subAssign( DenseVector<VT1,true>& lhs,
const SMatReduceExpr& rhs )
430 const OT tmp(
serial( rhs.sm_ ) );
431 subAssign( ~lhs, reduce<0UL>( tmp, rhs.op_ ) );
449 template<
typename VT1 >
450 friend inline void subAssign( SparseVector<VT1,true>& lhs,
const SMatReduceExpr& rhs )
461 subAssign( ~lhs, tmp );
479 template<
typename VT1 >
480 friend inline void multAssign( DenseVector<VT1,true>& lhs,
const SMatReduceExpr& rhs )
490 const OT tmp(
serial( rhs.sm_ ) );
491 multAssign( ~lhs, reduce<0UL>( tmp, rhs.op_ ) );
509 template<
typename VT1 >
510 friend inline void multAssign( SparseVector<VT1,true>& lhs,
const SMatReduceExpr& rhs )
521 multAssign( ~lhs, tmp );
539 template<
typename VT1 >
540 friend inline void divAssign( DenseVector<VT1,true>& lhs,
const SMatReduceExpr& rhs )
550 const OT tmp(
serial( rhs.sm_ ) );
551 divAssign( ~lhs, reduce<0UL>( tmp, rhs.op_ ) );
569 template<
typename VT1 >
570 friend inline void divAssign( SparseVector<VT1,true>& lhs,
const SMatReduceExpr& rhs )
581 divAssign( ~lhs, tmp );
600 template<
typename VT1 >
601 friend inline auto smpAssign( Vector<VT1,true>& lhs,
const SMatReduceExpr& rhs )
602 -> EnableIf_t< UseSMPAssign_v<VT1> >
608 const RT tmp( rhs.sm_ );
609 smpAssign( ~lhs, reduce<0UL>( tmp, rhs.op_ ) );
629 template<
typename VT1 >
630 friend inline auto smpAddAssign( Vector<VT1,true>& lhs,
const SMatReduceExpr& rhs )
631 -> EnableIf_t< UseSMPAssign_v<VT1> >
637 const RT tmp( rhs.sm_ );
658 template<
typename VT1 >
659 friend inline auto smpSubAssign( Vector<VT1,true>& lhs,
const SMatReduceExpr& rhs )
660 -> EnableIf_t< UseSMPAssign_v<VT1> >
666 const RT tmp( rhs.sm_ );
687 template<
typename VT1 >
688 friend inline auto smpMultAssign( Vector<VT1,true>& lhs,
const SMatReduceExpr& rhs )
689 -> EnableIf_t< UseSMPAssign_v<VT1> >
695 const RT tmp( rhs.sm_ );
716 template<
typename VT1 >
717 friend inline auto smpDivAssign( Vector<VT1,true>& lhs,
const SMatReduceExpr& rhs )
718 -> EnableIf_t< UseSMPAssign_v<VT1> >
724 const RT tmp( rhs.sm_ );
755 template<
typename MT
758 :
public MatReduceExpr< DenseVector< SMatReduceExpr<MT,OP,rowwise>, false >, rowwise >
775 static constexpr
bool useAssign = RequiresEvaluation_v<MT>;
778 template<
typename VT >
780 static constexpr
bool UseAssign_v = useAssign;
791 template<
typename VT >
934 return index_ == rhs.index_;
945 return index_ != rhs.index_;
956 return index_ < rhs.index_;
967 return index_ > rhs.index_;
978 return index_ <= rhs.index_;
989 return index_ >= rhs.index_;
1000 return index_ - rhs.index_;
1051 static constexpr
bool simdEnabled =
false;
1089 if( index >= sm_.rows() ) {
1092 return (*
this)[index];
1121 inline size_t size() const noexcept {
1152 template<
typename T >
1153 inline bool canAlias(
const T* alias )
const noexcept {
1154 return ( sm_.isAliased( alias ) );
1164 template<
typename T >
1166 return ( sm_.isAliased( alias ) );
1186 return sm_.canSMPAssign() || (
size() > SMP_SMATREDUCE_THRESHOLD );
1210 template<
typename VT1 >
1219 assign( ~lhs, reduce<rowwise>( tmp, rhs.op_ ) );
1238 template<
typename VT1 >
1246 const RT tmp(
serial( rhs.sm_ ) );
1247 addAssign( ~lhs, reduce<rowwise>( tmp, rhs.op_ ) );
1267 template<
typename VT1 >
1268 friend inline auto subAssign( Vector<VT1,false>& lhs,
const SMatReduceExpr& rhs )
1269 -> EnableIf_t< UseAssign_v<VT1> >
1275 const RT tmp(
serial( rhs.sm_ ) );
1276 subAssign( ~lhs, reduce<rowwise>( tmp, rhs.op_ ) );
1296 template<
typename VT1 >
1297 friend inline auto multAssign( Vector<VT1,false>& lhs,
const SMatReduceExpr& rhs )
1298 -> EnableIf_t< UseAssign_v<VT1> >
1304 const RT tmp(
serial( rhs.sm_ ) );
1305 multAssign( ~lhs, reduce<rowwise>( tmp, rhs.op_ ) );
1324 template<
typename VT1 >
1325 friend inline auto divAssign( Vector<VT1,false>& lhs,
const SMatReduceExpr& rhs )
1326 -> EnableIf_t< UseAssign_v<VT1> >
1332 const RT tmp(
serial( rhs.sm_ ) );
1333 divAssign( ~lhs, reduce<rowwise>( tmp, rhs.op_ ) );
1352 template<
typename VT1 >
1353 friend inline auto smpAssign( Vector<VT1,false>& lhs,
const SMatReduceExpr& rhs )
1354 -> EnableIf_t< UseSMPAssign_v<VT1> >
1360 const RT tmp( rhs.sm_ );
1361 smpAssign( ~lhs, reduce<rowwise>( tmp, rhs.op_ ) );
1381 template<
typename VT1 >
1382 friend inline auto smpAddAssign( Vector<VT1,false>& lhs,
const SMatReduceExpr& rhs )
1383 -> EnableIf_t< UseSMPAssign_v<VT1> >
1389 const RT tmp( rhs.sm_ );
1410 template<
typename VT1 >
1411 friend inline auto smpSubAssign( Vector<VT1,false>& lhs,
const SMatReduceExpr& rhs )
1412 -> EnableIf_t< UseSMPAssign_v<VT1> >
1418 const RT tmp( rhs.sm_ );
1439 template<
typename VT1 >
1440 friend inline auto smpMultAssign( Vector<VT1,false>& lhs,
const SMatReduceExpr& rhs )
1441 -> EnableIf_t< UseSMPAssign_v<VT1> >
1447 const RT tmp( rhs.sm_ );
1468 template<
typename VT1 >
1469 friend inline auto smpDivAssign( Vector<VT1,false>& lhs,
const SMatReduceExpr& rhs )
1470 -> EnableIf_t< UseSMPAssign_v<VT1> >
1476 const RT tmp( rhs.sm_ );
1527 template<
typename MT
1537 const size_t M( (~sm).
rows() );
1538 const size_t N( (~sm).
columns() );
1540 if( M == 0UL || N == 0UL )
return ET{};
1542 const size_t iend( SO ? N : M );
1551 for(
size_t i=0UL; i<iend; ++i )
1553 const auto end( tmp.end(i) );
1554 auto element( tmp.begin(i) );
1556 if( element ==
end )
continue;
1558 ET redux1( element->value() );
1561 for( ; element!=
end; ++element ) {
1562 redux1 = op( redux1, element->value() );
1565 if( i == 0UL ) redux0 = redux1;
1566 else redux0 = op( redux0, redux1 );
1586 inline const SMatReduceExpr<MT,OP,RF> reduce_backend(
const SparseMatrix<MT,false>& sm, OP op )
1588 using ReturnType =
const SMatReduceExpr<MT,OP,RF>;
1607 inline decltype(
auto) reduce_backend( const SparseMatrix<MT,true>& sm, OP op )
1609 return trans( reduce<1UL-RF>(
trans( ~sm ), op ) );
1665 return reduce_backend<RF>( ~sm, op );
1688 template<
typename MT
1739 return reduce<RF>( ~sm,
Add() );
1762 template<
typename MT
1813 return reduce<RF>( ~sm,
Mult() );
1840 template<
typename MT
1891 return reduce<RF>( ~sm,
Min() );
1918 template<
typename MT
1969 return reduce<RF>( ~sm,
Max() );
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: SMatReduceExpr.h:1011
Pointer difference type of the Blaze library.
Header file for auxiliary alias declarations.
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition: Column.h:133
Header file for the blaze::checked and blaze::unchecked instances.
ElementType_t< ResultType > ElementType
Resulting element type.
Definition: SMatReduceExpr.h:802
Expression object for column-wise row-major sparse matrix reduction operations.This specialization of...
Definition: SMatReduceExpr.h:118
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: SMatReduceExpr.h:1023
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: SMatReduceExpr.h:922
Header file for basic type definitions.
Header file for the Add functor.
Operand sm_
Sparse matrix of the reduction expression.
Definition: SMatReduceExpr.h:1042
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
size_t index_
Index to the current matrix row.
Definition: SMatReduceExpr.h:1043
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: SMatReduceExpr.h:823
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: SMatReduceExpr.h:1035
Header file for the MatReduceExpr base class.
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: SMatReduceExpr.h:199
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.The ResultType_t alias declaration provides ...
Definition: Aliases.h:390
Header file for the serial shim.
Base class for all matrix reduction expression templates.The MatReduceExpr class serves as a tag for ...
Definition: MatReduceExpr.h:67
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:224
Operation operation() const
Returns a copy of the reduction operation.
Definition: SMatReduceExpr.h:1141
Operation op_
The reduction operation.
Definition: SMatReduceExpr.h:284
PointerType pointer
Pointer return type.
Definition: SMatReduceExpr.h:832
const ConstIterator operator++(int)
Post-increment operator.
Definition: SMatReduceExpr.h:891
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:3077
static constexpr bool smpAssignable
Compilation flag for SMP assignments.
Definition: CompressedMatrix.h:3113
ElementType_t< MT > ET
Element type of the sparse matrix expression.
Definition: SMatReduceExpr.h:126
ElementType_t< ResultType > ElementType
Resulting element type.
Definition: SMatReduceExpr.h:148
constexpr Unchecked unchecked
Global Unchecked instance.The blaze::unchecked instance is an optional token for the creation of view...
Definition: Check.h:138
typename SIMDTrait< T >::Type SIMDTrait_t
Auxiliary alias declaration for the SIMDTrait class template.The SIMDTrait_t alias declaration provid...
Definition: SIMDTrait.h:315
SMatReduceExpr(const MT &sm, OP op) noexcept
Constructor for the SMatReduceExpr class.
Definition: SMatReduceExpr.h:174
decltype(auto) prod(const DenseMatrix< MT, SO > &dm)
Reduces the given dense matrix by means of multiplication.
Definition: DMatReduceExpr.h:2219
Header file for the DenseVector base class.
Generic wrapper for the addition operator.
Definition: Add.h:80
Operand sm_
Sparse matrix of the reduction expression.
Definition: SMatReduceExpr.h:1192
Base template for row-major sparse matrix reduction operations.The SMatReduceExpr class represents th...
Definition: SMatReduceExpr.h:96
Operand sm_
Sparse matrix of the reduction expression.
Definition: SMatReduceExpr.h:283
Header file for the Computation base class.
ConstIterator begin() const
Returns an iterator to the first non-zero element of the dense vector.
Definition: SMatReduceExpr.h:1101
Constraints on the storage order of matrix types.
const ElementType ReturnType
Return type for expression template evaluations.
Definition: SMatReduceExpr.h:150
Operand operand() const noexcept
Returns the sparse matrix operand.
Definition: SMatReduceExpr.h:1131
Header file for the RequiresEvaluation type trait.
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: SMatReduceExpr.h:1185
#define BLAZE_STATIC_ASSERT_MSG(expr, msg)
Compile time assertion macro.In case of an invalid compile time expression, a compilation error is cr...
Definition: StaticAssert.h:123
Header file for the reduce trait.
size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition: SMatReduceExpr.h:212
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: SMatReduceExpr.h:1175
ReferenceType reference
Reference return type.
Definition: SMatReduceExpr.h:833
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:514
ElementType * PointerType
Pointer return type.
Definition: SMatReduceExpr.h:825
size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition: SMatReduceExpr.h:1121
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:137
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: SMatReduceExpr.h:1153
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.The ElementType_t alias declaration provide...
Definition: Aliases.h:170
auto smpDivAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs) -> EnableIf_t< IsDenseVector_v< VT1 > >
Default implementation of the SMP division assignment of a vector to a dense vector.
Definition: DenseVector.h:220
Header file for the SparseMatrix base class.
OP Operation
Data type of the custom unary operation.
Definition: SMatReduceExpr.h:157
Constraint on the transpose flag of vector types.
Constraint on the data type.
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
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: SMatReduceExpr.h:955
SIMDTrait_t< ElementType > SIMDType
Resulting SIMD element type.
Definition: SMatReduceExpr.h:149
decltype(auto) reduce(const DenseMatrix< MT, SO > &dm, OP op)
Performs a custom reduction operation on the given dense matrix.
Definition: DMatReduceExpr.h:2016
Operation op_
The reduction operation.
Definition: SMatReduceExpr.h:1193
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: SMatReduceExpr.h:801
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: SMatReduceExpr.h:933
OP Operation
Data type of the custom unary operation.
Definition: SMatReduceExpr.h:813
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the If class template.
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: SMatReduceExpr.h:266
#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
Type ElementType
Type of the compressed matrix elements.
Definition: CompressedMatrix.h:3080
decltype(auto) min(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise minimum of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1147
#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
decltype(auto) sum(const DenseMatrix< MT, SO > &dm)
Reduces the given dense matrix by means of addition.
Definition: DMatReduceExpr.h:2146
Header file for the Mult functor.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3086
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: SMatReduceExpr.h:944
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:76
OP op_
The reduction operation.
Definition: SMatReduceExpr.h:1044
ValueType value_type
Type of the underlying elements.
Definition: SMatReduceExpr.h:831
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: SMatReduceExpr.h:276
Constraint on the data type.
const ElementType ReturnType
Return type for expression template evaluations.
Definition: SMatReduceExpr.h:804
ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: SMatReduceExpr.h:869
Header file for the exception macros of the math module.
CompositeType_t< MT > CT
Composite type of the sparse matrix expression.
Definition: SMatReduceExpr.h:127
decltype(auto) max(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise maximum of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1179
ReduceTrait_t< RT, OP, rowwise > ResultType
Result type for expression template evaluations.
Definition: SMatReduceExpr.h:800
SIMDTrait_t< ElementType > SIMDType
Resulting SIMD element type.
Definition: SMatReduceExpr.h:803
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
ConstIterator end() const
Returns an iterator just past the last non-zero element of the dense vector.
Definition: SMatReduceExpr.h:1111
Constraint on the data type.
Header file for all forward declarations for expression class templates.
IteratorCategory iterator_category
The iterator category.
Definition: SMatReduceExpr.h:830
ElementType & ReferenceType
Reference return type.
Definition: SMatReduceExpr.h:826
Header file for the EnableIf class template.
Operation operation() const
Returns a copy of the reduction operation.
Definition: SMatReduceExpr.h:232
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: SMatReduceExpr.h:977
typename T::OppositeType OppositeType_t
Alias declaration for nested OppositeType type definitions.The OppositeType_t alias declaration provi...
Definition: Aliases.h:270
const ConstIterator operator--(int)
Post-decrement operator.
Definition: SMatReduceExpr.h:912
ResultType_t< MT > RT
Result type of the sparse matrix expression.
Definition: SMatReduceExpr.h:763
#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
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: SMatReduceExpr.h:999
typename ReduceTrait< T, OP, RF... >::Type ReduceTrait_t
Auxiliary alias declaration for the ReduceTrait class template.The ReduceTrait_t alias declaration pr...
Definition: ReduceTrait.h:174
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
Generic wrapper for the max() function.
Definition: Max.h:79
auto smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:131
ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: SMatReduceExpr.h:857
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition: Row.h:133
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: SMatReduceExpr.h:256
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: SMatReduceExpr.h:1088
#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
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: SMatReduceExpr.h:244
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition: Matrix.h:530
auto smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:100
Operand operand() const noexcept
Returns the sparse matrix operand.
Definition: SMatReduceExpr.h:222
Constraints on the storage order of matrix types.
ConstIterator & operator++()
Pre-increment operator.
Definition: SMatReduceExpr.h:880
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:808
Header file for the HasMember type traits.
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: SMatReduceExpr.h:966
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: SMatReduceExpr.h:186
#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
If_t< useAssign, const ResultType, const SMatReduceExpr &> CompositeType
Data type for composite expression templates.
Definition: SMatReduceExpr.h:807
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:498
Expression object for row-wise row-major sparse matrix reduction operations.This specialization of th...
Definition: SMatReduceExpr.h:757
SMatReduceExpr(const MT &sm, OP op) noexcept
Constructor for the SMatReduceExpr class.
Definition: SMatReduceExpr.h:1063
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: SMatReduceExpr.h:1075
Generic wrapper for the min() function.
Definition: Min.h:79
Header file for the Min functor.
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
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:765
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: SMatReduceExpr.h:147
If_t< IsExpression_v< MT >, const MT, const MT &> Operand
Composite type of the left-hand side sparse matrix expression.
Definition: SMatReduceExpr.h:154
constexpr size_t rowwise
Reduction flag for row-wise reduction operations.
Definition: ReductionFlag.h:70
Base class for N-dimensional vectors.The Vector class is a base class for all arbitrarily sized (N-di...
Definition: Forward.h:186
Generic wrapper for the multiplication operator.
Definition: Mult.h:77
ConstIterator(Operand sm, size_t index, OP op)
Constructor for the ConstIterator class.
Definition: SMatReduceExpr.h:844
auto smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:162
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:66
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: SMatReduceExpr.h:988
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:138
#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
const ResultType CompositeType
Data type for composite expression templates.
Definition: SMatReduceExpr.h:151
Header file for the Max functor.
ResultType_t< MT > RT
Result type of the sparse matrix expression.
Definition: SMatReduceExpr.h:124
ElementType ValueType
Type of the underlying elements.
Definition: SMatReduceExpr.h:824
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: SMatReduceExpr.h:1165
OppositeType_t< MT > OT
Opposite type of the sparse matrix expression.
Definition: SMatReduceExpr.h:125
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
#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
ElementType_t< MT > ET
Element type of the sparse matrix expression.
Definition: SMatReduceExpr.h:764
auto smpMultAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs) -> EnableIf_t< IsDenseVector_v< VT1 > >
Default implementation of the SMP multiplication assignment of a vector to a dense vector...
Definition: DenseVector.h:191
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a sparse, N-dimensional matrix type...
Definition: SparseMatrix.h:61
Header file for the reduction flags.
Constraint on the transpose flag of vector types.
If_t< IsExpression_v< MT >, const MT, const MT &> Operand
Composite type of the left-hand side sparse matrix expression.
Definition: SMatReduceExpr.h:810
ReduceTrait_t< RT, OP, 0UL > ResultType
Result type for expression template evaluations.
Definition: SMatReduceExpr.h:146
Header file for the IsExpression type trait class.
Header file for the function trace functionality.
ConstIterator & operator--()
Pre-decrement operator.
Definition: SMatReduceExpr.h:901