35 #ifndef _BLAZE_MATH_EXPRESSIONS_DVECCONJEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DVECCONJEXPR_H_
131 template<
typename VT2 >
134 enum { value = useAssign };
147 template<
typename VT2 >
148 struct UseSMPAssign {
149 enum { value = ( !VT2::smpAssignable || !VT::smpAssignable ) && useAssign };
287 inline IntrinsicType
load()
const {
288 return conj( it_.load() );
299 return it_ == rhs.
it_;
310 return it_ != rhs.
it_;
321 return it_ < rhs.
it_;
332 return it_ > rhs.
it_;
343 return it_ <= rhs.
it_;
354 return it_ >= rhs.
it_;
365 return it_ - rhs.
it_;
414 enum { vectorizable = VT::vectorizable &&
418 enum { smpAssignable = VT::smpAssignable };
450 inline ReturnType
at(
size_t index )
const {
451 if( index >=
dv_.size() ) {
454 return (*
this)[index];
468 return conj(
dv_.load( index ) );
518 template<
typename T >
530 template<
typename T >
532 return dv_.isAliased( alias );
542 return dv_.isAligned();
552 return dv_.canSMPAssign();
575 template<
typename VT2 >
583 assign( ~lhs, rhs.
dv_ );
584 assign( ~lhs,
conj( ~lhs ) );
603 template<
typename VT2 >
615 const ResultType tmp(
serial( rhs ) );
635 template<
typename VT2 >
636 friend inline typename EnableIf< UseAssign<VT2> >::Type
637 addAssign( DenseVector<VT2,TF>& lhs,
const DVecConjExpr& rhs )
647 const ResultType tmp(
serial( rhs ) );
648 addAssign( ~lhs, tmp );
671 template<
typename VT2 >
672 friend inline typename EnableIf< UseAssign<VT2> >::Type
673 subAssign( DenseVector<VT2,TF>& lhs,
const DVecConjExpr& rhs )
683 const ResultType tmp(
serial( rhs ) );
684 subAssign( ~lhs, tmp );
707 template<
typename VT2 >
708 friend inline typename EnableIf< UseAssign<VT2> >::Type
709 multAssign( DenseVector<VT2,TF>& lhs,
const DVecConjExpr& rhs )
719 const ResultType tmp(
serial( rhs ) );
720 multAssign( ~lhs, tmp );
743 template<
typename VT2 >
744 friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
771 template<
typename VT2 >
772 friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
783 const ResultType tmp( rhs );
803 template<
typename VT2 >
804 friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
815 const ResultType tmp( rhs );
839 template<
typename VT2 >
840 friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
851 const ResultType tmp( rhs );
875 template<
typename VT2 >
876 friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
887 const ResultType tmp( rhs );
932 template<
typename VT
969 template<
typename VT
1006 template<
typename VT
1008 inline typename DVecConjExpr<VT,TF>::Operand
conj(
const DVecConjExpr<VT,TF>& dv )
1012 return dv.operand();
1036 template<
typename VT
1038 inline const DVecTransExpr<VT,!TF>
conj(
const DVecTransExpr<DVecConjExpr<VT,TF>,!TF>& dv )
1042 return DVecTransExpr<VT,!TF>( dv.operand().operand() );
1058 template<
typename VT,
bool TF >
1075 template<
typename VT,
bool TF >
1076 struct IsAligned<
DVecConjExpr<VT,TF> > :
public IsTrue< IsAligned<VT>::value >
1092 template<
typename VT,
bool TF >
1093 struct IsPadded<
DVecConjExpr<VT,TF> > :
public IsTrue< IsPadded<VT>::value >
1109 template<
typename VT >
1114 typedef typename SelectType< IsDenseVector<VT>::value && IsColumnVector<VT>::value
1115 ,
typename DVecConjExpr<VT,false>::Operand
1116 , INVALID_TYPE >::Type Type;
1125 template<
typename VT >
1130 typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value
1131 ,
typename DVecConjExpr<VT,true>::Operand
1132 , INVALID_TYPE >::Type Type;
1141 template<
typename VT >
1142 struct DVecConjExprTrait< DVecTransExpr<
DVecConjExpr<VT,true>, false > >
1146 typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value
1147 , DVecTransExpr<VT,false>
1148 , INVALID_TYPE >::Type Type;
1157 template<
typename VT >
1158 struct TDVecConjExprTrait< DVecTransExpr<
DVecConjExpr<VT,false>, true > >
1162 typedef typename SelectType< IsDenseVector<VT>::value && IsColumnVector<VT>::value
1163 , DVecTransExpr<VT,true>
1164 , INVALID_TYPE >::Type Type;
1173 template<
typename VT,
bool TF,
bool AF >
1178 typedef typename ConjExprTrait< typename SubvectorExprTrait<const VT,AF>::Type >::Type Type;
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.