35 #ifndef _BLAZE_MATH_EXPRESSIONS_SVECSERIALEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_SVECSERIALEXPR_H_
85 class SVecSerialExpr :
public SparseVector< SVecSerialExpr<VT,TF>, TF >
86 ,
private VecSerialExpr
106 enum { smpAssignable = VT::smpAssignable };
147 return sv_.nonZeros();
177 template<
typename T >
179 return sv_.canAlias( alias );
189 template<
typename T >
191 return sv_.isAliased( alias );
201 return sv_.canSMPAssign();
222 template<
typename VT2 >
246 template<
typename VT2 >
270 template<
typename VT2 >
294 template<
typename VT2 >
319 template<
typename VT2 >
344 template<
typename VT2 >
369 template<
typename VT2 >
394 template<
typename VT2 >
418 template<
typename VT2 >
442 template<
typename VT2 >
467 template<
typename VT2 >
492 template<
typename VT2 >
517 template<
typename VT2 >
542 template<
typename VT2 >
567 template<
typename VT2 >
592 template<
typename VT2 >
639 template<
typename VT
669 template<
typename VT
671 inline const SVecSerialExpr<VT,TF>
serial(
const SVecSerialExpr<VT,TF>& sv )
689 template<
typename VT,
bool TF >
690 struct Size< SVecSerialExpr<VT,TF> >
707 template<
typename VT >
708 struct SVecSerialExprTrait< SVecSerialExpr<VT,false> >
712 typedef typename SelectType< IsSparseVector<VT>::value && IsColumnVector<VT>::value
713 , SVecSerialExpr<VT,false>
714 , INVALID_TYPE >::Type Type;
723 template<
typename VT >
724 struct TSVecSerialExprTrait< SVecSerialExpr<VT,true> >
728 typedef typename SelectType< IsSparseVector<VT>::value && IsRowVector<VT>::value
729 , SVecSerialExpr<VT,true>
730 , INVALID_TYPE >::Type Type;
739 template<
typename VT,
bool TF,
bool AF >
740 struct SubvectorExprTrait< SVecSerialExpr<VT,TF>, AF >
744 typedef typename SerialExprTrait< typename SubvectorExprTrait<const VT,AF>::Type >::Type Type;
VT::ElementType ElementType
Resulting element type.
Definition: SVecSerialExpr.h:94
BLAZE_ALWAYS_INLINE void multAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the multiplication assignment of a matrix to a matrix.
Definition: Matrix.h:879
SVecSerialExpr< VT, TF > This
Type of this SVecSerialExpr instance.
Definition: SVecSerialExpr.h:91
Header file for basic type definitions.
Header file for the SparseVector base class.
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: SVecSerialExpr.h:178
VT::ResultType ResultType
Result type for expression template evaluations.
Definition: SVecSerialExpr.h:92
Header file for the IsRowVector type trait.
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: SVecSerialExpr.h:125
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:699
Header file for the Computation base class.
Constraint on the data type.
VT::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: SVecSerialExpr.h:93
SelectType< IsExpression< VT >::value, const VT, const VT & >::Type Operand
Composite data type of the sparse vector expression.
Definition: SVecSerialExpr.h:101
Operand operand() const
Returns the sparse vector operand.
Definition: SVecSerialExpr.h:156
const ResultType CompositeType
Data type for composite expression templates.
Definition: SVecSerialExpr.h:98
Compile time type selection.The SelectType class template selects one of the two given types T1 and T...
Definition: SelectType.h:59
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
BLAZE_ALWAYS_INLINE void assign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the assignment of a matrix to a matrix.
Definition: Matrix.h:635
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a sparse, N-dimensional vector type...
Definition: SparseVector.h:79
Header file for the SerialExprTrait class template.
Constraint on the data type.
Header file for the SVecSerialExprTrait class template.
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: SVecSerialExpr.h:200
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2504
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2505
Header file for the SelectType class template.
Header file for all forward declarations for expression class templates.
Constraint on the data type.
Expression object for the forced serial evaluation of sparse vectors.The SVecSerialExpr class represe...
Definition: Forward.h:116
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: SVecSerialExpr.h:190
size_t nonZeros() const
Returns the number of non-zero elements in the sparse vector.
Definition: SVecSerialExpr.h:146
Header file for the VecSerialExpr base class.
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
Header file for the IsSparseVector type trait.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2506
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.
BLAZE_ALWAYS_INLINE void addAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the addition assignment of a matrix to a matrix.
Definition: Matrix.h:742
Header file for the TSVecSerialExprTrait class template.
Operand sv_
Sparse vector of the serial evaluation expression.
Definition: SVecSerialExpr.h:207
Header file for the IsComputation type trait class.
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:108
#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:2502
SVecSerialExpr(const VT &sv)
Constructor for the SVecSerialExpr class.
Definition: SVecSerialExpr.h:114
Header file for the SubvectorExprTrait class template.
VT::ReturnType ReturnType
Return type for expression template evaluations.
Definition: SVecSerialExpr.h:95
Header file for the IsColumnVector type trait.
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.
#define BLAZE_CONSTRAINT_MUST_BE_VECTOR_WITH_TRANSPOSE_FLAG(T, TF)
Constraint on the data type.In case the given data type T is not a dense or sparse vector type and in...
Definition: TransposeFlag.h:238
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.
BLAZE_ALWAYS_INLINE void subAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the subtraction assignment of a matrix to matrix.
Definition: Matrix.h:849
size_t size() const
Returns the current size/dimension of the vector.
Definition: SVecSerialExpr.h:136