All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DVecAbsExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_DVECABSEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DVECABSEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <cmath>
50 #include <blaze/math/Intrinsics.h>
64 #include <blaze/util/Assert.h>
66 #include <blaze/util/EnableIf.h>
67 #include <blaze/util/InvalidType.h>
69 #include <blaze/util/SelectType.h>
70 #include <blaze/util/Types.h>
71 
72 
73 namespace blaze {
74 
75 //=================================================================================================
76 //
77 // CLASS DVECABSEXPR
78 //
79 //=================================================================================================
80 
81 //*************************************************************************************************
88 template< typename VT // Type of the dense vector
89  , bool TF > // Transpose flag
90 class DVecAbsExpr : public DenseVector< DVecAbsExpr<VT,TF>, TF >
91  , private VecAbsExpr
92  , private Computation
93 {
94  private:
95  //**Type definitions****************************************************************************
96  typedef typename VT::ReturnType RN;
97  typedef typename VT::ElementType ET;
98  //**********************************************************************************************
99 
100  //**Return type evaluation**********************************************************************
102 
107  enum { returnExpr = !IsTemporary<RN>::value };
108 
111  //**********************************************************************************************
112 
113  //**Evaluation strategy*************************************************************************
115 
121  enum { useAssign = RequiresEvaluation<VT>::value };
122 
124  template< typename VT2 >
126  struct UseAssign {
127  enum { value = useAssign };
128  };
130  //**********************************************************************************************
131 
132  public:
133  //**Type definitions****************************************************************************
135  typedef typename VT::ResultType ResultType;
136  typedef typename VT::TransposeType TransposeType;
137  typedef typename VT::ElementType ElementType;
139 
142 
145 
147  typedef typename SelectType< IsExpression<VT>::value, const VT, const VT& >::Type Operand;
148  //**********************************************************************************************
149 
150  //**ConstIterator class definition**************************************************************
154  {
155  public:
156  //**Type definitions*************************************************************************
157  typedef std::random_access_iterator_tag IteratorCategory;
162 
163  // STL iterator requirements
169 
171  typedef typename VT::ConstIterator IteratorType;
172  //*******************************************************************************************
173 
174  //**Constructor******************************************************************************
179  explicit inline ConstIterator( IteratorType it )
180  : it_( it ) // Iterator to the current vector element
181  {}
182  //*******************************************************************************************
183 
184  //**Addition assignment operator*************************************************************
190  inline ConstIterator& operator+=( size_t inc ) {
191  it_ += inc;
192  return *this;
193  }
194  //*******************************************************************************************
195 
196  //**Subtraction assignment operator**********************************************************
202  inline ConstIterator& operator-=( size_t dec ) {
203  it_ -= dec;
204  return *this;
205  }
206  //*******************************************************************************************
207 
208  //**Prefix increment operator****************************************************************
214  ++it_;
215  return *this;
216  }
217  //*******************************************************************************************
218 
219  //**Postfix increment operator***************************************************************
224  inline const ConstIterator operator++( int ) {
225  return ConstIterator( it_++ );
226  }
227  //*******************************************************************************************
228 
229  //**Prefix decrement operator****************************************************************
235  --it_;
236  return *this;
237  }
238  //*******************************************************************************************
239 
240  //**Postfix decrement operator***************************************************************
245  inline const ConstIterator operator--( int ) {
246  return ConstIterator( it_-- );
247  }
248  //*******************************************************************************************
249 
250  //**Element access operator******************************************************************
255  inline ReturnType operator*() const {
256  using std::abs;
257  return abs( *it_ );
258  }
259  //*******************************************************************************************
260 
261  //**Load function****************************************************************************
266  inline IntrinsicType load() const {
267  return abs( it_.load() );
268  }
269  //*******************************************************************************************
270 
271  //**Equality operator************************************************************************
277  inline bool operator==( const ConstIterator& rhs ) const {
278  return it_ == rhs.it_;
279  }
280  //*******************************************************************************************
281 
282  //**Inequality operator**********************************************************************
288  inline bool operator!=( const ConstIterator& rhs ) const {
289  return it_ != rhs.it_;
290  }
291  //*******************************************************************************************
292 
293  //**Less-than operator***********************************************************************
299  inline bool operator<( const ConstIterator& rhs ) const {
300  return it_ < rhs.it_;
301  }
302  //*******************************************************************************************
303 
304  //**Greater-than operator********************************************************************
310  inline bool operator>( const ConstIterator& rhs ) const {
311  return it_ > rhs.it_;
312  }
313  //*******************************************************************************************
314 
315  //**Less-or-equal-than operator**************************************************************
321  inline bool operator<=( const ConstIterator& rhs ) const {
322  return it_ <= rhs.it_;
323  }
324  //*******************************************************************************************
325 
326  //**Greater-or-equal-than operator***********************************************************
332  inline bool operator>=( const ConstIterator& rhs ) const {
333  return it_ >= rhs.it_;
334  }
335  //*******************************************************************************************
336 
337  //**Subtraction operator*********************************************************************
343  inline DifferenceType operator-( const ConstIterator& rhs ) const {
344  return it_ - rhs.it_;
345  }
346  //*******************************************************************************************
347 
348  //**Addition operator************************************************************************
355  friend inline const ConstIterator operator+( const ConstIterator& it, size_t inc ) {
356  return ConstIterator( it.it_ + inc );
357  }
358  //*******************************************************************************************
359 
360  //**Addition operator************************************************************************
367  friend inline const ConstIterator operator+( size_t inc, const ConstIterator& it ) {
368  return ConstIterator( it.it_ + inc );
369  }
370  //*******************************************************************************************
371 
372  //**Subtraction operator*********************************************************************
379  friend inline const ConstIterator operator-( const ConstIterator& it, size_t dec ) {
380  return ConstIterator( it.it_ - dec );
381  }
382  //*******************************************************************************************
383 
384  private:
385  //**Member variables*************************************************************************
387  //*******************************************************************************************
388  };
389  //**********************************************************************************************
390 
391  //**Compilation flags***************************************************************************
393  enum { vectorizable = VT::vectorizable &&
395 
397  enum { smpAssignable = VT::smpAssignable };
398  //**********************************************************************************************
399 
400  //**Constructor*********************************************************************************
405  explicit inline DVecAbsExpr( const VT& dv )
406  : dv_( dv ) // Dense vector of the absolute value expression
407  {}
408  //**********************************************************************************************
409 
410  //**Subscript operator**************************************************************************
416  inline ReturnType operator[]( size_t index ) const {
417  using std::abs;
418  BLAZE_INTERNAL_ASSERT( index < dv_.size(), "Invalid vector access index" );
419  return abs( dv_[index] );
420  }
421  //**********************************************************************************************
422 
423  //**Load function*******************************************************************************
429  inline IntrinsicType load( size_t index ) const {
430  typedef IntrinsicTrait<ElementType> IT;
431  BLAZE_INTERNAL_ASSERT( index < dv_.size() , "Invalid vector access index" );
432  BLAZE_INTERNAL_ASSERT( index % IT::size == 0UL, "Invalid vector access index" );
433  return abs( dv_.load( index ) );
434  }
435  //**********************************************************************************************
436 
437  //**Begin function******************************************************************************
442  inline ConstIterator begin() const {
443  return ConstIterator( dv_.begin() );
444  }
445  //**********************************************************************************************
446 
447  //**End function********************************************************************************
452  inline ConstIterator end() const {
453  return ConstIterator( dv_.end() );
454  }
455  //**********************************************************************************************
456 
457  //**Size function*******************************************************************************
462  inline size_t size() const {
463  return dv_.size();
464  }
465  //**********************************************************************************************
466 
467  //**Operand access******************************************************************************
472  inline Operand operand() const {
473  return dv_;
474  }
475  //**********************************************************************************************
476 
477  //**********************************************************************************************
483  template< typename T >
484  inline bool canAlias( const T* alias ) const {
485  return IsComputation<VT>::value && dv_.canAlias( alias );
486  }
487  //**********************************************************************************************
488 
489  //**********************************************************************************************
495  template< typename T >
496  inline bool isAliased( const T* alias ) const {
497  return dv_.isAliased( alias );
498  }
499  //**********************************************************************************************
500 
501  //**********************************************************************************************
506  inline bool isAligned() const {
507  return dv_.isAligned();
508  }
509  //**********************************************************************************************
510 
511  //**********************************************************************************************
516  inline bool canSMPAssign() const {
517  return dv_.canSMPAssign();
518  }
519  //**********************************************************************************************
520 
521  private:
522  //**Member variables****************************************************************************
524  //**********************************************************************************************
525 
526  //**Assignment to dense vectors*****************************************************************
540  template< typename VT2 > // Type of the target dense vector
541  friend inline typename EnableIf< UseAssign<VT2> >::Type
542  assign( DenseVector<VT2,TF>& lhs, const DVecAbsExpr& rhs )
543  {
545 
546  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
547 
548  assign ( ~lhs, rhs.dv_ );
549  smpAssign( ~lhs, abs( ~lhs ) );
550  }
552  //**********************************************************************************************
553 
554  //**Assignment to sparse vectors****************************************************************
568  template< typename VT2 > // Type of the target sparse vector
569  friend inline typename EnableIf< UseAssign<VT2> >::Type
570  assign( SparseVector<VT2,TF>& lhs, const DVecAbsExpr& rhs )
571  {
573 
577 
578  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
579 
580  const ResultType tmp( rhs );
581  smpAssign( ~lhs, tmp );
582  }
584  //**********************************************************************************************
585 
586  //**Addition assignment to dense vectors********************************************************
600  template< typename VT2 > // Type of the target dense vector
601  friend inline typename EnableIf< UseAssign<VT2> >::Type
602  addAssign( DenseVector<VT2,TF>& lhs, const DVecAbsExpr& rhs )
603  {
605 
609 
610  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
611 
612  const ResultType tmp( rhs );
613  smpAddAssign( ~lhs, tmp );
614  }
616  //**********************************************************************************************
617 
618  //**Addition assignment to sparse vectors*******************************************************
619  // No special implementation for the addition assignment to sparse vectors.
620  //**********************************************************************************************
621 
622  //**Subtraction assignment to dense vectors*****************************************************
636  template< typename VT2 > // Type of the target dense vector
637  friend inline typename EnableIf< UseAssign<VT2> >::Type
638  subAssign( DenseVector<VT2,TF>& lhs, const DVecAbsExpr& rhs )
639  {
641 
645 
646  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
647 
648  const ResultType tmp( rhs );
649  smpSubAssign( ~lhs, tmp );
650  }
652  //**********************************************************************************************
653 
654  //**Subtraction assignment to sparse vectors****************************************************
655  // No special implementation for the subtraction assignment to sparse vectors.
656  //**********************************************************************************************
657 
658  //**Multiplication assignment to dense vectors**************************************************
672  template< typename VT2 > // Type of the target dense vector
673  friend inline typename EnableIf< UseAssign<VT2> >::Type
674  multAssign( DenseVector<VT2,TF>& lhs, const DVecAbsExpr& rhs )
675  {
677 
681 
682  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
683 
684  const ResultType tmp( rhs );
685  smpMultAssign( ~lhs, tmp );
686  }
688  //**********************************************************************************************
689 
690  //**Multiplication assignment to sparse vectors*************************************************
691  // No special implementation for the multiplication assignment to sparse vectors.
692  //**********************************************************************************************
693 
694  //**Compile time checks*************************************************************************
699  //**********************************************************************************************
700 };
701 //*************************************************************************************************
702 
703 
704 
705 
706 //=================================================================================================
707 //
708 // GLOBAL FUNCTIONS
709 //
710 //=================================================================================================
711 
712 //*************************************************************************************************
729 template< typename VT // Type of the dense vector
730  , bool TF > // Transpose flag
731 inline const DVecAbsExpr<VT,TF> abs( const DenseVector<VT,TF>& dv )
732 {
734 
735  return DVecAbsExpr<VT,TF>( ~dv );
736 }
737 //*************************************************************************************************
738 
739 
740 
741 
742 //=================================================================================================
743 //
744 // GLOBAL RESTRUCTURING FUNCTIONS
745 //
746 //=================================================================================================
747 
748 //*************************************************************************************************
759 template< typename VT // Type of the dense vector
760  , bool TF > // Transpose flag
761 inline const DVecAbsExpr<VT,TF>& abs( const DVecAbsExpr<VT,TF>& dv )
762 {
764 
765  return dv;
766 }
768 //*************************************************************************************************
769 
770 
771 
772 
773 //=================================================================================================
774 //
775 // EXPRESSION TRAIT SPECIALIZATIONS
776 //
777 //=================================================================================================
778 
779 //*************************************************************************************************
781 template< typename VT >
782 struct DVecAbsExprTrait< DVecAbsExpr<VT,false> >
783 {
784  public:
785  //**********************************************************************************************
786  typedef typename SelectType< IsDenseVector<VT>::value && IsColumnVector<VT>::value
787  , DVecAbsExpr<VT,false>
788  , INVALID_TYPE >::Type Type;
789  //**********************************************************************************************
790 };
792 //*************************************************************************************************
793 
794 
795 //*************************************************************************************************
797 template< typename VT >
798 struct TDVecAbsExprTrait< DVecAbsExpr<VT,true> >
799 {
800  public:
801  //**********************************************************************************************
802  typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value
803  , DVecAbsExpr<VT,true>
804  , INVALID_TYPE >::Type Type;
805  //**********************************************************************************************
806 };
808 //*************************************************************************************************
809 
810 
811 //*************************************************************************************************
813 template< typename VT, bool TF, bool AF >
814 struct SubvectorExprTrait< DVecAbsExpr<VT,TF>, AF >
815 {
816  public:
817  //**********************************************************************************************
818  typedef typename AbsExprTrait< typename SubvectorExprTrait<const VT,AF>::Type >::Type Type;
819  //**********************************************************************************************
820 };
822 //*************************************************************************************************
823 
824 } // namespace blaze
825 
826 #endif
ConstIterator begin() const
Returns an iterator to the first non-zero element of the dense vector.
Definition: DVecAbsExpr.h:442
Pointer difference type of the Blaze library.
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:89
DVecAbsExpr(const VT &dv)
Constructor for the DVecAbsExpr class.
Definition: DVecAbsExpr.h:405
VT::ResultType ResultType
Result type for expression template evaluations.
Definition: DVecAbsExpr.h:135
Compile time check whether the given type is a temporary vector or matrix type.This type trait class ...
Definition: IsTemporary.h:87
void smpSubAssign(DenseMatrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:151
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:197
void smpMultAssign(DenseVector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs)
Default implementation of the SMP multiplication assignment of a vector to a dense vector...
Definition: DenseVector.h:178
Header file for the IsRowVector type trait.
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DVecAbsExpr.h:367
Header file for the DenseVector base class.
const DMatAbsExpr< MT, SO > abs(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the absolute values of each single element of dm.
Definition: DMatAbsExpr.h:764
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DVecAbsExpr.h:355
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: DVecAbsExpr.h:416
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DVecAbsExpr.h:157
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: DVecAbsExpr.h:484
Header file for the Computation base class.
const ConstIterator operator--(int)
Post-decrement operator.
Definition: DVecAbsExpr.h:245
Expression object for the dense vector abs() function.The DVecAbsExpr class represents the compile ti...
Definition: DVecAbsExpr.h:90
Header file for the RequiresEvaluation type trait.
ConstIterator end() const
Returns an iterator just past the last non-zero element of the dense vector.
Definition: DVecAbsExpr.h:452
Header file for the TDVecAbsExprTrait class template.
Constraint on the data type.
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DVecAbsExpr.h:277
void smpAddAssign(DenseMatrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:121
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:90
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:251
DifferenceType difference_type
Difference between two iterators.
Definition: DVecAbsExpr.h:168
size_t size() const
Returns the current size/dimension of the vector.
Definition: DVecAbsExpr.h:462
Compile time type selection.The SelectType class template selects one of the two given types T1 and T...
Definition: SelectType.h:59
Header file for the IsTemporary type trait class.
Header file for the dense vector SMP implementation.
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DVecAbsExpr.h:379
IteratorType it_
Iterator to the current vector element.
Definition: DVecAbsExpr.h:386
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2388
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecAbsExpr.h:299
void assign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the assignment of a matrix to a matrix.
Definition: Matrix.h:179
Header file for the DVecAbsExprTrait class template.
SelectType< useAssign, const ResultType, const DVecAbsExpr & >::Type CompositeType
Data type for composite expression templates.
Definition: DVecAbsExpr.h:144
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
Header file for the VecAbsExpr base class.
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type, a compilation error is created.
Definition: Reference.h:78
IntrinsicType load() const
Access to the intrinsic elements of the vector.
Definition: DVecAbsExpr.h:266
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2381
Constraint on the data type.
SelectType< IsExpression< VT >::value, const VT, const VT & >::Type Operand
Composite data type of the dense vector expression.
Definition: DVecAbsExpr.h:147
Base class for all vector absolute value expression templates.The VecAbsExpr class serves as a tag fo...
Definition: VecAbsExpr.h:65
IteratorCategory iterator_category
The iterator category.
Definition: DVecAbsExpr.h:164
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2382
void multAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the multiplication assignment of a matrix to a matrix.
Definition: Matrix.h:269
Header file for the SelectType class template.
Header file for all forward declarations for expression class templates.
Header file for the EnableIf class template.
Operand dv_
Dense vector of the absolute value expression.
Definition: DVecAbsExpr.h:523
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecAbsExpr.h:332
ReferenceType reference
Reference return type.
Definition: DVecAbsExpr.h:167
void smpAssign(DenseMatrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:91
ElementType * PointerType
Pointer return type.
Definition: DVecAbsExpr.h:159
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2383
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:748
IntrinsicTrait< ET >::Type IntrinsicType
Resulting intrinsic element type.
Definition: DVecAbsExpr.h:138
Header file for run time assertion macros.
ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DVecAbsExpr.h:202
ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DVecAbsExpr.h:190
Utility type for generic codes.
DVecAbsExpr< VT, TF > This
Type of this DVecAbsExpr instance.
Definition: DVecAbsExpr.h:134
void addAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the addition assignment of a matrix to a matrix.
Definition: Matrix.h:209
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: DVecAbsExpr.h:516
VT::ElementType ElementType
Resulting element type.
Definition: DVecAbsExpr.h:137
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: DVecAbsExpr.h:496
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecAbsExpr.h:310
ValueType value_type
Type of the underlying elements.
Definition: DVecAbsExpr.h:165
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DVecAbsExpr.h:288
void subAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the subtraction assignment of a matrix to matrix.
Definition: Matrix.h:239
ElementType ValueType
Type of the underlying elements.
Definition: DVecAbsExpr.h:158
ConstIterator & operator++()
Pre-increment operator.
Definition: DVecAbsExpr.h:213
IntrinsicType load(size_t index) const
Access to the intrinsic elements of the vector.
Definition: DVecAbsExpr.h:429
VT::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: DVecAbsExpr.h:136
ConstIterator(IteratorType it)
Constructor for the ConstIterator class.
Definition: DVecAbsExpr.h:179
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DVecAbsExpr.h:255
bool isAligned() const
Returns whether the operands of the expression are properly aligned in memory.
Definition: DVecAbsExpr.h:506
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DVecAbsExpr.h:161
Header file for the IsDenseVector type trait.
Header file for all intrinsic functionality.
#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:79
PointerType pointer
Pointer return type.
Definition: DVecAbsExpr.h:166
Iterator over the elements of the dense vector.
Definition: DVecAbsExpr.h:153
Header file for the IsComputation type trait class.
Operand operand() const
Returns the dense vector operand.
Definition: DVecAbsExpr.h:472
AbsExprTrait< RN >::Type ExprReturnType
Expression return type for the subscript operator.
Definition: DVecAbsExpr.h:110
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:59
Header file for the sparse vector SMP implementation.
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DVecAbsExpr.h:343
const ConstIterator operator++(int)
Post-increment operator.
Definition: DVecAbsExpr.h:224
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:105
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:157
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2379
Header file for basic type definitions.
const SelectType< returnExpr, ExprReturnType, ElementType >::Type ReturnType
Return type for expression template evaluations.
Definition: DVecAbsExpr.h:141
Header file for the SubvectorExprTrait class template.
ElementType & ReferenceType
Reference return type.
Definition: DVecAbsExpr.h:160
ConstIterator & operator--()
Pre-decrement operator.
Definition: DVecAbsExpr.h:234
Header file for the AbsExprTrait class template.
Header file for the IsColumnVector type trait.
Evaluation of the return type of an absolute value expression.Via this type trait it is possible to e...
Definition: AbsExprTrait.h:86
VT::ConstIterator IteratorType
ConstIterator type of the left-hand side dense vector expression.
Definition: DVecAbsExpr.h:171
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecAbsExpr.h:321
VT::ReturnType RN
Return type of the dense vector expression.
Definition: DVecAbsExpr.h:96
#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:238
#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
VT::ElementType ET
Element type of the dense vector expression.
Definition: DVecAbsExpr.h:97
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.