DVecConjExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_DVECCONJEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DVECCONJEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <iterator>
50 #include <blaze/math/Intrinsics.h>
68 #include <blaze/system/Inline.h>
69 #include <blaze/util/Assert.h>
71 #include <blaze/util/EnableIf.h>
72 #include <blaze/util/Exception.h>
73 #include <blaze/util/InvalidType.h>
75 #include <blaze/util/SelectType.h>
76 #include <blaze/util/Types.h>
78 
79 
80 namespace blaze {
81 
82 //=================================================================================================
83 //
84 // CLASS DVECCONJEXPR
85 //
86 //=================================================================================================
87 
88 //*************************************************************************************************
95 template< typename VT // Type of the dense vector
96  , bool TF > // Transpose flag
97 class DVecConjExpr : public DenseVector< DVecConjExpr<VT,TF>, TF >
98  , private VecConjExpr
99  , private Computation
100 {
101  private:
102  //**Type definitions****************************************************************************
103  typedef typename VT::ReturnType RN;
104  typedef typename VT::ElementType ET;
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 VT::ResultType ResultType;
158  typedef typename VT::TransposeType TransposeType;
159  typedef typename VT::ElementType ElementType;
161 
164 
167 
169  typedef typename SelectType< IsExpression<VT>::value, const VT, const VT& >::Type Operand;
170  //**********************************************************************************************
171 
172  //**ConstIterator class definition**************************************************************
176  {
177  public:
178  //**Type definitions*************************************************************************
179  typedef std::random_access_iterator_tag IteratorCategory;
180  typedef ElementType ValueType;
181  typedef ElementType* PointerType;
182  typedef ElementType& ReferenceType;
184 
185  // STL iterator requirements
186  typedef IteratorCategory iterator_category;
187  typedef ValueType value_type;
188  typedef PointerType pointer;
189  typedef ReferenceType reference;
190  typedef DifferenceType difference_type;
191 
193  typedef typename VT::ConstIterator IteratorType;
194  //*******************************************************************************************
195 
196  //**Constructor******************************************************************************
201  explicit inline ConstIterator( IteratorType it )
202  : it_( it ) // Iterator to the current vector element
203  {}
204  //*******************************************************************************************
205 
206  //**Addition assignment operator*************************************************************
212  inline ConstIterator& operator+=( size_t inc ) {
213  it_ += inc;
214  return *this;
215  }
216  //*******************************************************************************************
217 
218  //**Subtraction assignment operator**********************************************************
224  inline ConstIterator& operator-=( size_t dec ) {
225  it_ -= dec;
226  return *this;
227  }
228  //*******************************************************************************************
229 
230  //**Prefix increment operator****************************************************************
236  ++it_;
237  return *this;
238  }
239  //*******************************************************************************************
240 
241  //**Postfix increment operator***************************************************************
246  inline const ConstIterator operator++( int ) {
247  return ConstIterator( it_++ );
248  }
249  //*******************************************************************************************
250 
251  //**Prefix decrement operator****************************************************************
257  --it_;
258  return *this;
259  }
260  //*******************************************************************************************
261 
262  //**Postfix decrement operator***************************************************************
267  inline const ConstIterator operator--( int ) {
268  return ConstIterator( it_-- );
269  }
270  //*******************************************************************************************
271 
272  //**Element access operator******************************************************************
277  inline ReturnType operator*() const {
278  return conj( *it_ );
279  }
280  //*******************************************************************************************
281 
282  //**Load function****************************************************************************
287  inline IntrinsicType load() const {
288  return conj( it_.load() );
289  }
290  //*******************************************************************************************
291 
292  //**Equality operator************************************************************************
298  inline bool operator==( const ConstIterator& rhs ) const {
299  return it_ == rhs.it_;
300  }
301  //*******************************************************************************************
302 
303  //**Inequality operator**********************************************************************
309  inline bool operator!=( const ConstIterator& rhs ) const {
310  return it_ != rhs.it_;
311  }
312  //*******************************************************************************************
313 
314  //**Less-than operator***********************************************************************
320  inline bool operator<( const ConstIterator& rhs ) const {
321  return it_ < rhs.it_;
322  }
323  //*******************************************************************************************
324 
325  //**Greater-than operator********************************************************************
331  inline bool operator>( const ConstIterator& rhs ) const {
332  return it_ > rhs.it_;
333  }
334  //*******************************************************************************************
335 
336  //**Less-or-equal-than operator**************************************************************
342  inline bool operator<=( const ConstIterator& rhs ) const {
343  return it_ <= rhs.it_;
344  }
345  //*******************************************************************************************
346 
347  //**Greater-or-equal-than operator***********************************************************
353  inline bool operator>=( const ConstIterator& rhs ) const {
354  return it_ >= rhs.it_;
355  }
356  //*******************************************************************************************
357 
358  //**Subtraction operator*********************************************************************
364  inline DifferenceType operator-( const ConstIterator& rhs ) const {
365  return it_ - rhs.it_;
366  }
367  //*******************************************************************************************
368 
369  //**Addition operator************************************************************************
376  friend inline const ConstIterator operator+( const ConstIterator& it, size_t inc ) {
377  return ConstIterator( it.it_ + inc );
378  }
379  //*******************************************************************************************
380 
381  //**Addition operator************************************************************************
388  friend inline const ConstIterator operator+( size_t inc, const ConstIterator& it ) {
389  return ConstIterator( it.it_ + inc );
390  }
391  //*******************************************************************************************
392 
393  //**Subtraction operator*********************************************************************
400  friend inline const ConstIterator operator-( const ConstIterator& it, size_t dec ) {
401  return ConstIterator( it.it_ - dec );
402  }
403  //*******************************************************************************************
404 
405  private:
406  //**Member variables*************************************************************************
407  IteratorType it_;
408  //*******************************************************************************************
409  };
410  //**********************************************************************************************
411 
412  //**Compilation flags***************************************************************************
414  enum { vectorizable = VT::vectorizable &&
416 
418  enum { smpAssignable = VT::smpAssignable };
419  //**********************************************************************************************
420 
421  //**Constructor*********************************************************************************
426  explicit inline DVecConjExpr( const VT& dv )
427  : dv_( dv ) // Dense vector of the complex conjugate expression
428  {}
429  //**********************************************************************************************
430 
431  //**Subscript operator**************************************************************************
437  inline ReturnType operator[]( size_t index ) const {
438  BLAZE_INTERNAL_ASSERT( index < dv_.size(), "Invalid vector access index" );
439  return conj( dv_[index] );
440  }
441  //**********************************************************************************************
442 
443  //**At function*********************************************************************************
450  inline ReturnType at( size_t index ) const {
451  if( index >= dv_.size() ) {
452  BLAZE_THROW_OUT_OF_RANGE( "Invalid vector access index" );
453  }
454  return (*this)[index];
455  }
456  //**********************************************************************************************
457 
458  //**Load function*******************************************************************************
464  BLAZE_ALWAYS_INLINE IntrinsicType load( size_t index ) const {
465  typedef IntrinsicTrait<ElementType> IT;
466  BLAZE_INTERNAL_ASSERT( index < dv_.size() , "Invalid vector access index" );
467  BLAZE_INTERNAL_ASSERT( index % IT::size == 0UL, "Invalid vector access index" );
468  return conj( dv_.load( index ) );
469  }
470  //**********************************************************************************************
471 
472  //**Begin function******************************************************************************
477  inline ConstIterator begin() const {
478  return ConstIterator( dv_.begin() );
479  }
480  //**********************************************************************************************
481 
482  //**End function********************************************************************************
487  inline ConstIterator end() const {
488  return ConstIterator( dv_.end() );
489  }
490  //**********************************************************************************************
491 
492  //**Size function*******************************************************************************
497  inline size_t size() const {
498  return dv_.size();
499  }
500  //**********************************************************************************************
501 
502  //**Operand access******************************************************************************
507  inline Operand operand() const {
508  return dv_;
509  }
510  //**********************************************************************************************
511 
512  //**********************************************************************************************
518  template< typename T >
519  inline bool canAlias( const T* alias ) const {
520  return IsComputation<VT>::value && dv_.canAlias( alias );
521  }
522  //**********************************************************************************************
523 
524  //**********************************************************************************************
530  template< typename T >
531  inline bool isAliased( const T* alias ) const {
532  return dv_.isAliased( alias );
533  }
534  //**********************************************************************************************
535 
536  //**********************************************************************************************
541  inline bool isAligned() const {
542  return dv_.isAligned();
543  }
544  //**********************************************************************************************
545 
546  //**********************************************************************************************
551  inline bool canSMPAssign() const {
552  return dv_.canSMPAssign();
553  }
554  //**********************************************************************************************
555 
556  private:
557  //**Member variables****************************************************************************
558  Operand dv_;
559  //**********************************************************************************************
560 
561  //**Assignment to dense vectors*****************************************************************
575  template< typename VT2 > // Type of the target dense vector
576  friend inline typename EnableIf< UseAssign<VT2> >::Type
577  assign( DenseVector<VT2,TF>& lhs, const DVecConjExpr& rhs )
578  {
580 
581  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
582 
583  assign( ~lhs, rhs.dv_ );
584  assign( ~lhs, conj( ~lhs ) );
585  }
587  //**********************************************************************************************
588 
589  //**Assignment to sparse vectors****************************************************************
603  template< typename VT2 > // Type of the target sparse vector
604  friend inline typename EnableIf< UseAssign<VT2> >::Type
605  assign( SparseVector<VT2,TF>& lhs, const DVecConjExpr& rhs )
606  {
608 
612 
613  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
614 
615  const ResultType tmp( serial( rhs ) );
616  assign( ~lhs, tmp );
617  }
619  //**********************************************************************************************
620 
621  //**Addition assignment to dense vectors********************************************************
635  template< typename VT2 > // Type of the target dense vector
636  friend inline typename EnableIf< UseAssign<VT2> >::Type
637  addAssign( DenseVector<VT2,TF>& lhs, const DVecConjExpr& rhs )
638  {
640 
644 
645  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
646 
647  const ResultType tmp( serial( rhs ) );
648  addAssign( ~lhs, tmp );
649  }
651  //**********************************************************************************************
652 
653  //**Addition assignment to sparse vectors*******************************************************
654  // No special implementation for the addition assignment to sparse vectors.
655  //**********************************************************************************************
656 
657  //**Subtraction assignment to dense vectors*****************************************************
671  template< typename VT2 > // Type of the target dense vector
672  friend inline typename EnableIf< UseAssign<VT2> >::Type
673  subAssign( DenseVector<VT2,TF>& lhs, const DVecConjExpr& rhs )
674  {
676 
680 
681  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
682 
683  const ResultType tmp( serial( rhs ) );
684  subAssign( ~lhs, tmp );
685  }
687  //**********************************************************************************************
688 
689  //**Subtraction assignment to sparse vectors****************************************************
690  // No special implementation for the subtraction assignment to sparse vectors.
691  //**********************************************************************************************
692 
693  //**Multiplication assignment to dense vectors**************************************************
707  template< typename VT2 > // Type of the target dense vector
708  friend inline typename EnableIf< UseAssign<VT2> >::Type
709  multAssign( DenseVector<VT2,TF>& lhs, const DVecConjExpr& rhs )
710  {
712 
716 
717  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
718 
719  const ResultType tmp( serial( rhs ) );
720  multAssign( ~lhs, tmp );
721  }
723  //**********************************************************************************************
724 
725  //**Multiplication assignment to sparse vectors*************************************************
726  // No special implementation for the multiplication assignment to sparse vectors.
727  //**********************************************************************************************
728 
729  //**SMP assignment to dense vectors*************************************************************
743  template< typename VT2 > // Type of the target dense vector
744  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
745  smpAssign( DenseVector<VT2,TF>& lhs, const DVecConjExpr& rhs )
746  {
748 
749  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
750 
751  smpAssign( ~lhs, rhs.dv_ );
752  smpAssign( ~lhs, conj( ~lhs ) );
753  }
755  //**********************************************************************************************
756 
757  //**SMP assignment to sparse vectors************************************************************
771  template< typename VT2 > // Type of the target sparse vector
772  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
773  smpAssign( SparseVector<VT2,TF>& lhs, const DVecConjExpr& rhs )
774  {
776 
780 
781  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
782 
783  const ResultType tmp( rhs );
784  smpAssign( ~lhs, tmp );
785  }
787  //**********************************************************************************************
788 
789  //**SMP addition assignment to dense vectors****************************************************
803  template< typename VT2 > // Type of the target dense vector
804  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
805  smpAddAssign( DenseVector<VT2,TF>& lhs, const DVecConjExpr& rhs )
806  {
808 
812 
813  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
814 
815  const ResultType tmp( rhs );
816  smpAddAssign( ~lhs, tmp );
817  }
819  //**********************************************************************************************
820 
821  //**SMP addition assignment to sparse vectors***************************************************
822  // No special implementation for the SMP addition assignment to sparse vectors.
823  //**********************************************************************************************
824 
825  //**SMP subtraction assignment to dense vectors*************************************************
839  template< typename VT2 > // Type of the target dense vector
840  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
841  smpSubAssign( DenseVector<VT2,TF>& lhs, const DVecConjExpr& rhs )
842  {
844 
848 
849  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
850 
851  const ResultType tmp( rhs );
852  smpSubAssign( ~lhs, tmp );
853  }
855  //**********************************************************************************************
856 
857  //**SMP subtraction assignment to sparse vectors************************************************
858  // No special implementation for the SMP subtraction assignment to sparse vectors.
859  //**********************************************************************************************
860 
861  //**SMP multiplication assignment to dense vectors**********************************************
875  template< typename VT2 > // Type of the target dense vector
876  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
877  smpMultAssign( DenseVector<VT2,TF>& lhs, const DVecConjExpr& rhs )
878  {
880 
884 
885  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
886 
887  const ResultType tmp( rhs );
888  smpMultAssign( ~lhs, tmp );
889  }
891  //**********************************************************************************************
892 
893  //**SMP multiplication assignment to sparse vectors*********************************************
894  // No special implementation for the SMP multiplication assignment to sparse vectors.
895  //**********************************************************************************************
896 
897  //**Compile time checks*************************************************************************
902  //**********************************************************************************************
903 };
904 //*************************************************************************************************
905 
906 
907 
908 
909 //=================================================================================================
910 //
911 // GLOBAL FUNCTIONS
912 //
913 //=================================================================================================
914 
915 //*************************************************************************************************
932 template< typename VT // Type of the dense vector
933  , bool TF > // Transpose flag
934 inline const DVecConjExpr<VT,TF> conj( const DenseVector<VT,TF>& dv )
935 {
937 
938  return DVecConjExpr<VT,TF>( ~dv );
939 }
940 //*************************************************************************************************
941 
942 
943 //*************************************************************************************************
969 template< typename VT // Type of the dense vector
970  , bool TF > // Transpose flag
971 inline const typename CTransExprTrait<VT>::Type ctrans( const DenseVector<VT,TF>& dv )
972 {
974 
975  return trans( conj( ~dv ) );
976 }
977 //*************************************************************************************************
978 
979 
980 
981 
982 //=================================================================================================
983 //
984 // GLOBAL RESTRUCTURING FUNCTIONS
985 //
986 //=================================================================================================
987 
988 //*************************************************************************************************
1006 template< typename VT // Type of the dense vector
1007  , bool TF > // Transpose flag
1008 inline typename DVecConjExpr<VT,TF>::Operand conj( const DVecConjExpr<VT,TF>& dv )
1009 {
1011 
1012  return dv.operand();
1013 }
1015 //*************************************************************************************************
1016 
1017 
1018 //*************************************************************************************************
1036 template< typename VT // Type of the dense vector
1037  , bool TF > // Transpose flag
1038 inline const DVecTransExpr<VT,!TF> conj( const DVecTransExpr<DVecConjExpr<VT,TF>,!TF>& dv )
1039 {
1041 
1042  return DVecTransExpr<VT,!TF>( dv.operand().operand() );
1043 }
1045 //*************************************************************************************************
1046 
1047 
1048 
1049 
1050 //=================================================================================================
1051 //
1052 // SIZE SPECIALIZATIONS
1053 //
1054 //=================================================================================================
1055 
1056 //*************************************************************************************************
1058 template< typename VT, bool TF >
1059 struct Size< DVecConjExpr<VT,TF> > : public Size<VT>
1060 {};
1062 //*************************************************************************************************
1063 
1064 
1065 
1066 
1067 //=================================================================================================
1068 //
1069 // ISALIGNED SPECIALIZATIONS
1070 //
1071 //=================================================================================================
1072 
1073 //*************************************************************************************************
1075 template< typename VT, bool TF >
1076 struct IsAligned< DVecConjExpr<VT,TF> > : public IsTrue< IsAligned<VT>::value >
1077 {};
1079 //*************************************************************************************************
1080 
1081 
1082 
1083 
1084 //=================================================================================================
1085 //
1086 // ISPADDED SPECIALIZATIONS
1087 //
1088 //=================================================================================================
1089 
1090 //*************************************************************************************************
1092 template< typename VT, bool TF >
1093 struct IsPadded< DVecConjExpr<VT,TF> > : public IsTrue< IsPadded<VT>::value >
1094 {};
1096 //*************************************************************************************************
1097 
1098 
1099 
1100 
1101 //=================================================================================================
1102 //
1103 // EXPRESSION TRAIT SPECIALIZATIONS
1104 //
1105 //=================================================================================================
1106 
1107 //*************************************************************************************************
1109 template< typename VT >
1110 struct DVecConjExprTrait< DVecConjExpr<VT,false> >
1111 {
1112  public:
1113  //**********************************************************************************************
1114  typedef typename SelectType< IsDenseVector<VT>::value && IsColumnVector<VT>::value
1115  , typename DVecConjExpr<VT,false>::Operand
1116  , INVALID_TYPE >::Type Type;
1117  //**********************************************************************************************
1118 };
1120 //*************************************************************************************************
1121 
1122 
1123 //*************************************************************************************************
1125 template< typename VT >
1126 struct TDVecConjExprTrait< DVecConjExpr<VT,true> >
1127 {
1128  public:
1129  //**********************************************************************************************
1130  typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value
1131  , typename DVecConjExpr<VT,true>::Operand
1132  , INVALID_TYPE >::Type Type;
1133  //**********************************************************************************************
1134 };
1136 //*************************************************************************************************
1137 
1138 
1139 //*************************************************************************************************
1141 template< typename VT >
1142 struct DVecConjExprTrait< DVecTransExpr< DVecConjExpr<VT,true>, false > >
1143 {
1144  public:
1145  //**********************************************************************************************
1146  typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value
1147  , DVecTransExpr<VT,false>
1148  , INVALID_TYPE >::Type Type;
1149  //**********************************************************************************************
1150 };
1152 //*************************************************************************************************
1153 
1154 
1155 //*************************************************************************************************
1157 template< typename VT >
1158 struct TDVecConjExprTrait< DVecTransExpr< DVecConjExpr<VT,false>, true > >
1159 {
1160  public:
1161  //**********************************************************************************************
1162  typedef typename SelectType< IsDenseVector<VT>::value && IsColumnVector<VT>::value
1163  , DVecTransExpr<VT,true>
1164  , INVALID_TYPE >::Type Type;
1165  //**********************************************************************************************
1166 };
1168 //*************************************************************************************************
1169 
1170 
1171 //*************************************************************************************************
1173 template< typename VT, bool TF, bool AF >
1174 struct SubvectorExprTrait< DVecConjExpr<VT,TF>, AF >
1175 {
1176  public:
1177  //**********************************************************************************************
1178  typedef typename ConjExprTrait< typename SubvectorExprTrait<const VT,AF>::Type >::Type Type;
1179  //**********************************************************************************************
1180 };
1182 //*************************************************************************************************
1183 
1184 } // namespace blaze
1185 
1186 #endif
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DVecConjExpr.h:376
ConstIterator & operator--()
Pre-decrement operator.
Definition: DVecConjExpr.h:256
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DVecConjExpr.h:183
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
VT::ElementType ElementType
Resulting element type.
Definition: DVecConjExpr.h:159
IntrinsicType load() const
Access to the intrinsic elements of the vector.
Definition: DVecConjExpr.h:287
DVecConjExpr< VT, TF > This
Type of this DVecConjExpr instance.
Definition: DVecConjExpr.h:156
Compile time check whether the given type is a temporary vector or matrix type.This type trait class ...
Definition: IsTemporary.h:87
Header file for basic type definitions.
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:252
SelectType< IsExpression< VT >::value, const VT, const VT & >::Type Operand
Composite data type of the dense vector expression.
Definition: DVecConjExpr.h:169
ConstIterator end() const
Returns an iterator just past the last non-zero element of the dense vector.
Definition: DVecConjExpr.h:487
ConstIterator begin() const
Returns an iterator to the first non-zero element of the dense vector.
Definition: DVecConjExpr.h:477
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:207
Header file for the TDVecConjExprTrait class template.
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: DVecConjExpr.h:450
const ConstIterator operator++(int)
Post-increment operator.
Definition: DVecConjExpr.h:246
Header file for the DVecConjExprTrait class template.
Iterator over the elements of the dense vector.
Definition: DVecConjExpr.h:175
size_t size() const
Returns the current size/dimension of the vector.
Definition: DVecConjExpr.h:497
Expression object for the dense vector conj() function.The DVecConjExpr class represents the compile ...
Definition: DVecConjExpr.h:97
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecConjExpr.h:331
IntrinsicTrait< ET >::Type IntrinsicType
Resulting intrinsic element type.
Definition: DVecConjExpr.h:160
Header file for the IsRowVector type trait.
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DVecConjExpr.h:179
Header file for the DenseVector base class.
Header file for the VecConjExpr base class.
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.
IteratorCategory iterator_category
The iterator category.
Definition: DVecConjExpr.h:186
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecConjExpr.h:353
Constraint on the data type.
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecConjExpr.h:342
ConjExprTrait< typename DiagonalProxy< MT >::RepresentedType >::Type conj(const DiagonalProxy< MT > &proxy)
Computing the complex conjugate of the represented element.
Definition: DiagonalProxy.h:487
VT::ReturnType RN
Return type of the dense vector expression.
Definition: DVecConjExpr.h:103
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:261
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.
DifferenceType difference_type
Difference between two iterators.
Definition: DVecConjExpr.h:190
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
VT::ConstIterator IteratorType
ConstIterator type of the left-hand side dense vector expression.
Definition: DVecConjExpr.h:193
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2592
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: DVecConjExpr.h:437
ConstIterator(IteratorType it)
Constructor for the ConstIterator class.
Definition: DVecConjExpr.h:201
#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 all vector complex conjugate expression templates.The VecConjExpr class serves as a ta...
Definition: VecConjExpr.h:65
const CTransExprTrait< MT >::Type ctrans(const DenseMatrix< MT, SO > &dm)
Returns the conjugate transpose matrix of dm.
Definition: DMatConjExpr.h:974
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 IsAligned type trait.
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: DVecConjExpr.h:519
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
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DVecConjExpr.h:388
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2585
Constraint on the data type.
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DVecConjExpr.h:309
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2586
ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DVecConjExpr.h:212
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 IsPadded type trait.
ElementType ValueType
Type of the underlying elements.
Definition: DVecConjExpr.h:180
Header file for the serial shim.
VT::ElementType ET
Element type of the dense vector expression.
Definition: DVecConjExpr.h:104
Header file for the conjugate shim.
bool isAligned() const
Returns whether the operands of the expression are properly aligned in memory.
Definition: DVecConjExpr.h:541
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
Evaluation of the return type of a complex conjugate expression.Via this type trait it is possible to...
Definition: ConjExprTrait.h:87
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2587
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:1232
Header file for run time assertion macros.
ConjExprTrait< RN >::Type ExprReturnType
Expression return type for the subscript operator.
Definition: DVecConjExpr.h:117
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.
ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DVecConjExpr.h:224
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DVecConjExpr.h:364
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: DVecConjExpr.h:551
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
ElementType * PointerType
Pointer return type.
Definition: DVecConjExpr.h:181
Operand dv_
Dense vector of the complex conjugate expression.
Definition: DVecConjExpr.h:558
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DVecConjExpr.h:400
DVecConjExpr(const VT &dv)
Constructor for the DVecConjExpr class.
Definition: DVecConjExpr.h:426
Evaluation of the return type of a conjugate transpose expression.Via this type trait it is possible ...
Definition: CTransExprTrait.h:87
ElementType & ReferenceType
Reference return type.
Definition: DVecConjExpr.h:182
PointerType pointer
Pointer return type.
Definition: DVecConjExpr.h:188
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
const SelectType< returnExpr, ExprReturnType, ElementType >::Type ReturnType
Return type for expression template evaluations.
Definition: DVecConjExpr.h:163
ValueType value_type
Type of the underlying elements.
Definition: DVecConjExpr.h:187
Operand operand() const
Returns the dense vector operand.
Definition: DVecConjExpr.h:507
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:944
Header file for the IsComputation type trait class.
ReferenceType reference
Reference return type.
Definition: DVecConjExpr.h:189
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:59
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
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2583
Header file for the IsTrue value trait.
Header file for the SubvectorExprTrait class template.
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DVecConjExpr.h:298
const ConstIterator operator--(int)
Post-decrement operator.
Definition: DVecConjExpr.h:267
Header file for exception macros.
Header file for the CTransExprTrait class template.
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecConjExpr.h:320
Header file for the IsColumnVector type trait.
VT::ResultType ResultType
Result type for expression template evaluations.
Definition: DVecConjExpr.h:157
Header file for the ConjExprTrait class template.
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
Header file for the Size type trait.
VT::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: DVecConjExpr.h:158
#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
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DVecConjExpr.h:277
SelectType< useAssign, const ResultType, const DVecConjExpr & >::Type CompositeType
Data type for composite expression templates.
Definition: DVecConjExpr.h:166
#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
IteratorType it_
Iterator to the current vector element.
Definition: DVecConjExpr.h:407
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: DVecConjExpr.h:531
ConstIterator & operator++()
Pre-increment operator.
Definition: DVecConjExpr.h:235
BLAZE_ALWAYS_INLINE IntrinsicType load(size_t index) const
Access to the intrinsic elements of the vector.
Definition: DVecConjExpr.h:464
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.