Blaze 3.9
SVecDVecDivExpr.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_EXPRESSIONS_SVECDVECDIVEXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_SVECDVECDIVEXPR_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <iterator>
44#include <utility>
45#include <blaze/math/Aliases.h>
67#include <blaze/util/Assert.h>
68#include <blaze/util/EnableIf.h>
71#include <blaze/util/mpl/If.h>
72#include <blaze/util/mpl/Max.h>
73#include <blaze/util/Types.h>
75
76
77namespace blaze {
78
79//=================================================================================================
80//
81// CLASS SVECDVECDIVEXPR
82//
83//=================================================================================================
84
85//*************************************************************************************************
92template< typename VT1 // Type of the left-hand side sparse vector
93 , typename VT2 // Type of the right-hand side dense vector
94 , bool TF > // Transpose flag
96 : public VecVecDivExpr< SparseVector< SVecDVecDivExpr<VT1,VT2,TF>, TF > >
97 , private Computation
98{
99 private:
100 //**Type definitions****************************************************************************
107 //**********************************************************************************************
108
109 //**Return type evaluation**********************************************************************
111
116 static constexpr bool returnExpr = ( !IsTemporary_v<RN1> && !IsTemporary_v<RN2> );
117
119 using ExprReturnType = decltype( std::declval<RN1>() / std::declval<RN2>() );
120 //**********************************************************************************************
121
122 //**Evaluation strategy*************************************************************************
124
130 static constexpr bool useAssign = ( RequiresEvaluation_v<VT1> || RequiresEvaluation_v<VT2> );
131
134 template< typename VT >
135 static constexpr bool UseAssign_v = useAssign;
137 //**********************************************************************************************
138
139 public:
140 //**Type definitions****************************************************************************
143
146
150
153
156
158 using LeftOperand = If_t< IsExpression_v<VT1>, const VT1, const VT1& >;
159
161 using RightOperand = If_t< IsExpression_v<VT2>, const VT2, const VT2& >;
162 //**********************************************************************************************
163
164 //**Compilation flags***************************************************************************
166 static constexpr bool smpAssignable = false;
167 //**********************************************************************************************
168
169 //**ConstIterator class definition**************************************************************
173 {
174 public:
175 //**Type definitions*************************************************************************
178
181
182 using IteratorCategory = std::forward_iterator_tag;
186 using DifferenceType = ptrdiff_t;
187
188 // STL iterator requirements
194 //*******************************************************************************************
195
196 //**Constructor******************************************************************************
200 : it_ ( it ) // Iterator over the elements of the left-hand side sparse vector expression
201 , vec_( vec ) // Right-hand side dense vector expression
202 {}
203 //*******************************************************************************************
204
205 //**Prefix increment operator****************************************************************
211 ++it_;
212 return *this;
213 }
214 //*******************************************************************************************
215
216 //**Element access operator******************************************************************
221 inline const Element operator*() const {
222 return Element( it_->value() / vec_[it_->index()], it_->index() );
223 }
224 //*******************************************************************************************
225
226 //**Element access operator******************************************************************
231 inline const ConstIterator* operator->() const {
232 return this;
233 }
234 //*******************************************************************************************
235
236 //**Value function***************************************************************************
241 inline ReturnType value() const {
242 return it_->value() / vec_[it_->index()];
243 }
244 //*******************************************************************************************
245
246 //**Index function***************************************************************************
251 inline size_t index() const {
252 return it_->index();
253 }
254 //*******************************************************************************************
255
256 //**Equality operator************************************************************************
262 inline bool operator==( const ConstIterator& rhs ) const {
263 return it_ == rhs.it_;
264 }
265 //*******************************************************************************************
266
267 //**Inequality operator**********************************************************************
273 inline bool operator!=( const ConstIterator& rhs ) const {
274 return it_ != rhs.it_;
275 }
276 //*******************************************************************************************
277
278 //**Subtraction operator*********************************************************************
284 inline DifferenceType operator-( const ConstIterator& rhs ) const {
285 return it_ - rhs.it_;
286 }
287 //*******************************************************************************************
288
289 private:
290 //**Member variables*************************************************************************
293 //*******************************************************************************************
294 };
295 //**********************************************************************************************
296
297 //**Constructor*********************************************************************************
303 inline SVecDVecDivExpr( const VT1& lhs, const VT2& rhs ) noexcept
304 : lhs_( lhs ) // Left-hand side sparse vector of the division expression
305 , rhs_( rhs ) // Right-hand side dense vector of the division expression
306 {
307 BLAZE_INTERNAL_ASSERT( lhs.size() == rhs.size(), "Invalid vector sizes" );
308 }
309 //**********************************************************************************************
310
311 //**Subscript operator**************************************************************************
317 inline ReturnType operator[]( size_t index ) const {
318 BLAZE_INTERNAL_ASSERT( index < lhs_.size(), "Invalid vector access index" );
319 return lhs_[index] / rhs_[index];
320 }
321 //**********************************************************************************************
322
323 //**At function*********************************************************************************
330 inline ReturnType at( size_t index ) const {
331 if( index >= lhs_.size() ) {
332 BLAZE_THROW_OUT_OF_RANGE( "Invalid vector access index" );
333 }
334 return (*this)[index];
335 }
336 //**********************************************************************************************
337
338 //**Begin function******************************************************************************
343 inline ConstIterator begin() const {
344 return ConstIterator( lhs_.begin(), rhs_ );
345 }
346 //**********************************************************************************************
347
348 //**End function********************************************************************************
353 inline ConstIterator end() const {
354 return ConstIterator( lhs_.end(), rhs_ );
355 }
356 //**********************************************************************************************
357
358 //**Size function*******************************************************************************
363 inline size_t size() const noexcept {
364 return rhs_.size();
365 }
366 //**********************************************************************************************
367
368 //**NonZeros function***************************************************************************
373 inline size_t nonZeros() const {
374 return lhs_.nonZeros();
375 }
376 //**********************************************************************************************
377
378 //**Find function*******************************************************************************
384 inline ConstIterator find( size_t index ) const {
386 return ConstIterator( lhs_.find( index ), rhs_ );
387 }
388 //**********************************************************************************************
389
390 //**LowerBound function*************************************************************************
396 inline ConstIterator lowerBound( size_t index ) const {
398 return ConstIterator( lhs_.lowerBound( index ), rhs_ );
399 }
400 //**********************************************************************************************
401
402 //**UpperBound function*************************************************************************
408 inline ConstIterator upperBound( size_t index ) const {
410 return ConstIterator( lhs_.upperBound( index ), rhs_ );
411 }
412 //**********************************************************************************************
413
414 //**Left operand access*************************************************************************
419 inline LeftOperand leftOperand() const noexcept {
420 return lhs_;
421 }
422 //**********************************************************************************************
423
424 //**Right operand access************************************************************************
429 inline RightOperand rightOperand() const noexcept {
430 return rhs_;
431 }
432 //**********************************************************************************************
433
434 //**********************************************************************************************
440 template< typename T >
441 inline bool canAlias( const T* alias ) const noexcept {
442 return ( lhs_.canAlias( alias ) ) || ( rhs_.canAlias( alias ) );
443 }
444 //**********************************************************************************************
445
446 //**********************************************************************************************
452 template< typename T >
453 inline bool isAliased( const T* alias ) const noexcept {
454 return ( lhs_.isAliased( alias ) ) || ( rhs_.isAliased( alias ) );
455 }
456 //**********************************************************************************************
457
458 private:
459 //**Member variables****************************************************************************
462 //**********************************************************************************************
463
464 //**Assignment to dense vectors*****************************************************************
478 template< typename VT > // Type of the target dense vector
479 friend inline auto assign( DenseVector<VT,TF>& lhs, const SVecDVecDivExpr& rhs )
481 {
483
484 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
485
486 CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
487 CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side dense vector operand
488
489 BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
490 BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
491 BLAZE_INTERNAL_ASSERT( x.size() == (*lhs).size() , "Invalid vector size" );
492
493 for( auto element=x.begin(); element!=x.end(); ++element )
494 (*lhs)[element->index()] = element->value() / y[element->index()];
495 }
497 //**********************************************************************************************
498
499 //**Assignment to sparse vectors****************************************************************
513 template< typename VT > // Type of the target sparse vector
514 friend inline auto assign( SparseVector<VT,TF>& lhs, const SVecDVecDivExpr& rhs )
516 {
518
519 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
520
521 CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
522 CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side dense vector operand
523
524 BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
525 BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
526 BLAZE_INTERNAL_ASSERT( x.size() == (*lhs).size() , "Invalid vector size" );
527
528 // Final memory allocation (based on the evaluated operands)
529 (*lhs).reserve( x.nonZeros() );
530
531 // Performing the vector division
532 for( auto element=x.begin(); element!=x.end(); ++element )
533 (*lhs).append( element->index(), element->value() / y[element->index()] );
534 }
536 //**********************************************************************************************
537
538 //**Addition assignment to dense vectors********************************************************
552 template< typename VT > // Type of the target dense vector
553 friend inline auto addAssign( DenseVector<VT,TF>& lhs, const SVecDVecDivExpr& rhs )
554 -> EnableIf_t< UseAssign_v<VT> >
555 {
557
558 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
559
560 CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
561 CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side dense vector operand
562
563 BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
564 BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
565 BLAZE_INTERNAL_ASSERT( x.size() == (*lhs).size() , "Invalid vector size" );
566
567 for( auto element=x.begin(); element!=x.end(); ++element )
568 (*lhs)[element->index()] += element->value() / y[element->index()];
569 }
571 //**********************************************************************************************
572
573 //**Addition assignment to sparse vectors*******************************************************
574 // No special implementation for the addition assignment to sparse vectors.
575 //**********************************************************************************************
576
577 //**Subtraction assignment to dense vectors*****************************************************
591 template< typename VT > // Type of the target dense vector
592 friend inline auto subAssign( DenseVector<VT,TF>& lhs, const SVecDVecDivExpr& rhs )
593 -> EnableIf_t< UseAssign_v<VT> >
594 {
596
597 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
598
599 CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
600 CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side dense vector operand
601
602 BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
603 BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
604 BLAZE_INTERNAL_ASSERT( x.size() == (*lhs).size() , "Invalid vector size" );
605
606 for( auto element=x.begin(); element!=x.end(); ++element )
607 (*lhs)[element->index()] -= element->value() / y[element->index()];
608 }
610 //**********************************************************************************************
611
612 //**Subtraction assignment to sparse vectors****************************************************
613 // No special implementation for the subtraction assignment to sparse vectors.
614 //**********************************************************************************************
615
616 //**Multiplication assignment to dense vectors**************************************************
630 template< typename VT > // Type of the target dense vector
631 friend inline auto multAssign( DenseVector<VT,TF>& lhs, const SVecDVecDivExpr& rhs )
632 -> EnableIf_t< UseAssign_v<VT> >
633 {
635
636 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
637
638 CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
639 CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side dense vector operand
640
641 BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
642 BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
643 BLAZE_INTERNAL_ASSERT( x.size() == (*lhs).size() , "Invalid vector size" );
644
645 const auto end( x.end() );
646 auto begin( x.begin() );
647 size_t i( 0UL );
648
649 for( ; begin!=end; ++begin ) {
650 const size_t index( begin->index() );
651 for( ; i<index; ++i )
652 reset( (*lhs)[i] );
653 (*lhs)[index] *= begin->value() / y[index];
654 ++i;
655 }
656
657 for( ; i<rhs.size(); ++i )
658 reset( (*lhs)[i] );
659 }
661 //**********************************************************************************************
662
663 //**Multiplication assignment to sparse vectors*************************************************
664 // No special implementation for the multiplication assignment to sparse vectors.
665 //**********************************************************************************************
666
667 //**Compile time checks*************************************************************************
676 //**********************************************************************************************
677};
678//*************************************************************************************************
679
680
681
682
683//=================================================================================================
684//
685// GLOBAL BINARY ARITHMETIC OPERATORS
686//
687//=================================================================================================
688
689//*************************************************************************************************
702template< typename VT1 // Type of the left-hand side sparse vector
703 , typename VT2 // Type of the right-hand side dense vector
704 , bool TF // Transpose flag
705 , DisableIf_t< IsZero_v<VT1> >* = nullptr >
706inline const SVecDVecDivExpr<VT1,VT2,TF>
707 svecdvecdiv( const SparseVector<VT1,TF>& lhs, const DenseVector<VT2,TF>& rhs )
708{
710
711 BLAZE_INTERNAL_ASSERT( (*lhs).size() == (*rhs).size(), "Invalid vector sizes" );
712
713 return SVecDVecDivExpr<VT1,VT2,TF>( *lhs, *rhs );
714}
716//*************************************************************************************************
717
718
719//*************************************************************************************************
732template< typename VT1 // Type of the left-hand side sparse vector
733 , typename VT2 // Type of the right-hand side dense vector
734 , bool TF // Transpose flag
735 , EnableIf_t< IsZero_v<VT1> >* = nullptr >
736inline decltype(auto)
737 svecdvecdiv( const SparseVector<VT1,TF>& lhs, const DenseVector<VT2,TF>& rhs )
738{
740
741 MAYBE_UNUSED( rhs );
742
743 BLAZE_INTERNAL_ASSERT( (*lhs).size() == (*rhs).size(), "Invalid vector sizes" );
744
745 using ReturnType = const DivTrait_t< ResultType_t<VT1>, ResultType_t<VT2> >;
746
749
750 return ReturnType( (*lhs).size() );
751}
753//*************************************************************************************************
754
755
756//*************************************************************************************************
782template< typename VT1 // Type of the left-hand side sparse vector
783 , typename VT2 // Type of the right-hand side dense vector
784 , bool TF > // Transpose flag
785inline decltype(auto)
786 operator/( const SparseVector<VT1,TF>& lhs, const DenseVector<VT2,TF>& rhs )
787{
789
790 if( (*lhs).size() != (*rhs).size() ) {
791 BLAZE_THROW_INVALID_ARGUMENT( "Vector sizes do not match" );
792 }
793
794 return svecdvecdiv( *lhs, *rhs );
795}
796//*************************************************************************************************
797
798
799
800
801//=================================================================================================
802//
803// SIZE SPECIALIZATIONS
804//
805//=================================================================================================
806
807//*************************************************************************************************
809template< typename VT1, typename VT2, bool TF >
810struct Size< SVecDVecDivExpr<VT1,VT2,TF>, 0UL >
811 : public Max_t< Size<VT1,0UL>, Size<VT2,0UL> >
812{};
814//*************************************************************************************************
815
816} // namespace blaze
817
818#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.
Header file for the function trace functionality.
Header file for the If class template.
Header file for the IsExpression type trait class.
Header file for the IsTemporary type trait class.
Deactivation of problematic macros.
Header file for the MAYBE_UNUSED function template.
Header file for the RemoveReference 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-dense vector division expression.
Definition: SVecDVecDivExpr.h:173
RightOperand vec_
Right-hand side dense vector expression.
Definition: SVecDVecDivExpr.h:292
ValueType & ReferenceType
Reference return type.
Definition: SVecDVecDivExpr.h:185
ConstIterator_t< RemoveReference_t< LeftOperand > > IteratorType
Iterator type of the sparse vector expression.
Definition: SVecDVecDivExpr.h:180
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: SVecDVecDivExpr.h:186
size_t index() const
Access to the current index of the sparse element.
Definition: SVecDVecDivExpr.h:251
ReferenceType reference
Reference return type.
Definition: SVecDVecDivExpr.h:192
const ConstIterator * operator->() const
Direct access to the sparse vector element at the current iterator position.
Definition: SVecDVecDivExpr.h:231
ValueType value_type
Type of the underlying pointers.
Definition: SVecDVecDivExpr.h:190
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: SVecDVecDivExpr.h:262
ElementType ValueType
Type of the underlying pointers.
Definition: SVecDVecDivExpr.h:183
PointerType pointer
Pointer return type.
Definition: SVecDVecDivExpr.h:191
DifferenceType difference_type
Difference between two iterators.
Definition: SVecDVecDivExpr.h:193
std::forward_iterator_tag IteratorCategory
The iterator category.
Definition: SVecDVecDivExpr.h:182
IteratorType it_
Iterator over the elements of the left-hand side sparse vector expression.
Definition: SVecDVecDivExpr.h:291
ValueType * PointerType
Pointer return type.
Definition: SVecDVecDivExpr.h:184
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: SVecDVecDivExpr.h:273
IteratorCategory iterator_category
The iterator category.
Definition: SVecDVecDivExpr.h:189
ValueIndexPair< ElementType > Element
Element type of the sparse vector expression.
Definition: SVecDVecDivExpr.h:177
const Element operator*() const
Direct access to the sparse vector element at the current iterator position.
Definition: SVecDVecDivExpr.h:221
ConstIterator(IteratorType it, RightOperand vec)
Constructor for the ConstIterator class.
Definition: SVecDVecDivExpr.h:199
ConstIterator & operator++()
Pre-increment operator.
Definition: SVecDVecDivExpr.h:210
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two expression iterators.
Definition: SVecDVecDivExpr.h:284
ReturnType value() const
Access to the current value of the sparse element.
Definition: SVecDVecDivExpr.h:241
Expression object for sparse vector-dense vector divisions.
Definition: SVecDVecDivExpr.h:98
SVecDVecDivExpr(const VT1 &lhs, const VT2 &rhs) noexcept
Constructor for the SVecDVecDivExpr class.
Definition: SVecDVecDivExpr.h:303
size_t nonZeros() const
Returns the number of non-zero elements in the sparse vector.
Definition: SVecDVecDivExpr.h:373
If_t< IsExpression_v< VT2 >, const VT2, const VT2 & > RightOperand
Composite type of the right-hand side dense vector expression.
Definition: SVecDVecDivExpr.h:161
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: SVecDVecDivExpr.h:441
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: SVecDVecDivExpr.h:166
decltype(std::declval< RN1 >()/std::declval< RN2 >()) ExprReturnType
Expression return type for the subscript operator.
Definition: SVecDVecDivExpr.h:119
ConstIterator lowerBound(size_t index) const
Returns an iterator to the first index not less then the given index.
Definition: SVecDVecDivExpr.h:396
ConstIterator begin() const
Returns an iterator to the first non-zero element of the sparse vector.
Definition: SVecDVecDivExpr.h:343
ConstIterator upperBound(size_t index) const
Returns an iterator to the first index greater then the given index.
Definition: SVecDVecDivExpr.h:408
ElementType_t< ResultType > ElementType
Resulting element type.
Definition: SVecDVecDivExpr.h:149
static constexpr bool returnExpr
Compilation switch for the selection of the subscript operator return type.
Definition: SVecDVecDivExpr.h:116
RightOperand rhs_
Right-hand side dense vector of the division expression.
Definition: SVecDVecDivExpr.h:461
ReturnType_t< VT1 > RN1
Return type of the left-hand side sparse vector expression.
Definition: SVecDVecDivExpr.h:103
If_t< IsExpression_v< VT1 >, const VT1, const VT1 & > LeftOperand
Composite type of the left-hand side sparse vector expression.
Definition: SVecDVecDivExpr.h:158
If_t< useAssign, const ResultType, const SVecDVecDivExpr & > CompositeType
Data type for composite expression templates.
Definition: SVecDVecDivExpr.h:155
ConstIterator find(size_t index) const
Searches for a specific vector element.
Definition: SVecDVecDivExpr.h:384
LeftOperand lhs_
Left-hand side sparse vector of the division expression.
Definition: SVecDVecDivExpr.h:460
RightOperand rightOperand() const noexcept
Returns the right-hand side dense vector operand.
Definition: SVecDVecDivExpr.h:429
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: SVecDVecDivExpr.h:453
DivTrait_t< RT1, RT2 > ResultType
Result type for expression template evaluations.
Definition: SVecDVecDivExpr.h:147
ResultType_t< VT1 > RT1
Result type of the left-hand side sparse vector expression.
Definition: SVecDVecDivExpr.h:101
static constexpr bool useAssign
Compilation switch for the evaluation strategy of the division expression.
Definition: SVecDVecDivExpr.h:130
ReturnType_t< VT2 > RN2
Return type of the right-hand side dense vector expression.
Definition: SVecDVecDivExpr.h:104
size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition: SVecDVecDivExpr.h:363
CompositeType_t< VT2 > CT2
Composite type of the right-hand side dense vector expression.
Definition: SVecDVecDivExpr.h:106
ConstIterator end() const
Returns an iterator just past the last non-zero element of the sparse vector.
Definition: SVecDVecDivExpr.h:353
LeftOperand leftOperand() const noexcept
Returns the left-hand side sparse vector operand.
Definition: SVecDVecDivExpr.h:419
ResultType_t< VT2 > RT2
Result type of the right-hand side dense vector expression.
Definition: SVecDVecDivExpr.h:102
const If_t< returnExpr, ExprReturnType, ElementType > ReturnType
Return type for expression template evaluations.
Definition: SVecDVecDivExpr.h:152
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: SVecDVecDivExpr.h:330
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: SVecDVecDivExpr.h:317
CompositeType_t< VT1 > CT1
Composite type of the left-hand side sparse vector expression.
Definition: SVecDVecDivExpr.h:105
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: SVecDVecDivExpr.h:148
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.
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 VecVecDivExpr base class.
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:812
#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_FORM_VALID_VECVECDIVEXPR(T1, T2)
Constraint on the data type.
Definition: VecVecDivExpr.h:104
#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_DENSE_VECTOR_TYPE(T)
Constraint on the data type.
Definition: DenseVector.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
constexpr void reset(Matrix< MT, SO > &matrix)
Resetting the given matrix.
Definition: Matrix.h:806
If_t< Less_t< T1, T2 >::value, T2, T1 > Max_t
Compile time value evaluation.
Definition: Max.h:73
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition: Assert.h:101
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_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.
Definition: Exception.h:235
#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 Size type trait.
Header file for the reset shim.
Header file for the serial shim.
Base class for all compute expression templates.
Definition: Computation.h:68
Base class for all vector/vector division expression templates.
Definition: VecVecDivExpr.h:68
Header file for the IsZero type trait.
Header file for the RequiresEvaluation type trait.
Header file for basic type definitions.
Header file for the Max_t alias template.