SVecExpandExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_SVECEXPANDEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_SVECEXPANDEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/math/Aliases.h>
47 #include <blaze/math/Exception.h>
59 #include <blaze/system/Inline.h>
60 #include <blaze/util/Assert.h>
61 #include <blaze/util/EnableIf.h>
63 #include <blaze/util/InvalidType.h>
64 #include <blaze/util/mpl/If.h>
65 #include <blaze/util/Types.h>
67 #include <blaze/util/Unused.h>
68 
69 
70 namespace blaze {
71 
72 //=================================================================================================
73 //
74 // CLASS SVECEXPANDEXPR
75 //
76 //=================================================================================================
77 
78 //*************************************************************************************************
85 template< typename VT // Type of the dense vector
86  , bool TF // Transpose flag
87  , size_t... CEAs > // Compile time expansion arguments
88 class SVecExpandExpr
89  : public VecExpandExpr< SparseMatrix< SVecExpandExpr<VT,TF,CEAs...>, !TF >, CEAs... >
90  , private Transformation
91  , private ExpandExprData<CEAs...>
92 {
93  private:
94  //**Type definitions****************************************************************************
95  using RT = ResultType_t<VT>;
96 
97  using DataType = ExpandExprData<CEAs...>;
98 
100  BLAZE_CREATE_GET_TYPE_MEMBER_TYPE_TRAIT( GetConstIterator, ConstIterator, INVALID_TYPE );
101  //**********************************************************************************************
102 
103  //**Serial evaluation strategy******************************************************************
105 
111  static constexpr bool useAssign = IsComputation_v<VT> || RequiresEvaluation_v<VT>;
112 
114  template< typename MT >
116  static constexpr bool UseAssign_v = useAssign;
118  //**********************************************************************************************
119 
120  //**Parallel evaluation strategy****************************************************************
122 
128  template< typename MT >
129  static constexpr bool UseSMPAssign_v = ( MT::smpAssignable && useAssign );
131  //**********************************************************************************************
132 
133  public:
134  //**Type definitions****************************************************************************
135  using This = SVecExpandExpr<VT,TF,CEAs...>;
137  using ResultType = ExpandTrait_t<VT,CEAs...>;
142 
145 
147  using ConstIterator = GetConstIterator_t<VT>;
148 
150  using Operand = If_t< IsExpression_v<VT>, const VT, const VT& >;
151  //**********************************************************************************************
152 
153  //**Compilation flags***************************************************************************
155  static constexpr bool smpAssignable = VT::smpAssignable;
156  //**********************************************************************************************
157 
158  //**Constructor*********************************************************************************
164  template< typename... REAs > // Runtime expansion arguments
165  explicit inline SVecExpandExpr( const VT& sv, REAs... args ) noexcept
166  : DataType( args... ) // Base class initialization
167  , sv_ ( sv ) // Sparse vector of the expansion expression
168  {}
169  //**********************************************************************************************
170 
171  //**Access operator*****************************************************************************
178  inline ReturnType operator()( size_t i, size_t j ) const {
179  if( TF ) {
180  BLAZE_INTERNAL_ASSERT( i < expansion(), "Invalid row access index" );
181  BLAZE_INTERNAL_ASSERT( j < sv_.size() , "Invalid column access index" );
182  return sv_[j];
183  }
184  else {
185  BLAZE_INTERNAL_ASSERT( i < sv_.size() , "Invalid row access index" );
186  BLAZE_INTERNAL_ASSERT( j < expansion(), "Invalid column access index" );
187  return sv_[i];
188  }
189  }
190  //**********************************************************************************************
191 
192  //**At function*********************************************************************************
200  inline ReturnType at( size_t i, size_t j ) const {
201  if( i >= ( TF ? expansion() : sv_.size() ) ) {
202  BLAZE_THROW_OUT_OF_RANGE( "Invalid row access index" );
203  }
204  if( j >= ( TF ? sv_.size() : expansion() ) ) {
205  BLAZE_THROW_OUT_OF_RANGE( "Invalid column access index" );
206  }
207  return (*this)(i,j);
208  }
209  //**********************************************************************************************
210 
211  //**Begin function******************************************************************************
217  inline ConstIterator begin( size_t i ) const {
218  UNUSED_PARAMETER( i );
219  return sv_.begin();
220  }
221  //**********************************************************************************************
222 
223  //**End function********************************************************************************
229  inline ConstIterator end( size_t i ) const {
230  UNUSED_PARAMETER( i );
231  return sv_.end();
232  }
233  //**********************************************************************************************
234 
235  //**Rows function*******************************************************************************
240  inline size_t rows() const noexcept {
241  return ( TF ? expansion() : sv_.size() );
242  }
243  //**********************************************************************************************
244 
245  //**Columns function****************************************************************************
250  inline size_t columns() const noexcept {
251  return ( TF ? sv_.size() : expansion() );
252  }
253  //**********************************************************************************************
254 
255  //**NonZeros function***************************************************************************
260  inline size_t nonZeros() const {
261  return sv_.nonZeros() * expansion();
262  }
263  //**********************************************************************************************
264 
265  //**NonZeros function***************************************************************************
271  inline size_t nonZeros( size_t i ) const {
272  UNUSED_PARAMETER( i );
273  return sv_.nonZeros();
274  }
275  //**********************************************************************************************
276 
277  //**Find function*******************************************************************************
284  inline ConstIterator find( size_t i, size_t j ) const {
286  return sv_.find( TF ? j : i );
287  }
288  //**********************************************************************************************
289 
290  //**LowerBound function*************************************************************************
297  inline ConstIterator lowerBound( size_t i, size_t j ) const {
299  return sv_.lowerBound( TF ? j : i );
300  }
301  //**********************************************************************************************
302 
303  //**UpperBound function*************************************************************************
310  inline ConstIterator upperBound( size_t i, size_t j ) const {
312  return sv_.upperBound( TF ? j : i );
313  }
314  //**********************************************************************************************
315 
316  //**Operand access******************************************************************************
321  inline Operand operand() const noexcept {
322  return sv_;
323  }
324  //**********************************************************************************************
325 
326  //**********************************************************************************************
327  using DataType::expansion;
328  //**********************************************************************************************
329 
330  //**********************************************************************************************
336  template< typename T >
337  inline bool canAlias( const T* alias ) const noexcept {
338  return sv_.isAliased( alias );
339  }
340  //**********************************************************************************************
341 
342  //**********************************************************************************************
348  template< typename T >
349  inline bool isAliased( const T* alias ) const noexcept {
350  return sv_.isAliased( alias );
351  }
352  //**********************************************************************************************
353 
354  //**********************************************************************************************
359  inline bool canSMPAssign() const noexcept {
360  return sv_.canSMPAssign();
361  }
362  //**********************************************************************************************
363 
364  private:
365  //**Member variables****************************************************************************
367  //**********************************************************************************************
368 
369  //**Assignment to matrices**********************************************************************
383  template< typename MT // Type of the target dense matrix
384  , bool SO > // Storage order of the target dense matrix
385  friend inline auto assign( Matrix<MT,SO>& lhs, const SVecExpandExpr& rhs )
387  {
388  using blaze::expand;
389 
391 
392  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
393  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
394 
395  const RT tmp( serial( ~rhs.sv_ ) );
396 
397  assign( ~lhs, expand<CEAs...>( tmp, rhs.expansion() ) );
398  }
400  //**********************************************************************************************
401 
402  //**Addition assignment to matrices*************************************************************
416  template< typename MT // Type of the target dense matrix
417  , bool SO > // Storage order of the target dense matrix
418  friend inline auto addAssign( Matrix<MT,SO>& lhs, const SVecExpandExpr& rhs )
420  {
421  using blaze::expand;
422 
424 
425  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
426  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
427 
428  const RT tmp( serial( ~rhs.sv_ ) );
429 
430  addAssign( ~lhs, expand<CEAs...>( tmp, rhs.expansion() ) );
431  }
433  //**********************************************************************************************
434 
435  //**Subtraction assignment to matrices**********************************************************
449  template< typename MT // Type of the target dense matrix
450  , bool SO > // Storage order of the target dense matrix
451  friend inline auto subAssign( Matrix<MT,SO>& lhs, const SVecExpandExpr& rhs )
452  -> EnableIf_t< UseAssign_v<MT> >
453  {
454  using blaze::expand;
455 
457 
458  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
459  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
460 
461  const RT tmp( serial( ~rhs.sv_ ) );
462 
463  subAssign( ~lhs, expand<CEAs...>( tmp, rhs.expansion() ) );
464  }
466  //**********************************************************************************************
467 
468  //**Schur product assignment to matrices********************************************************
482  template< typename MT // Type of the target dense matrix
483  , bool SO > // Storage order of the target dense matrix
484  friend inline auto schurAssign( Matrix<MT,SO>& lhs, const SVecExpandExpr& rhs )
485  -> EnableIf_t< UseAssign_v<MT> >
486  {
487  using blaze::expand;
488 
490 
491  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
492  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
493 
494  const RT tmp( serial( ~rhs.sv_ ) );
495 
496  schurAssign( ~lhs, expand<CEAs...>( tmp, rhs.expansion() ) );
497  }
499  //**********************************************************************************************
500 
501  //**Multiplication assignment to matrices*******************************************************
515  template< typename MT // Type of the target dense matrix
516  , bool SO > // Storage order of the target dense matrix
517  friend inline auto multAssign( Matrix<MT,SO>& lhs, const SVecExpandExpr& rhs )
518  -> EnableIf_t< UseAssign_v<MT> >
519  {
520  using blaze::expand;
521 
523 
524  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
525  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
526 
527  const RT tmp( serial( ~rhs.sv_ ) );
528 
529  multAssign( ~lhs, expand<CEAs...>( tmp, rhs.expansion() ) );
530  }
532  //**********************************************************************************************
533 
534  //**SMP assignment to matrices******************************************************************
548  template< typename MT // Type of the target matrix
549  , bool SO > // Storage order of the target matrix
550  friend inline auto smpAssign( Matrix<MT,SO>& lhs, const SVecExpandExpr& rhs )
551  -> EnableIf_t< UseSMPAssign_v<MT> >
552  {
553  using blaze::expand;
554 
556 
557  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
558  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
559 
560  const RT tmp( ~rhs.sv_ );
561 
562  smpAssign( ~lhs, expand<CEAs...>( tmp, rhs.expansion() ) );
563  }
565  //**********************************************************************************************
566 
567  //**SMP addition assignment to matrices*********************************************************
581  template< typename MT // Type of the target matrix
582  , bool SO > // Storage order of the target matrix
583  friend inline auto smpAddAssign( Matrix<MT,SO>& lhs, const SVecExpandExpr& rhs )
584  -> EnableIf_t< UseSMPAssign_v<MT> >
585  {
586  using blaze::expand;
587 
589 
590  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
591  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
592 
593  const RT tmp( ~rhs.sv_ );
594 
595  smpAddAssign( ~lhs, expand<CEAs...>( tmp, rhs.expansion() ) );
596  }
598  //**********************************************************************************************
599 
600  //**SMP subtraction assignment to matrices******************************************************
614  template< typename MT // Type of the target matrix
615  , bool SO > // Storage order of the target matrix
616  friend inline auto smpSubAssign( Matrix<MT,SO>& lhs, const SVecExpandExpr& rhs )
617  -> EnableIf_t< UseSMPAssign_v<MT> >
618  {
619  using blaze::expand;
620 
622 
623  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
624  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
625 
626  const RT tmp( ~rhs.sv_ );
627 
628  smpSubAssign( ~lhs, expand<CEAs...>( tmp, rhs.expansion() ) );
629  }
631  //**********************************************************************************************
632 
633  //**SMP Schur product assignment to matrices****************************************************
647  template< typename MT // Type of the target matrix
648  , bool SO > // Storage order of the target matrix
649  friend inline auto smpSchurAssign( Matrix<MT,SO>& lhs, const SVecExpandExpr& rhs )
650  -> EnableIf_t< UseSMPAssign_v<MT> >
651  {
652  using blaze::expand;
653 
655 
656  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
657  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
658 
659  const RT tmp( ~rhs.sv_ );
660 
661  smpSchurAssign( ~lhs, expand<CEAs...>( tmp, rhs.expansion() ) );
662  }
664  //**********************************************************************************************
665 
666  //**SMP multiplication assignment to matrices***************************************************
680  template< typename MT // Type of the target matrix
681  , bool SO > // Storage order of the target matrix
682  friend inline auto smpMultAssign( Matrix<MT,SO>& lhs, const SVecExpandExpr& rhs )
683  -> EnableIf_t< UseSMPAssign_v<MT> >
684  {
685  using blaze::expand;
686 
688 
689  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
690  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
691 
692  const RT tmp( ~rhs.sv_ );
693 
694  smpMultAssign( ~lhs, expand<CEAs...>( tmp, rhs.expansion() ) );
695  }
697  //**********************************************************************************************
698 
699  //**Compile time checks*************************************************************************
704  //**********************************************************************************************
705 };
706 //*************************************************************************************************
707 
708 
709 
710 
711 //=================================================================================================
712 //
713 // GLOBAL OPERATORS
714 //
715 //=================================================================================================
716 
717 //*************************************************************************************************
756 template< typename VT // Type of the sparse vector
757  , bool TF > // Transpose flag
758 inline decltype(auto) expand( const SparseVector<VT,TF>& sv, size_t expansion )
759 {
761 
762  using ReturnType = const SVecExpandExpr<VT,TF>;
763  return ReturnType( ~sv, expansion );
764 }
765 //*************************************************************************************************
766 
767 
768 //*************************************************************************************************
806 template< size_t E // Compile time expansion argument
807  , typename VT // Type of the sparse vector
808  , bool TF > // Transpose flag
809 inline decltype(auto) expand( const SparseVector<VT,TF>& sv )
810 {
812 
813  using ReturnType = const SVecExpandExpr<VT,TF,E>;
814  return ReturnType( ~sv );
815 }
816 //*************************************************************************************************
817 
818 
819 //*************************************************************************************************
831 template< size_t E // Compile time expansion argument
832  , typename VT // Type of the sparse vector
833  , bool TF > // Transpose flag
834 inline decltype(auto) expand( const SparseVector<VT,TF>& sv, size_t expansion )
835 {
836  UNUSED_PARAMETER( expansion );
837 
839 
840  using ReturnType = const SVecExpandExpr<VT,TF,E>;
841  return ReturnType( ~sv );
842 }
844 //*************************************************************************************************
845 
846 } // namespace blaze
847 
848 #endif
Header file for auxiliary alias declarations.
Header file for the UNUSED_PARAMETER function template.
Header file for basic type definitions.
Header file for the SparseVector base class.
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
Header file for the implementation of the ExpandExprData class template.
static constexpr bool useAssign
Compilation switch for the serial evaluation strategy of the expansion expression.
Definition: SVecExpandExpr.h:111
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.
ConstIterator find(size_t i, size_t j) const
Searches for a specific matrix element.
Definition: SVecExpandExpr.h:284
static constexpr bool smpAssignable
Compilation flag for SMP assignments.
Definition: CompressedMatrix.h:3113
ResultType_t< VT > RT
Result type of the sparse vector expression.
Definition: SVecExpandExpr.h:95
Header file for the RequiresEvaluation type trait.
SVecExpandExpr(const VT &sv, REAs... args) noexcept
Constructor for the SVecExpandExpr class.
Definition: SVecExpandExpr.h:165
constexpr void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: SVecExpandExpr.h:349
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 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.
ExpandExprData< CEAs... > DataType
The type of the ExpandExprData base class.
Definition: SVecExpandExpr.h:97
size_t nonZeros() const
Returns the number of non-zero elements in the sparse matrix.
Definition: SVecExpandExpr.h:260
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
Operand sv_
Sparse vector of the expansion expression.
Definition: SVecExpandExpr.h:366
OppositeType_t< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: SVecExpandExpr.h:138
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: SVecExpandExpr.h:155
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: SVecExpandExpr.h:178
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the If class template.
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: SVecExpandExpr.h:240
Header file for the Transformation base class.
ReturnType_t< VT > ReturnType
Return type for expression template evaluations.
Definition: SVecExpandExpr.h:141
Header file for the expand trait.
ExpandTrait_t< VT, CEAs... > ResultType
Result type for expression template evaluations.
Definition: SVecExpandExpr.h:137
#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
Expression object for sparse vector expansion.The SVecExpandExpr class represents the compile time ex...
Definition: Forward.h:145
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: SVecExpandExpr.h:337
Header file for the GetMemberType type 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 exception macros of the math module.
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: SVecExpandExpr.h:139
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: SVecExpandExpr.h:200
Constraint on the data type.
Header file for all forward declarations for expression class templates.
Constraint on the data type.
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: SVecExpandExpr.h:359
Header file for the EnableIf class template.
BLAZE_CREATE_GET_TYPE_MEMBER_TYPE_TRAIT(GetConstIterator, ConstIterator, INVALID_TYPE)
Definition of the GetConstIterator type trait.
typename T::OppositeType OppositeType_t
Alias declaration for nested OppositeType type definitions.The OppositeType_t alias declaration provi...
Definition: Aliases.h:270
GetConstIterator_t< VT > ConstIterator
Iterator over the elements of the sparse matrix.
Definition: SVecExpandExpr.h:147
If_t< useAssign, const ResultType, const SVecExpandExpr &> CompositeType
Data type for composite expression templates.
Definition: SVecExpandExpr.h:144
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.
Utility type for generic codes.
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
decltype(auto) expand(const DenseVector< VT, TF > &dv, size_t expansion)
Expansion of the given dense vector.
Definition: DVecExpandExpr.h:739
#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
Base class for matrices.The Matrix class is a base class for all dense and sparse matrix classes with...
Definition: Forward.h:109
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
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row/column i.
Definition: SVecExpandExpr.h:229
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
size_t nonZeros(size_t i) const
Returns the number of non-zero elements in the specified row/column.
Definition: SVecExpandExpr.h:271
auto smpSchurAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP Schur product assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:194
If_t< IsExpression_v< VT >, const VT, const VT &> Operand
Composite data type of the sparse matrix expression.
Definition: SVecExpandExpr.h:150
typename ExpandTrait< T, CEAs... >::Type ExpandTrait_t
Auxiliary alias declaration for the ExpandTrait type trait.The ExpandTrait_t alias declaration provid...
Definition: ExpandTrait.h:171
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3081
Header file for the VecExpandExpr base class.
Header file for the IsComputation type trait class.
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 sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:138
Operand operand() const noexcept
Returns the sparse vector operand.
Definition: SVecExpandExpr.h:321
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row/column i.
Definition: SVecExpandExpr.h:217
System settings for the inline keywords.
#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
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
Header file for the IsExpression type trait class.
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: SVecExpandExpr.h:250
ElementType_t< VT > ElementType
Resulting element type.
Definition: SVecExpandExpr.h:140
Header file for the function trace functionality.
ConstIterator upperBound(size_t i, size_t j) const
Returns an iterator to the first index greater then the given index.
Definition: SVecExpandExpr.h:310
ConstIterator lowerBound(size_t i, size_t j) const
Returns an iterator to the first index not less then the given index.
Definition: SVecExpandExpr.h:297