DVecImagExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_DVECIMAGEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DVECIMAGEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <cmath>
44 #include <iterator>
68 #include <blaze/system/Inline.h>
69 #include <blaze/util/Assert.h>
72 #include <blaze/util/EnableIf.h>
73 #include <blaze/util/Exception.h>
74 #include <blaze/util/InvalidType.h>
76 #include <blaze/util/SelectType.h>
77 #include <blaze/util/Types.h>
78 
79 
80 namespace blaze {
81 
82 //=================================================================================================
83 //
84 // CLASS DVECIMAGEXPR
85 //
86 //=================================================================================================
87 
88 //*************************************************************************************************
95 template< typename VT // Type of the dense vector
96  , bool TF > // Transpose flag
97 class DVecImagExpr : public DenseVector< DVecImagExpr<VT,TF>, TF >
98  , private VecImagExpr
99  , private Computation
100 {
101  private:
102  //**Type definitions****************************************************************************
103  typedef typename VT::ResultType RT;
104  typedef typename VT::ReturnType RN;
105  //**********************************************************************************************
106 
107  //**Return type evaluation**********************************************************************
109 
114  enum { returnExpr = !IsTemporary<RN>::value };
115 
118  //**********************************************************************************************
119 
120  //**Serial evaluation strategy******************************************************************
122 
128  enum { useAssign = RequiresEvaluation<VT>::value };
129 
131  template< typename VT2 >
133  struct UseAssign {
134  enum { value = useAssign };
135  };
137  //**********************************************************************************************
138 
139  //**Parallel evaluation strategy****************************************************************
141 
147  template< typename VT2 >
148  struct UseSMPAssign {
149  enum { value = ( !VT2::smpAssignable || !VT::smpAssignable ) && useAssign };
150  };
152  //**********************************************************************************************
153 
154  public:
155  //**Type definitions****************************************************************************
157  typedef typename ImagTrait<RT>::Type ResultType;
160 
163 
166 
168  typedef typename SelectType< IsExpression<VT>::value, const VT, const VT& >::Type Operand;
169  //**********************************************************************************************
170 
171  //**ConstIterator class definition**************************************************************
175  {
176  public:
177  //**Type definitions*************************************************************************
178  typedef std::random_access_iterator_tag IteratorCategory;
179  typedef ElementType ValueType;
180  typedef ElementType* PointerType;
181  typedef ElementType& ReferenceType;
183 
184  // STL iterator requirements
185  typedef IteratorCategory iterator_category;
186  typedef ValueType value_type;
187  typedef PointerType pointer;
188  typedef ReferenceType reference;
189  typedef DifferenceType difference_type;
190 
192  typedef typename VT::ConstIterator IteratorType;
193  //*******************************************************************************************
194 
195  //**Constructor******************************************************************************
200  explicit inline ConstIterator( IteratorType it )
201  : it_( it ) // Iterator to the current vector element
202  {}
203  //*******************************************************************************************
204 
205  //**Addition assignment operator*************************************************************
211  inline ConstIterator& operator+=( size_t inc ) {
212  it_ += inc;
213  return *this;
214  }
215  //*******************************************************************************************
216 
217  //**Subtraction assignment operator**********************************************************
223  inline ConstIterator& operator-=( size_t dec ) {
224  it_ -= dec;
225  return *this;
226  }
227  //*******************************************************************************************
228 
229  //**Prefix increment operator****************************************************************
235  ++it_;
236  return *this;
237  }
238  //*******************************************************************************************
239 
240  //**Postfix increment operator***************************************************************
245  inline const ConstIterator operator++( int ) {
246  return ConstIterator( it_++ );
247  }
248  //*******************************************************************************************
249 
250  //**Prefix decrement operator****************************************************************
256  --it_;
257  return *this;
258  }
259  //*******************************************************************************************
260 
261  //**Postfix decrement operator***************************************************************
266  inline const ConstIterator operator--( int ) {
267  return ConstIterator( it_-- );
268  }
269  //*******************************************************************************************
270 
271  //**Element access operator******************************************************************
276  inline ReturnType operator*() const {
277  return imag( *it_ );
278  }
279  //*******************************************************************************************
280 
281  //**Equality operator************************************************************************
287  inline bool operator==( const ConstIterator& rhs ) const {
288  return it_ == rhs.it_;
289  }
290  //*******************************************************************************************
291 
292  //**Inequality operator**********************************************************************
298  inline bool operator!=( const ConstIterator& rhs ) const {
299  return it_ != rhs.it_;
300  }
301  //*******************************************************************************************
302 
303  //**Less-than operator***********************************************************************
309  inline bool operator<( const ConstIterator& rhs ) const {
310  return it_ < rhs.it_;
311  }
312  //*******************************************************************************************
313 
314  //**Greater-than operator********************************************************************
320  inline bool operator>( const ConstIterator& rhs ) const {
321  return it_ > rhs.it_;
322  }
323  //*******************************************************************************************
324 
325  //**Less-or-equal-than operator**************************************************************
331  inline bool operator<=( const ConstIterator& rhs ) const {
332  return it_ <= rhs.it_;
333  }
334  //*******************************************************************************************
335 
336  //**Greater-or-equal-than operator***********************************************************
342  inline bool operator>=( const ConstIterator& rhs ) const {
343  return it_ >= rhs.it_;
344  }
345  //*******************************************************************************************
346 
347  //**Subtraction operator*********************************************************************
353  inline DifferenceType operator-( const ConstIterator& rhs ) const {
354  return it_ - rhs.it_;
355  }
356  //*******************************************************************************************
357 
358  //**Addition operator************************************************************************
365  friend inline const ConstIterator operator+( const ConstIterator& it, size_t inc ) {
366  return ConstIterator( it.it_ + inc );
367  }
368  //*******************************************************************************************
369 
370  //**Addition operator************************************************************************
377  friend inline const ConstIterator operator+( size_t inc, const ConstIterator& it ) {
378  return ConstIterator( it.it_ + inc );
379  }
380  //*******************************************************************************************
381 
382  //**Subtraction operator*********************************************************************
389  friend inline const ConstIterator operator-( const ConstIterator& it, size_t dec ) {
390  return ConstIterator( it.it_ - dec );
391  }
392  //*******************************************************************************************
393 
394  private:
395  //**Member variables*************************************************************************
396  IteratorType it_;
397  //*******************************************************************************************
398  };
399  //**********************************************************************************************
400 
401  //**Compilation flags***************************************************************************
403  enum { vectorizable = 0 };
404 
406  enum { smpAssignable = VT::smpAssignable };
407  //**********************************************************************************************
408 
409  //**Constructor*********************************************************************************
414  explicit inline DVecImagExpr( const VT& dv )
415  : dv_( dv ) // Dense vector of the imaginary part expression
416  {}
417  //**********************************************************************************************
418 
419  //**Subscript operator**************************************************************************
425  inline ReturnType operator[]( size_t index ) const {
426  BLAZE_INTERNAL_ASSERT( index < dv_.size(), "Invalid vector access index" );
427  return imag( dv_[index] );
428  }
429  //**********************************************************************************************
430 
431  //**At function*********************************************************************************
438  inline ReturnType at( size_t index ) const {
439  if( index >= dv_.size() ) {
440  BLAZE_THROW_OUT_OF_RANGE( "Invalid vector access index" );
441  }
442  return (*this)[index];
443  }
444  //**********************************************************************************************
445 
446  //**Begin function******************************************************************************
451  inline ConstIterator begin() const {
452  return ConstIterator( dv_.begin() );
453  }
454  //**********************************************************************************************
455 
456  //**End function********************************************************************************
461  inline ConstIterator end() const {
462  return ConstIterator( dv_.end() );
463  }
464  //**********************************************************************************************
465 
466  //**Size function*******************************************************************************
471  inline size_t size() const {
472  return dv_.size();
473  }
474  //**********************************************************************************************
475 
476  //**Operand access******************************************************************************
481  inline Operand operand() const {
482  return dv_;
483  }
484  //**********************************************************************************************
485 
486  //**********************************************************************************************
492  template< typename T >
493  inline bool canAlias( const T* alias ) const {
494  return IsComputation<VT>::value && dv_.canAlias( alias );
495  }
496  //**********************************************************************************************
497 
498  //**********************************************************************************************
504  template< typename T >
505  inline bool isAliased( const T* alias ) const {
506  return dv_.isAliased( alias );
507  }
508  //**********************************************************************************************
509 
510  //**********************************************************************************************
515  inline bool isAligned() const {
516  return dv_.isAligned();
517  }
518  //**********************************************************************************************
519 
520  //**********************************************************************************************
525  inline bool canSMPAssign() const {
526  return dv_.canSMPAssign();
527  }
528  //**********************************************************************************************
529 
530  private:
531  //**Member variables****************************************************************************
532  Operand dv_;
533  //**********************************************************************************************
534 
535  //**Assignment to dense vectors*****************************************************************
549  template< typename VT2 > // Type of the target dense vector
550  friend inline typename EnableIf< UseAssign<VT2> >::Type
551  assign( DenseVector<VT2,TF>& lhs, const DVecImagExpr& rhs )
552  {
554 
558 
559  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
560 
561  const RT tmp( serial( rhs.dv_ ) );
562  assign( ~lhs, imag( tmp ) );
563  }
565  //**********************************************************************************************
566 
567  //**Assignment to sparse vectors****************************************************************
581  template< typename VT2 > // Type of the target sparse vector
582  friend inline typename EnableIf< UseAssign<VT2> >::Type
583  assign( SparseVector<VT2,TF>& lhs, const DVecImagExpr& rhs )
584  {
586 
590 
591  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
592 
593  const RT tmp( serial( rhs.dv_ ) );
594  assign( ~lhs, imag( tmp ) );
595  }
597  //**********************************************************************************************
598 
599  //**Addition assignment to dense vectors********************************************************
613  template< typename VT2 > // Type of the target dense vector
614  friend inline typename EnableIf< UseAssign<VT2> >::Type
615  addAssign( DenseVector<VT2,TF>& lhs, const DVecImagExpr& rhs )
616  {
618 
622 
623  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
624 
625  const RT tmp( serial( rhs.dv_ ) );
626  addAssign( ~lhs, imag( tmp ) );
627  }
629  //**********************************************************************************************
630 
631  //**Addition assignment to sparse vectors*******************************************************
632  // No special implementation for the addition assignment to sparse vectors.
633  //**********************************************************************************************
634 
635  //**Subtraction assignment to dense vectors*****************************************************
649  template< typename VT2 > // Type of the target dense vector
650  friend inline typename EnableIf< UseAssign<VT2> >::Type
651  subAssign( DenseVector<VT2,TF>& lhs, const DVecImagExpr& rhs )
652  {
654 
658 
659  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
660 
661  const RT tmp( serial( rhs.dv_ ) );
662  subAssign( ~lhs, imag( tmp ) );
663  }
665  //**********************************************************************************************
666 
667  //**Subtraction assignment to sparse vectors****************************************************
668  // No special implementation for the subtraction assignment to sparse vectors.
669  //**********************************************************************************************
670 
671  //**Multiplication assignment to dense vectors**************************************************
685  template< typename VT2 > // Type of the target dense vector
686  friend inline typename EnableIf< UseAssign<VT2> >::Type
687  multAssign( DenseVector<VT2,TF>& lhs, const DVecImagExpr& rhs )
688  {
690 
694 
695  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
696 
697  const RT tmp( serial( rhs.dv_ ) );
698  multAssign( ~lhs, imag( tmp ) );
699  }
701  //**********************************************************************************************
702 
703  //**Multiplication assignment to sparse vectors*************************************************
704  // No special implementation for the multiplication assignment to sparse vectors.
705  //**********************************************************************************************
706 
707  //**SMP assignment to dense vectors*************************************************************
722  template< typename VT2 > // Type of the target dense vector
723  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
724  smpAssign( DenseVector<VT2,TF>& lhs, const DVecImagExpr& rhs )
725  {
727 
731 
732  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
733 
734  const RT tmp( rhs.dv_ );
735  smpAssign( ~lhs, imag( tmp ) );
736  }
738  //**********************************************************************************************
739 
740  //**SMP assignment to sparse vectors************************************************************
754  template< typename VT2 > // Type of the target sparse vector
755  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
756  smpAssign( SparseVector<VT2,TF>& lhs, const DVecImagExpr& rhs )
757  {
759 
763 
764  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
765 
766  const RT tmp( rhs.dv_ );
767  smpAssign( ~lhs, imag( tmp ) );
768  }
770  //**********************************************************************************************
771 
772  //**SMP addition assignment to dense vectors****************************************************
786  template< typename VT2 > // Type of the target dense vector
787  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
788  smpAddAssign( DenseVector<VT2,TF>& lhs, const DVecImagExpr& rhs )
789  {
791 
795 
796  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
797 
798  const RT tmp( rhs.dv_ );
799  smpAddAssign( ~lhs, imag( tmp ) );
800  }
802  //**********************************************************************************************
803 
804  //**SMP addition assignment to sparse vectors***************************************************
805  // No special implementation for the SMP addition assignment to sparse vectors.
806  //**********************************************************************************************
807 
808  //**SMP subtraction assignment to dense vectors*************************************************
822  template< typename VT2 > // Type of the target dense vector
823  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
824  smpSubAssign( DenseVector<VT2,TF>& lhs, const DVecImagExpr& rhs )
825  {
827 
831 
832  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
833 
834  const RT tmp( rhs.dv_ );
835  smpSubAssign( ~lhs, imag( tmp ) );
836  }
838  //**********************************************************************************************
839 
840  //**SMP subtraction assignment to sparse vectors************************************************
841  // No special implementation for the SMP subtraction assignment to sparse vectors.
842  //**********************************************************************************************
843 
844  //**SMP multiplication assignment to dense vectors**********************************************
858  template< typename VT2 > // Type of the target dense vector
859  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
860  smpMultAssign( DenseVector<VT2,TF>& lhs, const DVecImagExpr& rhs )
861  {
863 
867 
868  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
869 
870  const RT tmp( rhs.dv_ );
871  smpMultAssign( ~lhs, imag( tmp ) );
872  }
874  //**********************************************************************************************
875 
876  //**SMP multiplication assignment to sparse vectors*********************************************
877  // No special implementation for the SMP multiplication assignment to sparse vectors.
878  //**********************************************************************************************
879 
880  //**Compile time checks*************************************************************************
884  BLAZE_CONSTRAINT_MUST_NOT_BE_BUILTIN_TYPE( typename UnderlyingNumeric<VT>::Type );
886  //**********************************************************************************************
887 };
888 //*************************************************************************************************
889 
890 
891 
892 
893 //=================================================================================================
894 //
895 // GLOBAL FUNCTIONS
896 //
897 //=================================================================================================
898 
899 //*************************************************************************************************
916 template< typename VT // Type of the dense vector
917  , bool TF > // Transpose flag
918 inline const typename ImagExprTrait<VT>::Type imag( const DenseVector<VT,TF>& dv )
919 {
921 
922  return typename ImagExprTrait<VT>::Type( ~dv );
923 }
924 //*************************************************************************************************
925 
926 
927 
928 
929 //=================================================================================================
930 //
931 // GLOBAL RESTRUCTURING FUNCTIONS
932 //
933 //=================================================================================================
934 
935 //*************************************************************************************************
946 template< typename VT // Type of the dense vector
947  , bool TF > // Transpose flag
948 inline const DVecImagExpr<VT,TF>& imag( const DVecImagExpr<VT,TF>& dv )
949 {
951 
952  return dv;
953 }
955 //*************************************************************************************************
956 
957 
958 
959 
960 //=================================================================================================
961 //
962 // SIZE SPECIALIZATIONS
963 //
964 //=================================================================================================
965 
966 //*************************************************************************************************
968 template< typename VT, bool TF >
969 struct Size< DVecImagExpr<VT,TF> > : public Size<VT>
970 {};
972 //*************************************************************************************************
973 
974 
975 
976 
977 //=================================================================================================
978 //
979 // ISALIGNED SPECIALIZATIONS
980 //
981 //=================================================================================================
982 
983 //*************************************************************************************************
985 template< typename VT, bool TF >
986 struct IsAligned< DVecImagExpr<VT,TF> > : public IsTrue< IsAligned<VT>::value >
987 {};
989 //*************************************************************************************************
990 
991 
992 
993 
994 //=================================================================================================
995 //
996 // EXPRESSION TRAIT SPECIALIZATIONS
997 //
998 //=================================================================================================
999 
1000 //*************************************************************************************************
1002 template< typename VT >
1003 struct DVecImagExprTrait< DVecImagExpr<VT,false> >
1004 {
1005  public:
1006  //**********************************************************************************************
1007  typedef typename SelectType< IsDenseVector<VT>::value && IsColumnVector<VT>::value
1008  , DVecImagExpr<VT,false>
1009  , INVALID_TYPE >::Type Type;
1010  //**********************************************************************************************
1011 };
1013 //*************************************************************************************************
1014 
1015 
1016 //*************************************************************************************************
1018 template< typename VT >
1019 struct TDVecImagExprTrait< DVecImagExpr<VT,true> >
1020 {
1021  public:
1022  //**********************************************************************************************
1023  typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value
1024  , DVecImagExpr<VT,true>
1025  , INVALID_TYPE >::Type Type;
1026  //**********************************************************************************************
1027 };
1029 //*************************************************************************************************
1030 
1031 
1032 //*************************************************************************************************
1034 template< typename VT, bool TF, bool AF >
1035 struct SubvectorExprTrait< DVecImagExpr<VT,TF>, AF >
1036 {
1037  public:
1038  //**********************************************************************************************
1039  typedef typename ImagExprTrait< typename SubvectorExprTrait<const VT,AF>::Type >::Type Type;
1040  //**********************************************************************************************
1041 };
1043 //*************************************************************************************************
1044 
1045 } // namespace blaze
1046 
1047 #endif
Header file for the UnderlyingNumeric type trait.
Header file for the DVecImagExprTrait class template.
Header file for the ImagExprTrait class template.
Pointer difference type of the Blaze library.
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecImagExpr.h:320
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:89
const ConstIterator operator++(int)
Post-increment operator.
Definition: DVecImagExpr.h:245
size_t size() const
Returns the current size/dimension of the vector.
Definition: DVecImagExpr.h:471
Compile time check whether the given type is a temporary vector or matrix type.This type trait class ...
Definition: IsTemporary.h:87
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: DVecImagExpr.h:525
Header file for basic type definitions.
ConstIterator end() const
Returns an iterator just past the last non-zero element of the dense vector.
Definition: DVecImagExpr.h:461
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DVecImagExpr.h:182
Header file for the imaginary shim.
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:207
Evaluation of the return type of a imaginary part expression.Via this type trait it is possible to ev...
Definition: ImagExprTrait.h:88
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecImagExpr.h:331
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2588
Header file for the IsRowVector type trait.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:259
IteratorCategory iterator_category
The iterator category.
Definition: DVecImagExpr.h:185
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: DVecImagExpr.h:493
Header file for the DenseVector base class.
VT::ResultType RT
Result type of the dense vector expression.
Definition: DVecImagExpr.h:103
Base template for the ImagTrait class.The ImagTrait class template offers the possibility to select t...
Definition: ImagTrait.h:78
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:721
Header file for the Computation base class.
Header file for the RequiresEvaluation type trait.
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: DVecImagExpr.h:505
SelectType< useAssign, const ResultType, const DVecImagExpr & >::Type CompositeType
Data type for composite expression templates.
Definition: DVecImagExpr.h:165
ConstIterator & operator--()
Pre-decrement operator.
Definition: DVecImagExpr.h:255
DifferenceType difference_type
Difference between two iterators.
Definition: DVecImagExpr.h:189
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DVecImagExpr.h:353
const ImagExprTrait< MT >::Type imag(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the imaginary part of each single element of dm.
Definition: DMatImagExpr.h:920
Constraint on the data type.
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DVecImagExpr.h:365
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:90
ImagTrait< RT >::Type ResultType
Result type for expression template evaluations.
Definition: DVecImagExpr.h:157
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DVecImagExpr.h:389
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.
ValueType value_type
Type of the underlying elements.
Definition: DVecImagExpr.h:186
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: DVecImagExpr.h:425
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2592
ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DVecImagExpr.h:211
Operand operand() const
Returns the dense vector operand.
Definition: DVecImagExpr.h:481
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exceptionThis macro encapsulates the default way of Bla...
Definition: Exception.h:331
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
DVecImagExpr(const VT &dv)
Constructor for the DVecImagExpr class.
Definition: DVecImagExpr.h:414
Header file for the IsAligned type trait.
ElementType & ReferenceType
Reference return type.
Definition: DVecImagExpr.h:181
Constraint on the data type.
Iterator over the elements of the dense vector.
Definition: DVecImagExpr.h:174
#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
VT::ReturnType RN
Return type of the dense vector expression.
Definition: DVecImagExpr.h:104
Header file for the VecImagExpr base class.
Constraint on the data type.
Base class for all vector imaginary part expression templates.The VecImagExpr class serves as a tag f...
Definition: VecImagExpr.h:65
Header file for the SelectType class template.
Header file for all forward declarations for expression class templates.
Header file for the EnableIf class template.
Header file for the serial shim.
const ConstIterator operator--(int)
Post-decrement operator.
Definition: DVecImagExpr.h:266
ConstIterator begin() const
Returns an iterator to the first non-zero element of the dense vector.
Definition: DVecImagExpr.h:451
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecImagExpr.h:342
EnableIf< IsDenseMatrix< MT1 > >::Type smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:160
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2587
ElementType * PointerType
Pointer return type.
Definition: DVecImagExpr.h:180
Header file for run time assertion macros.
EnableIf< IsDenseMatrix< MT1 > >::Type smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:98
Utility type for generic codes.
Expression object for the dense vector imag() function.The DVecImagExpr class represents the compile ...
Definition: DVecImagExpr.h:97
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
bool isAligned() const
Returns whether the operands of the expression are properly aligned in memory.
Definition: DVecImagExpr.h:515
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecImagExpr.h:309
#define BLAZE_CONSTRAINT_MUST_NOT_BE_BUILTIN_TYPE(T)
Constraint on the data type.In case the given data type T is a built-in data type, a compilation error is created.
Definition: Builtin.h:116
Header file for the imaginary trait.
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: DVecImagExpr.h:438
ElementType ValueType
Type of the underlying elements.
Definition: DVecImagExpr.h:179
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DVecImagExpr.h:178
PointerType pointer
Pointer return type.
Definition: DVecImagExpr.h:187
Operand dv_
Dense vector of the imaginary part expression.
Definition: DVecImagExpr.h:532
Header file for the IsDenseVector type trait.
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DVecImagExpr.h:276
Header file for the TDVecImagExprTrait class template.
ResultType::ElementType ElementType
Resulting element type.
Definition: DVecImagExpr.h:159
#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
DVecImagExpr< VT, TF > This
Type of this DVecImagExpr instance.
Definition: DVecImagExpr.h:156
ImagExprTrait< RN >::Type ExprReturnType
Expression return type for the subscript operator.
Definition: DVecImagExpr.h:117
Header file for the IsComputation type trait class.
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:59
ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DVecImagExpr.h:223
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: DVecImagExpr.h:158
EnableIf< IsDenseMatrix< MT1 > >::Type smpAddAssign(Matrix< 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:129
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:118
#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
ConstIterator & operator++()
Pre-increment operator.
Definition: DVecImagExpr.h:234
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2583
SelectType< IsExpression< VT >::value, const VT, const VT & >::Type Operand
Composite data type of the dense vector expression.
Definition: DVecImagExpr.h:168
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DVecImagExpr.h:287
IteratorType it_
Iterator to the current vector element.
Definition: DVecImagExpr.h:396
Header file for the SubvectorExprTrait class template.
Header file for exception macros.
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DVecImagExpr.h:377
ReferenceType reference
Reference return type.
Definition: DVecImagExpr.h:188
Header file for the IsColumnVector type trait.
VT::ConstIterator IteratorType
ConstIterator type of the left-hand side dense vector expression.
Definition: DVecImagExpr.h:192
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DVecImagExpr.h:298
System settings for the inline keywords.
EnableIf< IsDenseVector< VT1 > >::Type smpMultAssign(Vector< 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:189
const SelectType< returnExpr, ExprReturnType, ElementType >::Type ReturnType
Return type for expression template evaluations.
Definition: DVecImagExpr.h:162
Header file for the Size type trait.
#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: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
Constraint on the data type.
ConstIterator(IteratorType it)
Constructor for the ConstIterator class.
Definition: DVecImagExpr.h:200
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.