35 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATCONJEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DMATCONJEXPR_H_
106 template<
typename MT
142 template<
typename MT2 >
145 enum { value = useAssign };
158 template<
typename MT2 >
159 struct UseSMPAssign {
160 enum { value = ( !MT2::smpAssignable || !MT::smpAssignable ) && useAssign };
299 inline IntrinsicType
load()
const {
300 return conj( it_.load() );
311 return it_ == rhs.
it_;
322 return it_ != rhs.
it_;
333 return it_ < rhs.
it_;
344 return it_ > rhs.
it_;
355 return it_ <= rhs.
it_;
366 return it_ >= rhs.
it_;
377 return it_ - rhs.
it_;
426 enum { vectorizable = MT::vectorizable &&
430 enum { smpAssignable = MT::smpAssignable };
465 inline ReturnType
at(
size_t i,
size_t j )
const {
466 if( i >=
dm_.rows() ) {
469 if( j >=
dm_.columns() ) {
531 return dm_.columns();
551 template<
typename T >
563 template<
typename T >
565 return dm_.isAliased( alias );
575 return dm_.isAligned();
585 return dm_.canSMPAssign();
608 template<
typename MT2
618 assign( ~lhs, rhs.
dm_ );
619 assign( ~lhs,
conj( ~lhs ) );
638 template<
typename MT2
657 const TmpType tmp(
serial( rhs ) );
677 template<
typename MT2
679 friend inline typename EnableIf< UseAssign<MT2> >::Type
680 addAssign( DenseMatrix<MT2,SO2>& lhs,
const DMatConjExpr& rhs )
691 const ResultType tmp(
serial( rhs ) );
692 addAssign( ~lhs, tmp );
715 template<
typename MT2
717 friend inline typename EnableIf< UseAssign<MT2> >::Type
718 subAssign( DenseMatrix<MT2,SO2>& lhs,
const DMatConjExpr& rhs )
729 const ResultType tmp(
serial( rhs ) );
730 subAssign( ~lhs, tmp );
761 template<
typename MT2
763 friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
791 template<
typename MT2
793 friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
798 typedef typename SelectType< SO == SO2, ResultType, OppositeType >::Type TmpType;
810 const TmpType tmp( rhs );
830 template<
typename MT2
832 friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
844 const ResultType tmp( rhs );
868 template<
typename MT2
870 friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
882 const ResultType tmp( rhs );
935 template<
typename MT
972 template<
typename MT
1009 template<
typename MT
1011 inline typename DMatConjExpr<MT,SO>::Operand
conj(
const DMatConjExpr<MT,SO>& dm )
1015 return dm.operand();
1039 template<
typename MT
1041 inline const DMatTransExpr<MT,!SO>
conj(
const DMatTransExpr<DMatConjExpr<MT,SO>,!SO>& dm )
1045 return DMatTransExpr<MT,!SO>( dm.operand().operand() );
1061 template<
typename MT,
bool SO >
1078 template<
typename MT,
bool SO >
1079 struct Columns<
DMatConjExpr<MT,SO> > :
public Columns<MT>
1095 template<
typename MT,
bool SO >
1096 struct IsAligned<
DMatConjExpr<MT,SO> > :
public IsTrue< IsAligned<MT>::value >
1112 template<
typename MT,
bool SO >
1113 struct IsPadded<
DMatConjExpr<MT,SO> > :
public IsTrue< IsPadded<MT>::value >
1129 template<
typename MT,
bool SO >
1130 struct IsSymmetric<
DMatConjExpr<MT,SO> > :
public IsTrue< IsSymmetric<MT>::value >
1146 template<
typename MT,
bool SO >
1147 struct IsHermitian<
DMatConjExpr<MT,SO> > :
public IsTrue< IsHermitian<MT>::value >
1163 template<
typename MT,
bool SO >
1164 struct IsLower<
DMatConjExpr<MT,SO> > :
public IsTrue< IsLower<MT>::value >
1180 template<
typename MT,
bool SO >
1181 struct IsUniLower<
DMatConjExpr<MT,SO> > :
public IsTrue< IsUniLower<MT>::value >
1197 template<
typename MT,
bool SO >
1198 struct IsStrictlyLower<
DMatConjExpr<MT,SO> > :
public IsTrue< IsStrictlyLower<MT>::value >
1214 template<
typename MT,
bool SO >
1215 struct IsUpper<
DMatConjExpr<MT,SO> > :
public IsTrue< IsUpper<MT>::value >
1231 template<
typename MT,
bool SO >
1232 struct IsUniUpper<
DMatConjExpr<MT,SO> > :
public IsTrue< IsUniUpper<MT>::value >
1248 template<
typename MT,
bool SO >
1249 struct IsStrictlyUpper<
DMatConjExpr<MT,SO> > :
public IsTrue< IsStrictlyUpper<MT>::value >
1265 template<
typename MT >
1270 typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value
1271 ,
typename DMatConjExpr<MT,false>::Operand
1272 , INVALID_TYPE >::Type Type;
1281 template<
typename MT >
1286 typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value
1287 ,
typename DMatConjExpr<MT,true>::Operand
1288 , INVALID_TYPE >::Type Type;
1297 template<
typename MT >
1298 struct DMatConjExprTrait< DMatTransExpr<
DMatConjExpr<MT,true>, false > >
1302 typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value
1303 , DMatTransExpr<MT,false>
1304 , INVALID_TYPE >::Type Type;
1313 template<
typename MT >
1314 struct TDMatConjExprTrait< DMatTransExpr<
DMatConjExpr<MT,false>, true > >
1318 typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value
1319 , DMatTransExpr<MT,true>
1320 , INVALID_TYPE >::Type Type;
1329 template<
typename MT,
bool SO,
bool AF >
1334 typedef typename ConjExprTrait< typename SubmatrixExprTrait<const MT,AF>::Type >::Type Type;
1343 template<
typename MT,
bool SO >
1348 typedef typename ConjExprTrait< typename RowExprTrait<const MT>::Type >::Type Type;
1357 template<
typename MT,
bool SO >
1362 typedef typename ConjExprTrait< typename ColumnExprTrait<const MT>::Type >::Type Type;
Pointer difference type of the Blaze library.
ValueType value_type
Type of the underlying elements.
Definition: DMatConjExpr.h:199
ElementType & ReferenceType
Reference return type.
Definition: DMatConjExpr.h:194
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:89
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DMatConjExpr.h:412
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 the Rows type trait.
Header file for the IsUniUpper type trait.
Header file for basic type definitions.
size_t columns() const
Returns the current number of columns of the matrix.
Definition: DMatConjExpr.h:530
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:252
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: DMatConjExpr.h:584
ConstIterator(IteratorType it)
Constructor for the ConstIterator class.
Definition: DMatConjExpr.h:213
ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DMatConjExpr.h:224
#define BLAZE_CONSTRAINT_MUST_BE_MATRIX_WITH_STORAGE_ORDER(T, SO)
Constraint on the data type.In case the given data type T is not a dense or sparse matrix type and in...
Definition: StorageOrder.h:81
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DMatConjExpr.h:310
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional matrix type...
Definition: DenseMatrix.h:79
MT::ResultType ResultType
Result type for expression template evaluations.
Definition: DMatConjExpr.h:168
Header file for the ColumnExprTrait class template.
IteratorType it_
Iterator to the current matrix element.
Definition: DMatConjExpr.h:419
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatConjExpr.h:332
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DMatConjExpr.h:376
Header file for the IsColumnMajorMatrix type trait.
ElementType ValueType
Type of the underlying elements.
Definition: DMatConjExpr.h:192
MT::ElementType ET
Element type of the dense matrix expression.
Definition: DMatConjExpr.h:115
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2588
Header file for the MatConjExpr 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
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatConjExpr.h:343
Header file for the Computation base class.
const SelectType< returnExpr, ExprReturnType, ElementType >::Type ReturnType
Return type for expression template evaluations.
Definition: DMatConjExpr.h:175
Header file for the RequiresEvaluation type trait.
SelectType< IsExpression< MT >::value, const MT, const MT & >::Type Operand
Composite data type of the dense matrix expression.
Definition: DMatConjExpr.h:181
Header file for the IsUniLower type trait.
CompressedMatrix< Type, false > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CompressedMatrix.h:2584
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row i.
Definition: DMatConjExpr.h:510
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:70
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatConjExpr.h:365
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:117
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DMatConjExpr.h:195
Constraint on the data type.
ConjExprTrait< typename DiagonalProxy< MT >::RepresentedType >::Type conj(const DiagonalProxy< MT > &proxy)
Computing the complex conjugate of the represented element.
Definition: DiagonalProxy.h:487
Constraint on the data type.
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row i.
Definition: DMatConjExpr.h:499
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:90
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DMatConjExpr.h:388
ElementType * PointerType
Pointer return type.
Definition: DMatConjExpr.h:193
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:261
IntrinsicTrait< ET >::Type IntrinsicType
Resulting intrinsic element type.
Definition: DMatConjExpr.h:172
Compile time type selection.The SelectType class template selects one of the two given types T1 and T...
Definition: SelectType.h:59
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatConjExpr.h:354
Header file for the IsTemporary type trait class.
Header file for the IsStrictlyUpper type trait.
Header file for the IsSymmetric type trait.
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
ConjExprTrait< RN >::Type ExprReturnType
Expression return type for the subscript operator.
Definition: DMatConjExpr.h:128
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2592
BLAZE_ALWAYS_INLINE IntrinsicType load(size_t i, size_t j) const
Access to the intrinsic elements of the matrix.
Definition: DMatConjExpr.h:483
#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
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DMatConjExpr.h:321
Header file for the DenseMatrix base class.
Header file for the Columns type trait.
const CTransExprTrait< MT >::Type ctrans(const DenseMatrix< MT, SO > &dm)
Returns the conjugate transpose matrix of dm.
Definition: DMatConjExpr.h:974
Expression object for the dense matrix conj() function.The DMatConjExpr class represents the compile ...
Definition: DMatConjExpr.h:108
Header file for the IsLower type trait.
Header file for the IsAligned type trait.
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatConjExpr.h:450
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: DMatConjExpr.h:552
#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
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2585
Constraints on the storage order of matrix types.
DMatConjExpr(const MT &dm)
Constructor for the DMatConjExpr class.
Definition: DMatConjExpr.h:438
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2586
MT::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: DMatConjExpr.h:170
Header file for the SelectType class template.
Header file for the RowExprTrait class template.
Header file for all forward declarations for expression class templates.
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
Header file for the IsPadded type trait.
Header file for the serial shim.
IntrinsicType load() const
Access to the intrinsic elements of the matrix.
Definition: DMatConjExpr.h:299
MT::ReturnType RN
Return type of the dense matrix expression.
Definition: DMatConjExpr.h:114
Header file for the conjugate shim.
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
Header file for the SubmatrixExprTrait class template.
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.
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.
Header file for the TDMatConjExprTrait class template.
MT::ElementType ElementType
Resulting element type.
Definition: DMatConjExpr.h:171
Header file for the DMatConjExprTrait class template.
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
PointerType pointer
Pointer return type.
Definition: DMatConjExpr.h:200
DifferenceType difference_type
Difference between two iterators.
Definition: DMatConjExpr.h:202
MT::ConstIterator IteratorType
ConstIterator type of the dense matrix expression.
Definition: DMatConjExpr.h:205
Evaluation of the return type of a conjugate transpose expression.Via this type trait it is possible ...
Definition: CTransExprTrait.h:87
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DMatConjExpr.h:191
#define BLAZE_CONSTRAINT_MATRICES_MUST_HAVE_SAME_STORAGE_ORDER(T1, T2)
Constraint on the data type.In case either of the two given data types T1 or T2 is not a matrix type ...
Definition: StorageOrder.h:122
Header file for the IsDenseVector type trait.
Header file for all intrinsic functionality.
ReferenceType reference
Reference return type.
Definition: DMatConjExpr.h:201
IteratorCategory iterator_category
The iterator category.
Definition: DMatConjExpr.h:198
Header file for the IsRowMajorMatrix type trait.
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.
const ConstIterator operator++(int)
Post-increment operator.
Definition: DMatConjExpr.h:258
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
ConstIterator & operator--()
Pre-decrement operator.
Definition: DMatConjExpr.h:268
#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.
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: DMatConjExpr.h:564
Operand operand() const
Returns the dense matrix operand.
Definition: DMatConjExpr.h:540
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DMatConjExpr.h:465
MT::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatConjExpr.h:169
Header file for the IsUpper type trait.
const ConstIterator operator--(int)
Post-decrement operator.
Definition: DMatConjExpr.h:279
bool isAligned() const
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatConjExpr.h:574
Header file for exception macros.
SelectType< useAssign, const ResultType, const DMatConjExpr & >::Type CompositeType
Data type for composite expression templates.
Definition: DMatConjExpr.h:178
Header file for the CTransExprTrait class template.
Operand dm_
Dense matrix of the complex conjugate expression.
Definition: DMatConjExpr.h:591
Base class for all matrix complex conjugate expression templates.The MatConjExpr class serves as a ta...
Definition: MatConjExpr.h:65
Header file for the IsHermitian type trait.
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DMatConjExpr.h:289
size_t rows() const
Returns the current number of rows of the matrix.
Definition: DMatConjExpr.h:520
Header file for the ConjExprTrait class template.
DMatConjExpr< MT, SO > This
Type of this DMatConjExpr instance.
Definition: DMatConjExpr.h:167
System settings for the inline keywords.
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DMatConjExpr.h:400
#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
Iterator over the elements of the dense matrix.
Definition: DMatConjExpr.h:187
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.
ConstIterator & operator++()
Pre-increment operator.
Definition: DMatConjExpr.h:247
ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DMatConjExpr.h:236