Blaze 3.9
SVecScalarDivExpr.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_EXPRESSIONS_SVECSCALARDIVEXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_SVECSCALARDIVEXPR_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <iterator>
44#include <utility>
45#include <blaze/math/Aliases.h>
69#include <blaze/util/Assert.h>
72#include <blaze/util/EnableIf.h>
75#include <blaze/util/mpl/If.h>
76#include <blaze/util/Types.h>
80
81
82namespace blaze {
83
84//=================================================================================================
85//
86// CLASS SVECSCALARDIVEXPR
87//
88//=================================================================================================
89
90//*************************************************************************************************
97template< typename VT // Type of the left-hand side sparse vector
98 , typename ST // Type of the right-hand side scalar value
99 , bool TF > // Transpose flag
101 : public VecScalarDivExpr< SparseVector< SVecScalarDivExpr<VT,ST,TF>, TF > >
102 , private Computation
103{
104 private:
105 //**Type definitions****************************************************************************
109 //**********************************************************************************************
110
111 //**Return type evaluation**********************************************************************
113
118 static constexpr bool returnExpr = !IsTemporary_v<RN>;
119
121 using ExprReturnType = decltype( std::declval<RN>() / std::declval<ST>() );
122 //**********************************************************************************************
123
124 //**Serial evaluation strategy******************************************************************
126
132 static constexpr bool useAssign = RequiresEvaluation_v<VT>;
133
136 template< typename VT2 >
137 static constexpr bool UseAssign_v = useAssign;
139 //**********************************************************************************************
140
141 //**Parallel evaluation strategy****************************************************************
143
149 template< typename VT2 >
150 static constexpr bool UseSMPAssign_v =
151 ( ( !VT2::smpAssignable || !VT::smpAssignable ) && useAssign );
153 //**********************************************************************************************
154
155 public:
156 //**Type definitions****************************************************************************
159
162
166
169
172
174 using LeftOperand = If_t< IsExpression_v<VT>, const VT, const VT& >;
175
177 using RightOperand = ST;
178 //**********************************************************************************************
179
180 //**Compilation flags***************************************************************************
182 static constexpr bool smpAssignable = false;
183 //**********************************************************************************************
184
185 //**ConstIterator class definition**************************************************************
189 {
190 public:
191 //**Type definitions*************************************************************************
194
197
198 using IteratorCategory = std::forward_iterator_tag;
202 using DifferenceType = ptrdiff_t;
203
204 // STL iterator requirements
210 //*******************************************************************************************
211
212 //**Constructor******************************************************************************
215 inline ConstIterator( IteratorType vector, RightOperand scalar )
216 : vector_( vector ) // Iterator over the elements of the left-hand side sparse vector expression
217 , scalar_( scalar ) // Right hand side scalar of the multiplication expression
218 {}
219 //*******************************************************************************************
220
221 //**Prefix increment operator****************************************************************
227 ++vector_;
228 return *this;
229 }
230 //*******************************************************************************************
231
232 //**Element access operator******************************************************************
237 inline const Element operator*() const {
238 return Element( vector_->value() / scalar_, vector_->index() );
239 }
240 //*******************************************************************************************
241
242 //**Element access operator******************************************************************
247 inline const ConstIterator* operator->() const {
248 return this;
249 }
250 //*******************************************************************************************
251
252 //**Value function***************************************************************************
257 inline ReturnType value() const {
258 return vector_->value() / scalar_;
259 }
260 //*******************************************************************************************
261
262 //**Index function***************************************************************************
267 inline size_t index() const {
268 return vector_->index();
269 }
270 //*******************************************************************************************
271
272 //**Equality operator************************************************************************
278 inline bool operator==( const ConstIterator& rhs ) const {
279 return vector_ == rhs.vector_;
280 }
281 //*******************************************************************************************
282
283 //**Inequality operator**********************************************************************
289 inline bool operator!=( const ConstIterator& rhs ) const {
290 return vector_ != rhs.vector_;
291 }
292 //*******************************************************************************************
293
294 //**Subtraction operator*********************************************************************
300 inline DifferenceType operator-( const ConstIterator& rhs ) const {
301 return vector_ - rhs.vector_;
302 }
303 //*******************************************************************************************
304
305 private:
306 //**Member variables*************************************************************************
309 //*******************************************************************************************
310 };
311 //**********************************************************************************************
312
313 //**Constructor*********************************************************************************
319 inline SVecScalarDivExpr( const VT& vector, ST scalar ) noexcept
320 : vector_( vector ) // Left-hand side sparse vector of the division expression
321 , scalar_( scalar ) // Right-hand side scalar of the division expression
322 {}
323 //**********************************************************************************************
324
325 //**Subscript operator**************************************************************************
331 inline ReturnType operator[]( size_t index ) const {
332 BLAZE_INTERNAL_ASSERT( index < vector_.size(), "Invalid vector access index" );
333 return vector_[index] / scalar_;
334 }
335 //**********************************************************************************************
336
337 //**At function*********************************************************************************
344 inline ReturnType at( size_t index ) const {
345 if( index >= vector_.size() ) {
346 BLAZE_THROW_OUT_OF_RANGE( "Invalid vector access index" );
347 }
348 return (*this)[index];
349 }
350 //**********************************************************************************************
351
352 //**Begin function******************************************************************************
357 inline ConstIterator begin() const {
358 return ConstIterator( vector_.begin(), scalar_ );
359 }
360 //**********************************************************************************************
361
362 //**End function********************************************************************************
367 inline ConstIterator end() const {
368 return ConstIterator( vector_.end(), scalar_ );
369 }
370 //**********************************************************************************************
371
372 //**Size function*******************************************************************************
377 inline size_t size() const noexcept {
378 return vector_.size();
379 }
380 //**********************************************************************************************
381
382 //**NonZeros function***************************************************************************
387 inline size_t nonZeros() const {
388 return vector_.nonZeros();
389 }
390 //**********************************************************************************************
391
392 //**Find function*******************************************************************************
398 inline ConstIterator find( size_t index ) const {
400 return ConstIterator( vector_.find( index ), scalar_ );
401 }
402 //**********************************************************************************************
403
404 //**LowerBound function*************************************************************************
410 inline ConstIterator lowerBound( size_t index ) const {
412 return ConstIterator( vector_.lowerBound( index ), scalar_ );
413 }
414 //**********************************************************************************************
415
416 //**UpperBound function*************************************************************************
422 inline ConstIterator upperBound( size_t index ) const {
424 return ConstIterator( vector_.upperBound( index ), scalar_ );
425 }
426 //**********************************************************************************************
427
428 //**Left operand access*************************************************************************
433 inline LeftOperand leftOperand() const noexcept {
434 return vector_;
435 }
436 //**********************************************************************************************
437
438 //**Right operand access************************************************************************
443 inline RightOperand rightOperand() const noexcept {
444 return scalar_;
445 }
446 //**********************************************************************************************
447
448 //**********************************************************************************************
454 template< typename T >
455 inline bool canAlias( const T* alias ) const noexcept {
456 return vector_.canAlias( alias );
457 }
458 //**********************************************************************************************
459
460 //**********************************************************************************************
466 template< typename T >
467 inline bool isAliased( const T* alias ) const noexcept {
468 return vector_.isAliased( alias );
469 }
470 //**********************************************************************************************
471
472 private:
473 //**Member variables****************************************************************************
476 //**********************************************************************************************
477
478 //**Assignment to dense vectors*****************************************************************
492 template< typename VT2 > // Type of the target dense vector
493 friend inline auto assign( DenseVector<VT2,TF>& lhs, const SVecScalarDivExpr& rhs )
495 {
497
498 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
499
500 assign( *lhs, rhs.vector_ );
501 (*lhs) /= rhs.scalar_;
502 }
504 //**********************************************************************************************
505
506 //**Assignment to sparse vectors****************************************************************
520 template< typename VT2 > // Type of the target sparse vector
521 friend inline auto assign( SparseVector<VT2,TF>& lhs, const SVecScalarDivExpr& rhs )
523 {
525
526 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
527
528 assign( *lhs, rhs.vector_ );
529 (*lhs) /= rhs.scalar_;
530 }
532 //**********************************************************************************************
533
534 //**Addition assignment to dense vectors********************************************************
548 template< typename VT2 > // Type of the target dense vector
549 friend inline auto addAssign( DenseVector<VT2,TF>& lhs, const SVecScalarDivExpr& rhs )
550 -> EnableIf_t< UseAssign_v<VT2> >
551 {
553
557
558 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
559
560 const ResultType tmp( serial( rhs ) );
561 addAssign( *lhs, tmp );
562 }
564 //**********************************************************************************************
565
566 //**Addition assignment to sparse vectors*******************************************************
567 // No special implementation for the addition assignment to sparse vectors.
568 //**********************************************************************************************
569
570 //**Subtraction assignment to dense vectors*****************************************************
584 template< typename VT2 > // Type of the target dense vector
585 friend inline auto subAssign( DenseVector<VT2,TF>& lhs, const SVecScalarDivExpr& rhs )
586 -> EnableIf_t< UseAssign_v<VT2> >
587 {
589
593
594 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
595
596 const ResultType tmp( serial( rhs ) );
597 subAssign( *lhs, tmp );
598 }
600 //**********************************************************************************************
601
602 //**Subtraction assignment to sparse vectors****************************************************
603 // No special implementation for the subtraction assignment to sparse vectors.
604 //**********************************************************************************************
605
606 //**Multiplication assignment to dense vectors**************************************************
620 template< typename VT2 > // Type of the target dense vector
621 friend inline auto multAssign( DenseVector<VT2,TF>& lhs, const SVecScalarDivExpr& rhs )
622 -> EnableIf_t< UseAssign_v<VT2> >
623 {
625
629
630 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
631
632 const ResultType tmp( serial( rhs ) );
633 multAssign( *lhs, tmp );
634 }
636 //**********************************************************************************************
637
638 //**Multiplication assignment to sparse vectors*************************************************
639 // No special implementation for the multiplication assignment to sparse vectors.
640 //**********************************************************************************************
641
642 //**SMP assignment to dense vectors*************************************************************
643 // No special implementation for the SMP assignment to dense vectors.
644 //**********************************************************************************************
645
646 //**SMP assignment to sparse vectors************************************************************
647 // No special implementation for the SMP assignment to sparse vectors.
648 //**********************************************************************************************
649
650 //**SMP addition assignment to dense vectors****************************************************
664 template< typename VT2 > // Type of the target dense vector
665 friend inline auto smpAddAssign( DenseVector<VT2,TF>& lhs, const SVecScalarDivExpr& rhs )
666 -> EnableIf_t< UseSMPAssign_v<VT2> >
667 {
669
673
674 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
675
676 const ResultType tmp( rhs );
677 smpAddAssign( *lhs, tmp );
678 }
680 //**********************************************************************************************
681
682 //**SMP addition assignment to sparse vectors***************************************************
683 // No special implementation for the SMP addition assignment to sparse vectors.
684 //**********************************************************************************************
685
686 //**SMP subtraction assignment to dense vectors*************************************************
700 template< typename VT2 > // Type of the target dense vector
701 friend inline auto smpSubAssign( DenseVector<VT2,TF>& lhs, const SVecScalarDivExpr& rhs )
702 -> EnableIf_t< UseSMPAssign_v<VT2> >
703 {
705
709
710 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
711
712 const ResultType tmp( rhs );
713 smpSubAssign( *lhs, tmp );
714 }
716 //**********************************************************************************************
717
718 //**SMP subtraction assignment to sparse vectors************************************************
719 // No special implementation for the SMP subtraction assignment to sparse vectors.
720 //**********************************************************************************************
721
722 //**SMP multiplication assignment to dense vectors**********************************************
736 template< typename VT2 > // Type of the target dense vector
737 friend inline auto smpMultAssign( DenseVector<VT2,TF>& lhs, const SVecScalarDivExpr& rhs )
738 -> EnableIf_t< UseSMPAssign_v<VT2> >
739 {
741
745
746 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
747
748 const ResultType tmp( rhs );
749 smpMultAssign( *lhs, tmp );
750 }
752 //**********************************************************************************************
753
754 //**SMP multiplication assignment to sparse vectors*********************************************
755 // No special implementation for the SMP multiplication assignment to sparse vectors.
756 //**********************************************************************************************
757
758 //**Compile time checks*************************************************************************
768 //**********************************************************************************************
769};
770//*************************************************************************************************
771
772
773
774
775//=================================================================================================
776//
777// GLOBAL BINARY ARITHMETIC OPERATORS
778//
779//=================================================================================================
780
781//*************************************************************************************************
786template< typename VT // Type of the left-hand side sparse vector
787 , typename ST > // Type of the right-hand side scalar
788using SVecScalarDivExprHelper_t =
789 If_t< IsFloatingPoint_v< UnderlyingBuiltin_t<VT> > ||
790 IsFloatingPoint_v< UnderlyingBuiltin_t<ST> >
791 , If_t< IsBuiltin_v<ST>
792 , DivTrait_t< UnderlyingBuiltin_t<VT>, ST >
793 , decltype( inv( std::declval<ST>() ) ) >
794 , ST >;
796//*************************************************************************************************
797
798
799//*************************************************************************************************
811template< typename VT // Type of the left-hand side sparse vector
812 , bool TF // Transpose flag of the left-hand side sparse vector
813 , typename ST // Type of the right-hand side scalar
814 , EnableIf_t< !IsZero_v<VT> &&
815 !IsInvertible_v< SVecScalarDivExprHelper_t<VT,ST> > >* = nullptr >
816inline decltype(auto) svecscalardiv( const SparseVector<VT,TF>& vec, ST scalar )
817{
819
820 using ScalarType = SVecScalarDivExprHelper_t<VT,ST>;
821 using ReturnType = const SVecScalarDivExpr<VT,ScalarType,TF>;
822
823 return ReturnType( *vec, scalar );
824}
826//*************************************************************************************************
827
828
829//*************************************************************************************************
841template< typename VT // Type of the left-hand side sparse vector
842 , bool TF // Transpose flag of the left-hand side sparse vector
843 , typename ST // Type of the right-hand side scalar
844 , EnableIf_t< !IsZero_v<VT> &&
845 IsInvertible_v< SVecScalarDivExprHelper_t<VT,ST> > >* = nullptr >
846inline decltype(auto) svecscalardiv( const SparseVector<VT,TF>& vec, ST scalar )
847{
849
850 using ScalarType = SVecScalarDivExprHelper_t<VT,ST>;
851 using ReturnType = const SVecScalarMultExpr<VT,ScalarType,TF>;
852
853 return ReturnType( *vec, inv(scalar) );
854}
856//*************************************************************************************************
857
858
859//*************************************************************************************************
872template< typename VT // Type of the left-hand side sparse vector
873 , bool TF // Transpose flag of the left-hand side sparse vector
874 , typename ST // Type of the right-hand side scalar
875 , EnableIf_t< IsZero_v<VT> >* = nullptr >
876inline decltype(auto) svecscalardiv( const SparseVector<VT,TF>& vec, ST scalar )
877{
879
880 MAYBE_UNUSED( scalar );
881
882 using ReturnType = const DivTrait_t< ResultType_t<VT>, ST >;
883
886
887 return ReturnType( (*vec).size() );
888}
890//*************************************************************************************************
891
892
893//*************************************************************************************************
916template< typename VT // Type of the left-hand side sparse vector
917 , typename ST // Type of the right-hand side scalar
918 , bool TF // Transpose flag
919 , EnableIf_t< IsScalar_v<ST> >* = nullptr >
920inline decltype(auto) operator/( const SparseVector<VT,TF>& vec, ST scalar )
921{
923
924 BLAZE_USER_ASSERT( scalar != ST{}, "Division by zero detected" );
925
926 return svecscalardiv( *vec, scalar );
927}
928//*************************************************************************************************
929
930} // namespace blaze
931
932#endif
Header file for auxiliary alias declarations.
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.
Definition: Aliases.h:110
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.
Definition: Aliases.h:470
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.
Definition: Aliases.h:450
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition: Aliases.h:190
typename T::ConstIterator ConstIterator_t
Alias declaration for nested ConstIterator type definitions.
Definition: Aliases.h:130
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.
Definition: Aliases.h:550
Header file for run time assertion macros.
Header file for the division trait.
Header file for the EnableIf class template.
Constraint on the data type.
Header file for the function trace functionality.
Header file for the If class template.
Header file for the invert shim.
Header file for the IsBuiltin type trait.
Header file for the IsExpression type trait class.
Header file for the IsFloatingPoint type trait.
Header file for the IsInvertible type trait.
Header file for the IsScalar type trait.
Header file for the IsTemporary type trait class.
Deactivation of problematic macros.
Header file for the MAYBE_UNUSED function template.
Header file for the multiplication trait.
Header file for the RemoveReference type trait.
Data type constraint.
Constraint on the data type.
Header file for the UnderlyingBuiltin type trait.
Header file for the ValueIndexPair class.
Constraint on the data type.
Base class for N-dimensional dense vectors.
Definition: DenseVector.h:77
Iterator over the elements of the sparse vector/scalar multiplication expression.
Definition: SVecScalarDivExpr.h:189
ValueType & ReferenceType
Reference return type.
Definition: SVecScalarDivExpr.h:201
ValueType * PointerType
Pointer return type.
Definition: SVecScalarDivExpr.h:200
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: SVecScalarDivExpr.h:278
IteratorCategory iterator_category
The iterator category.
Definition: SVecScalarDivExpr.h:205
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: SVecScalarDivExpr.h:289
Element ValueType
Type of the underlying pointers.
Definition: SVecScalarDivExpr.h:199
ConstIterator & operator++()
Pre-increment operator.
Definition: SVecScalarDivExpr.h:226
ConstIterator_t< RemoveReference_t< LeftOperand > > IteratorType
Iterator type of the sparse vector expression.
Definition: SVecScalarDivExpr.h:196
std::forward_iterator_tag IteratorCategory
The iterator category.
Definition: SVecScalarDivExpr.h:198
IteratorType vector_
Iterator over the elements of the left-hand side sparse vector expression.
Definition: SVecScalarDivExpr.h:307
DifferenceType difference_type
Difference between two iterators.
Definition: SVecScalarDivExpr.h:209
ConstIterator(IteratorType vector, RightOperand scalar)
Constructor for the ConstIterator class.
Definition: SVecScalarDivExpr.h:215
const Element operator*() const
Direct access to the sparse vector element at the current iterator position.
Definition: SVecScalarDivExpr.h:237
size_t index() const
Access to the current index of the sparse element.
Definition: SVecScalarDivExpr.h:267
ValueIndexPair< ElementType > Element
Element type of the sparse vector expression.
Definition: SVecScalarDivExpr.h:193
const ConstIterator * operator->() const
Direct access to the sparse vector element at the current iterator position.
Definition: SVecScalarDivExpr.h:247
RightOperand scalar_
Right hand side scalar of the multiplication expression.
Definition: SVecScalarDivExpr.h:308
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two expression iterators.
Definition: SVecScalarDivExpr.h:300
ReturnType value() const
Access to the current value of the sparse element.
Definition: SVecScalarDivExpr.h:257
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: SVecScalarDivExpr.h:202
Expression object for divisions of a sparse vector by a scalar.
Definition: SVecScalarDivExpr.h:103
If_t< IsExpression_v< VT >, const VT, const VT & > LeftOperand
Composite type of the left-hand side sparse vector expression.
Definition: SVecScalarDivExpr.h:174
LeftOperand leftOperand() const noexcept
Returns the left-hand side sparse vector operand.
Definition: SVecScalarDivExpr.h:433
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: SVecScalarDivExpr.h:455
ElementType_t< ResultType > ElementType
Resulting element type.
Definition: SVecScalarDivExpr.h:165
LeftOperand vector_
Left-hand side sparse vector of the division expression.
Definition: SVecScalarDivExpr.h:474
RightOperand rightOperand() const noexcept
Returns the right-hand side scalar operand.
Definition: SVecScalarDivExpr.h:443
static constexpr bool useAssign
Compilation switch for the serial evaluation strategy of the multiplication expression.
Definition: SVecScalarDivExpr.h:132
ConstIterator lowerBound(size_t index) const
Returns an iterator to the first index not less then the given index.
Definition: SVecScalarDivExpr.h:410
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: SVecScalarDivExpr.h:344
ConstIterator begin() const
Returns an iterator to the first non-zero element of the sparse vector.
Definition: SVecScalarDivExpr.h:357
ST RightOperand
Composite type of the right-hand side scalar value.
Definition: SVecScalarDivExpr.h:177
SVecScalarDivExpr(const VT &vector, ST scalar) noexcept
Constructor for the SVecScalarDivExpr class.
Definition: SVecScalarDivExpr.h:319
const If_t< returnExpr, ExprReturnType, ElementType > ReturnType
Return type for expression template evaluations.
Definition: SVecScalarDivExpr.h:168
ResultType_t< VT > RT
Result type of the sparse vector expression.
Definition: SVecScalarDivExpr.h:106
RightOperand scalar_
Right-hand side scalar of the division expression.
Definition: SVecScalarDivExpr.h:475
CompositeType_t< VT > CT
Composite type of the sparse vector expression.
Definition: SVecScalarDivExpr.h:108
DivTrait_t< RT, ST > ResultType
Result type for expression template evaluations.
Definition: SVecScalarDivExpr.h:163
ConstIterator find(size_t index) const
Searches for a specific vector element.
Definition: SVecScalarDivExpr.h:398
decltype(std::declval< RN >()/std::declval< ST >()) ExprReturnType
Expression return type for the subscript operator.
Definition: SVecScalarDivExpr.h:121
size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition: SVecScalarDivExpr.h:377
If_t< useAssign, const ResultType, const SVecScalarDivExpr & > CompositeType
Data type for composite expression templates.
Definition: SVecScalarDivExpr.h:171
ReturnType_t< VT > RN
Return type of the sparse vector expression.
Definition: SVecScalarDivExpr.h:107
ConstIterator end() const
Returns an iterator just past the last non-zero element of the sparse vector.
Definition: SVecScalarDivExpr.h:367
static constexpr bool returnExpr
Compilation switch for the selection of the subscript operator return type.
Definition: SVecScalarDivExpr.h:118
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: SVecScalarDivExpr.h:182
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: SVecScalarDivExpr.h:164
size_t nonZeros() const
Returns the number of non-zero elements in the sparse vector.
Definition: SVecScalarDivExpr.h:387
ConstIterator upperBound(size_t index) const
Returns an iterator to the first index greater then the given index.
Definition: SVecScalarDivExpr.h:422
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: SVecScalarDivExpr.h:331
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: SVecScalarDivExpr.h:467
Base class for sparse vectors.
Definition: SparseVector.h:72
Index-value-pair for sparse vectors and matrices.
Definition: ValueIndexPair.h:75
Constraint on the data type.
Constraint on the data type.
Header file for the Computation base class.
Header file for the SparseVector base class.
Header file for the VecScalarDivExpr base class.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_FLOATING_POINT_TYPE(T)
Constraint on the data type.
Definition: FloatingPoint.h:81
#define BLAZE_CONSTRAINT_MUST_BE_SAME_TYPE(A, B)
Data type constraint.
Definition: SameType.h:71
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:812
decltype(auto) inv(const DenseMatrix< MT, SO > &dm)
Calculation of the inverse of the given dense matrix.
Definition: DMatInvExpr.h:405
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.
Definition: RequiresEvaluation.h:81
#define BLAZE_CONSTRAINT_MUST_BE_VECTOR_WITH_TRANSPOSE_FLAG(T, TF)
Constraint on the data type.
Definition: TransposeFlag.h:63
#define BLAZE_CONSTRAINT_MUST_NOT_BE_ZERO_TYPE(T)
Constraint on the data type.
Definition: Zero.h:81
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_VECTOR_TYPE(T)
Constraint on the data type.
Definition: SparseVector.h:61
#define BLAZE_CONSTRAINT_MUST_BE_SCALAR_TYPE(T)
Constraint on the data type.
Definition: Scalar.h:61
#define BLAZE_CONSTRAINT_MUST_BE_ZERO_TYPE(T)
Constraint on the data type.
Definition: Zero.h:61
typename DivTrait< T1, T2 >::Type DivTrait_t
Auxiliary alias declaration for the DivTrait class template.
Definition: DivTrait.h:164
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition: Assert.h:101
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.
Definition: Assert.h:117
auto smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:162
auto smpMultAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs) -> EnableIf_t< IsDenseVector_v< VT1 > >
Default implementation of the SMP multiplication assignment of a vector to a dense vector.
Definition: DenseVector.h:192
auto smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:131
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition: EnableIf.h:138
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
typename If< Condition >::template Type< T1, T2 > If_t
Auxiliary alias template for the If class template.
Definition: If.h:108
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.
Definition: Exception.h:331
#define BLAZE_FUNCTION_TRACE
Function trace macro.
Definition: FunctionTrace.h:94
Header file for the exception macros of the math module.
Constraint on the data type.
Header file for all forward declarations for expression class templates.
Header file for the serial shim.
Base class for all compute expression templates.
Definition: Computation.h:68
Base class for all vector/scalar division expression templates.
Definition: VecScalarDivExpr.h:75
Header file for the IsZero type trait.
Header file for the RequiresEvaluation type trait.
Header file for basic type definitions.