Blaze 3.9
SVecSVecSubExpr.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_EXPRESSIONS_SVECSVECSUBEXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_SVECSVECSUBEXPR_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <utility>
44#include <blaze/math/Aliases.h>
64#include <blaze/util/Assert.h>
65#include <blaze/util/EnableIf.h>
68#include <blaze/util/mpl/If.h>
69#include <blaze/util/Types.h>
71
72
73namespace blaze {
74
75//=================================================================================================
76//
77// CLASS SVECSVECSUBEXPR
78//
79//=================================================================================================
80
81//*************************************************************************************************
88template< typename VT1 // Type of the left-hand side sparse vector
89 , typename VT2 // Type of the right-hand side sparse vector
90 , bool TF > // Transpose flag
92 : public VecVecSubExpr< SparseVector< SVecSVecSubExpr<VT1,VT2,TF>, TF > >
93 , private Computation
94{
95 private:
96 //**Type definitions****************************************************************************
103 //**********************************************************************************************
104
105 //**Return type evaluation**********************************************************************
107
112 static constexpr bool returnExpr = ( !IsTemporary_v<RN1> && !IsTemporary_v<RN2> );
113
115 using ExprReturnType = decltype( std::declval<RN1>() - std::declval<RN2>() );
116 //**********************************************************************************************
117
118 //**Parallel evaluation strategy****************************************************************
120
125 template< typename VT >
126 static constexpr bool UseSMPAssign_v = VT::smpAssignable;
128 //**********************************************************************************************
129
130 public:
131 //**Type definitions****************************************************************************
134
137
141
144
147
149 using LeftOperand = If_t< IsExpression_v<VT1>, const VT1, const VT1& >;
150
152 using RightOperand = If_t< IsExpression_v<VT2>, const VT2, const VT2& >;
153 //**********************************************************************************************
154
155 //**Compilation flags***************************************************************************
157 static constexpr bool smpAssignable = false;
158 //**********************************************************************************************
159
160 //**Constructor*********************************************************************************
163 inline SVecSVecSubExpr( const VT1& lhs, const VT2& rhs ) noexcept
164 : lhs_( lhs ) // Left-hand side sparse vector of the subtraction expression
165 , rhs_( rhs ) // Right-hand side sparse vector of the subtraction expression
166 {
167 BLAZE_INTERNAL_ASSERT( lhs.size() == rhs.size(), "Invalid vector sizes" );
168 }
169 //**********************************************************************************************
170
171 //**Subscript operator**************************************************************************
177 inline ReturnType operator[]( size_t index ) const {
178 BLAZE_INTERNAL_ASSERT( index < lhs_.size(), "Invalid vector access index" );
179 return lhs_[index] - rhs_[index];
180 }
181 //**********************************************************************************************
182
183 //**At function*********************************************************************************
190 inline ReturnType at( size_t index ) const {
191 if( index >= lhs_.size() ) {
192 BLAZE_THROW_OUT_OF_RANGE( "Invalid vector access index" );
193 }
194 return (*this)[index];
195 }
196 //**********************************************************************************************
197
198 //**Size function*******************************************************************************
203 inline size_t size() const noexcept {
204 return lhs_.size();
205 }
206 //**********************************************************************************************
207
208 //**NonZeros function***************************************************************************
213 inline size_t nonZeros() const {
214 return min( lhs_.size(), lhs_.nonZeros() + rhs_.nonZeros() );
215 }
216 //**********************************************************************************************
217
218 //**Left operand access*************************************************************************
223 inline LeftOperand leftOperand() const noexcept {
224 return lhs_;
225 }
226 //**********************************************************************************************
227
228 //**Right operand access************************************************************************
233 inline RightOperand rightOperand() const noexcept {
234 return rhs_;
235 }
236 //**********************************************************************************************
237
238 //**********************************************************************************************
244 template< typename T >
245 inline bool canAlias( const T* alias ) const noexcept {
246 return ( lhs_.canAlias( alias ) || rhs_.canAlias( alias ) );
247 }
248 //**********************************************************************************************
249
250 //**********************************************************************************************
256 template< typename T >
257 inline bool isAliased( const T* alias ) const noexcept {
258 return ( lhs_.isAliased( alias ) || rhs_.isAliased( alias ) );
259 }
260 //**********************************************************************************************
261
262 private:
263 //**Member variables****************************************************************************
266 //**********************************************************************************************
267
268 //**Default assignment to dense vectors*********************************************************
281 template< typename VT > // Type of the target dense vector
282 friend inline auto assign( DenseVector<VT,TF>& lhs, const SVecSVecSubExpr& rhs )
284 {
286
287 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
288
289 CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
290 CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
291
292 BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
293 BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
294 BLAZE_INTERNAL_ASSERT( x.size() == (*lhs).size() , "Invalid vector size" );
295
296 const auto lend( x.end() );
297 const auto rend( y.end() );
298
299 for( auto l=x.begin(); l!=lend; ++l ) {
300 (*lhs)[l->index()] = l->value();
301 }
302
303 for( auto r=y.begin(); r!=rend; ++r ) {
304 if( isDefault( (*lhs)[r->index()] ) )
305 (*lhs)[r->index()] = -r->value();
306 else
307 (*lhs)[r->index()] -= r->value();
308 }
309 }
311 //**********************************************************************************************
312
313 //**Optimized assignment to dense vectors*******************************************************
326 template< typename VT > // Type of the target dense vector
327 friend inline auto assign( DenseVector<VT,TF>& lhs, const SVecSVecSubExpr& rhs )
329 {
331
332 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
333
334 CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
335 CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
336
337 BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
338 BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
339 BLAZE_INTERNAL_ASSERT( x.size() == (*lhs).size() , "Invalid vector size" );
340
341 const auto lend( x.end() );
342 const auto rend( y.end() );
343
344 for( auto l=x.begin(); l!=lend; ++l ) {
345 (*lhs)[l->index()] = l->value();
346 }
347
348 for( auto r=y.begin(); r!=rend; ++r ) {
349 (*lhs)[r->index()] -= r->value();
350 }
351 }
353 //**********************************************************************************************
354
355 //**Assignment to sparse vectors****************************************************************
367 template< typename VT > // Type of the target sparse vector
368 friend inline void assign( SparseVector<VT,TF>& lhs, const SVecSVecSubExpr& rhs )
369 {
371
372 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
373
374 CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
375 CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
376
377 BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
378 BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
379 BLAZE_INTERNAL_ASSERT( x.size() == (*lhs).size() , "Invalid vector size" );
380
381 // Final memory allocation (based on the evaluated operands)
382 (*lhs).reserve( min( x.size(), x.nonZeros() + y.nonZeros() ) );
383
384 // Performing the vector subtraction
385 const auto lend( x.end() );
386 const auto rend( y.end() );
387
388 auto l( x.begin() );
389 auto r( y.begin() );
390
391 while( l != lend && r != rend )
392 {
393 if( l->index() < r->index() ) {
394 (*lhs).append( l->index(), l->value() );
395 ++l;
396 }
397 else if( l->index() > r->index() ) {
398 (*lhs).append( r->index(), -r->value() );
399 ++r;
400 }
401 else {
402 (*lhs).append( l->index(), l->value() - r->value() );
403 ++l;
404 ++r;
405 }
406 }
407
408 while( l != lend ) {
409 (*lhs).append( l->index(), l->value() );
410 ++l;
411 }
412
413 while( r != rend ) {
414 (*lhs).append( r->index(), -r->value() );
415 ++r;
416 }
417 }
419 //**********************************************************************************************
420
421 //**Addition assignment to dense vectors********************************************************
433 template< typename VT > // Type of the target dense vector
434 friend inline void addAssign( DenseVector<VT,TF>& lhs, const SVecSVecSubExpr& rhs )
435 {
437
438 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
439
440 addAssign( *lhs, rhs.lhs_ );
441 subAssign( *lhs, rhs.rhs_ );
442 }
444 //**********************************************************************************************
445
446 //**Addition assignment to sparse vectors*******************************************************
447 // No special implementation for the addition assignment to sparse vectors.
448 //**********************************************************************************************
449
450 //**Subtraction assignment to dense vectors*****************************************************
462 template< typename VT > // Type of the target dense vector
463 friend inline void subAssign( DenseVector<VT,TF>& lhs, const SVecSVecSubExpr& rhs )
464 {
466
467 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
468
469 subAssign( *lhs, rhs.lhs_ );
470 addAssign( *lhs, rhs.rhs_ );
471 }
473 //**********************************************************************************************
474
475 //**Subtraction assignment to sparse vectors****************************************************
476 // No special implementation for the subtraction assignment to sparse vectors.
477 //**********************************************************************************************
478
479 //**Multiplication assignment to dense vectors**************************************************
491 template< typename VT > // Type of the target dense vector
492 friend inline void multAssign( DenseVector<VT,TF>& lhs, const SVecSVecSubExpr& rhs )
493 {
495
499
500 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
501
502 const ResultType tmp( serial( rhs ) );
503 multAssign( *lhs, tmp );
504 }
506 //**********************************************************************************************
507
508 //**Multiplication assignment to sparse vectors*************************************************
509 // No special implementation for the multiplication assignment to sparse vectors.
510 //**********************************************************************************************
511
512 //**SMP assignment to dense vectors*************************************************************
513 // No special implementation for the SMP assignment to dense vectors.
514 //**********************************************************************************************
515
516 //**SMP assignment to sparse vectors************************************************************
517 // No special implementation for the SMP assignment to sparse vectors.
518 //**********************************************************************************************
519
520 //**SMP addition assignment to dense vectors****************************************************
534 template< typename VT > // Type of the target dense vector
535 friend inline auto smpAddAssign( DenseVector<VT,TF>& lhs, const SVecSVecSubExpr& rhs )
536 -> EnableIf_t< UseSMPAssign_v<VT> >
537 {
539
540 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
541
542 smpAddAssign( *lhs, rhs.lhs_ );
543 smpSubAssign( *lhs, rhs.rhs_ );
544 }
546 //**********************************************************************************************
547
548 //**SMP addition assignment to sparse vectors***************************************************
549 // No special implementation for the SMP addition assignment to sparse vectors.
550 //**********************************************************************************************
551
552 //**SMP subtraction assignment to dense vectors*************************************************
567 template< typename VT > // Type of the target dense vector
568 friend inline auto smpSubAssign( DenseVector<VT,TF>& lhs, const SVecSVecSubExpr& rhs )
569 -> EnableIf_t< UseSMPAssign_v<VT> >
570 {
572
573 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
574
575 smpSubAssign( *lhs, rhs.lhs_ );
576 smpAddAssign( *lhs, rhs.rhs_ );
577 }
579 //**********************************************************************************************
580
581 //**SMP subtraction assignment to sparse vectors************************************************
582 // No special implementation for the SMP subtraction assignment to sparse vectors.
583 //**********************************************************************************************
584
585 //**SMP multiplication assignment to dense vectors**********************************************
600 template< typename VT > // Type of the target dense vector
601 friend inline auto smpMultAssign( DenseVector<VT,TF>& lhs, const SVecSVecSubExpr& rhs )
602 -> EnableIf_t< UseSMPAssign_v<VT> >
603 {
605
609
610 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
611
612 const ResultType tmp( rhs );
613 smpMultAssign( *lhs, tmp );
614 }
616 //**********************************************************************************************
617
618 //**SMP multiplication assignment to sparse vectors*********************************************
619 // No special implementation for the SMP multiplication assignment to sparse vectors.
620 //**********************************************************************************************
621
622 //**Compile time checks*************************************************************************
630 //**********************************************************************************************
631};
632//*************************************************************************************************
633
634
635
636
637//=================================================================================================
638//
639// GLOBAL BINARY ARITHMETIC OPERATORS
640//
641//=================================================================================================
642
643//*************************************************************************************************
655template< typename VT1 // Type of the left-hand side sparse vector
656 , typename VT2 // Type of the right-hand side sparse vector
657 , bool TF // Transpose flag
658 , DisableIf_t< ( ( IsZero_v<VT1> || IsZero_v<VT2> ) &&
659 IsSame_v< ElementType_t<VT1>, ElementType_t<VT2> > ) ||
660 ( IsZero_v<VT1> && IsZero_v<VT2> ) >* = nullptr >
661inline const SVecSVecSubExpr<VT1,VT2,TF>
662 svecsvecsub( const SparseVector<VT1,TF>& lhs, const SparseVector<VT2,TF>& rhs )
663{
665
666 BLAZE_INTERNAL_ASSERT( (*lhs).size() == (*rhs).size(), "Invalid vector sizes" );
667
668 return SVecSVecSubExpr<VT1,VT2,TF>( *lhs, *rhs );
669}
671//*************************************************************************************************
672
673
674//*************************************************************************************************
687template< typename VT1 // Type of the left-hand side sparse vector
688 , typename VT2 // Type of the right-hand side sparse vector
689 , bool TF // Transpose flag
690 , EnableIf_t< !IsZero_v<VT1> && IsZero_v<VT2> &&
691 IsSame_v< ElementType_t<VT1>, ElementType_t<VT2> > >* = nullptr >
692inline const VT1&
693 svecsvecsub( const SparseVector<VT1,TF>& lhs, const SparseVector<VT2,TF>& rhs )
694{
696
697 MAYBE_UNUSED( rhs );
698
699 BLAZE_INTERNAL_ASSERT( (*lhs).size() == (*rhs).size(), "Invalid vector sizes" );
700
701 return (*lhs);
702}
704//*************************************************************************************************
705
706
707//*************************************************************************************************
720template< typename VT1 // Type of the left-hand side sparse vector
721 , typename VT2 // Type of the right-hand side sparse vector
722 , bool TF // Transpose flag
723 , EnableIf_t< IsZero_v<VT1> && !IsZero_v<VT2> &&
724 IsSame_v< ElementType_t<VT1>, ElementType_t<VT2> > >* = nullptr >
725inline decltype(auto)
726 svecsvecsub( const SparseVector<VT1,TF>& lhs, const SparseVector<VT2,TF>& rhs )
727{
729
730 MAYBE_UNUSED( lhs );
731
732 BLAZE_INTERNAL_ASSERT( (*lhs).size() == (*rhs).size(), "Invalid vector sizes" );
733
734 return -(*rhs);
735}
737//*************************************************************************************************
738
739
740//*************************************************************************************************
752template< typename VT1 // Type of the left-hand side sparse vector
753 , typename VT2 // Type of the right-hand side sparse vector
754 , bool TF // Transpose flag
755 , EnableIf_t< IsZero_v<VT1> && IsZero_v<VT2> >* = nullptr >
756inline decltype(auto)
757 svecsvecsub( const SparseVector<VT1,TF>& lhs, const SparseVector<VT2,TF>& rhs )
758{
760
761 MAYBE_UNUSED( rhs );
762
763 BLAZE_INTERNAL_ASSERT( (*lhs).size() == (*rhs).size(), "Invalid vector sizes" );
764
765 using ReturnType = const SubTrait_t< ResultType_t<VT1>, ResultType_t<VT2> >;
766
769
770 return ReturnType( (*lhs).size() );
771}
773//*************************************************************************************************
774
775
776//*************************************************************************************************
800template< typename VT1 // Type of the left-hand side sparse vector
801 , typename VT2 // Type of the right-hand side sparse vector
802 , bool TF > // Transpose flag
803inline decltype(auto)
804 operator-( const SparseVector<VT1,TF>& lhs, const SparseVector<VT2,TF>& rhs )
805{
807
808 if( (*lhs).size() != (*rhs).size() ) {
809 BLAZE_THROW_INVALID_ARGUMENT( "Vector sizes do not match" );
810 }
811
812 return svecsvecsub( *lhs, *rhs );
813}
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::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 EnableIf class template.
Header file for the function trace functionality.
Header file for the If class template.
Header file for the isDefault shim.
Header file for the IsExpression type trait class.
Header file for the IsResizable type trait.
Header file for the IsSame and IsStrictlySame type traits.
Header file for the IsTemporary type trait class.
Deactivation of problematic macros.
Header file for the MAYBE_UNUSED function template.
Header file for the subtraction trait.
Constraint on the data type.
Base class for N-dimensional dense vectors.
Definition: DenseVector.h:77
Expression object for sparse vector-sparse vector subtractions.
Definition: SVecSVecSubExpr.h:94
CompositeType_t< VT2 > CT2
Composite type of the right-hand side sparse vector expression.
Definition: SVecSVecSubExpr.h:102
LeftOperand lhs_
Left-hand side sparse vector of the subtraction expression.
Definition: SVecSVecSubExpr.h:264
SVecSVecSubExpr(const VT1 &lhs, const VT2 &rhs) noexcept
Constructor for the SVecSVecSubExpr class.
Definition: SVecSVecSubExpr.h:163
ResultType_t< VT2 > RT2
Result type of the right-hand side sparse vector expression.
Definition: SVecSVecSubExpr.h:98
ReturnType_t< VT1 > RN1
Return type of the left-hand side sparse vector expression.
Definition: SVecSVecSubExpr.h:99
size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition: SVecSVecSubExpr.h:203
If_t< IsExpression_v< VT1 >, const VT1, const VT1 & > LeftOperand
Composite type of the left-hand side sparse vector expression.
Definition: SVecSVecSubExpr.h:149
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: SVecSVecSubExpr.h:257
LeftOperand leftOperand() const noexcept
Returns the left-hand side sparse vector operand.
Definition: SVecSVecSubExpr.h:223
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: SVecSVecSubExpr.h:177
static constexpr bool returnExpr
Compilation switch for the selection of the subscript operator return type.
Definition: SVecSVecSubExpr.h:112
SubTrait_t< RT1, RT2 > ResultType
Result type for expression template evaluations.
Definition: SVecSVecSubExpr.h:138
const ResultType CompositeType
Data type for composite expression templates.
Definition: SVecSVecSubExpr.h:146
const If_t< returnExpr, ExprReturnType, ElementType > ReturnType
Return type for expression template evaluations.
Definition: SVecSVecSubExpr.h:143
ElementType_t< ResultType > ElementType
Resulting element type.
Definition: SVecSVecSubExpr.h:140
RightOperand rightOperand() const noexcept
Returns the right-hand side sparse vector operand.
Definition: SVecSVecSubExpr.h:233
decltype(std::declval< RN1 >() - std::declval< RN2 >()) ExprReturnType
Expression return type for the subscript operator.
Definition: SVecSVecSubExpr.h:115
CompositeType_t< VT1 > CT1
Composite type of the left-hand side sparse vector expression.
Definition: SVecSVecSubExpr.h:101
RightOperand rhs_
Right-hand side sparse vector of the subtraction expression.
Definition: SVecSVecSubExpr.h:265
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: SVecSVecSubExpr.h:245
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: SVecSVecSubExpr.h:190
ReturnType_t< VT2 > RN2
Return type of the right-hand side sparse vector expression.
Definition: SVecSVecSubExpr.h:100
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: SVecSVecSubExpr.h:157
size_t nonZeros() const
Returns the number of non-zero elements in the sparse vector.
Definition: SVecSVecSubExpr.h:213
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: SVecSVecSubExpr.h:139
If_t< IsExpression_v< VT2 >, const VT2, const VT2 & > RightOperand
Composite type of the right-hand side sparse vector expression.
Definition: SVecSVecSubExpr.h:152
ResultType_t< VT1 > RT1
Result type of the left-hand side sparse vector expression.
Definition: SVecSVecSubExpr.h:97
Base class for sparse vectors.
Definition: SparseVector.h:72
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 VecVecSubExpr base class.
decltype(auto) min(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise minimum of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1339
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:812
bool isDefault(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the given diagonal matrix is in default state.
Definition: DiagonalMatrix.h:169
#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_VECVECSUBEXPR(T1, T2)
Constraint on the data type.
Definition: VecVecSubExpr.h:104
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_VECTOR_TYPE(T)
Constraint on the data type.
Definition: SparseVector.h:61
#define BLAZE_CONSTRAINT_MUST_BE_ZERO_TYPE(T)
Constraint on the data type.
Definition: Zero.h:61
typename SubTrait< T1, T2 >::Type SubTrait_t
Auxiliary alias declaration for the SubTrait class template.
Definition: SubTrait.h:163
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition: Assert.h:101
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
constexpr bool IsSame_v
Auxiliary variable template for the IsSame type trait.
Definition: IsSame.h:159
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
typename EnableIf<!Condition, T >::Type DisableIf_t
Auxiliary type for the EnableIf class template.
Definition: EnableIf.h:175
#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/vector subtraction expression templates.
Definition: VecVecSubExpr.h:68
Header file for the IsZero type trait.
Header file for basic type definitions.
Header file for the generic min algorithm.