35#ifndef _BLAZE_MATH_EXPRESSIONS_TDMATSVECMULTEXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_TDMATSVECMULTEXPR_H_
109 :
public MatVecMultExpr< DenseVector< TDMatSVecMultExpr<MT,VT>, false > >
129 static constexpr bool evaluateVector = ( IsComputation_v<VT> || RequiresEvaluation_v<VT> );
138 template<
typename T1 >
149 template<
typename T1,
typename T2,
typename T3 >
150 static constexpr bool UseVectorizedKernel_v =
151 ( useOptimizedKernels &&
153 T1::simdEnabled && T2::simdEnabled &&
154 IsSIMDCombinable_v< ElementType_t<T1>
168 template<
typename T1,
typename T2,
typename T3 >
169 static constexpr bool UseOptimizedKernel_v =
170 ( !UseVectorizedKernel_v<T1,T2,T3> &&
172 !IsResizable_v< ElementType_t<T1> > &&
173 !IsResizable_v<VET> );
182 template<
typename T1,
typename T2,
typename T3 >
183 static constexpr bool UseDefaultKernel_v =
184 ( !UseVectorizedKernel_v<T1,T2,T3> && !UseOptimizedKernel_v<T1,T2,T3> );
219 ( !IsDiagonal_v<MT> &&
221 HasSIMDAdd_v<MET,VET> &&
222 HasSIMDMult_v<MET,VET> );
257 if( IsDiagonal_v<MT> )
259 return mat_(index,index) *
vec_[index];
261 else if( IsLower_v<MT> )
263 const size_t n( IsStrictlyLower_v<MT> ? index : index+1UL );
267 else if( IsUpper_v<MT> )
269 const size_t begin( IsStrictlyUpper_v<MT> ? index+1UL : index );
270 const size_t n (
mat_.columns() -
begin );
289 if( index >=
mat_.rows() ) {
292 return (*
this)[index];
301 inline size_t size() const noexcept {
332 template<
typename T >
333 inline bool canAlias(
const T* alias )
const noexcept {
334 return mat_.isAliased( alias ) ||
vec_.isAliased( alias );
344 template<
typename T >
345 inline bool isAliased(
const T* alias )
const noexcept {
346 return mat_.isAliased( alias ) ||
vec_.isAliased( alias );
356 return mat_.isAligned();
366 return (
size() > SMP_TDMATSVECMULT_THRESHOLD );
389 template<
typename VT1 >
398 if( x.nonZeros() == 0UL ) {
413 TDMatSVecMultExpr::selectAssignKernel( *lhs, A, x );
432 template<
typename VT1
435 static inline auto selectAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
440 const size_t M( A.rows() );
442 auto element( x.begin() );
443 const auto end( x.end() );
447 if( IsLower_v<MT1> ) {
448 const size_t iend( IsStrictlyLower_v<MT1> ? element->index()+1UL : element->index() );
449 for(
size_t i=0UL; i<iend; ++i )
453 for( ; element!=
end; ++element )
455 const size_t index( element->index() );
457 if( IsDiagonal_v<MT1> )
459 for(
size_t i=last; i<index; ++i )
462 y[index] = A(index,index) * element->value();
467 const size_t ibegin( ( IsLower_v<MT1> )
468 ?( IsStrictlyLower_v<MT1> ? index+1UL : index )
470 const size_t iend( ( IsUpper_v<MT1> )
471 ?( IsStrictlyUpper_v<MT1> ? index : index+1UL )
475 for(
size_t i=ibegin; i<last; ++i ) {
476 y[i] += A(i,index) * element->value();
478 for(
size_t i=last; i<iend; ++i ) {
479 y[i] = A(i,index) * element->value();
486 if( IsUpper_v<MT1> ) {
487 for(
size_t i=last; i<M; ++i )
508 template<
typename VT1
511 static inline auto selectAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
512 -> EnableIf_t< UseOptimizedKernel_v<VT1,MT1,VT2> >
516 const size_t M( A.rows() );
518 auto element( x.begin() );
519 const auto end( x.end() );
526 const size_t j1( element->index() );
527 const VET v1( element->value() );
529 const size_t j2( element->index() );
530 const VET v2( element->value() );
532 const size_t j3( element->index() );
533 const VET v3( element->value() );
535 const size_t j4( element->index() );
536 const VET v4( element->value() );
541 for(
size_t i=0UL; i<M; ++i ) {
542 y[i] = A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
547 const size_t j1( element->index() );
548 const VET v1( element->value() );
551 for(
size_t i=0UL; i<M; ++i ) {
556 for(
size_t j=(jpos>3UL)?(4UL):(1UL); (j+4UL)<=jpos; j+=4UL )
558 const size_t j1( element->index() );
559 const VET v1( element->value() );
561 const size_t j2( element->index() );
562 const VET v2( element->value() );
564 const size_t j3( element->index() );
565 const VET v3( element->value() );
567 const size_t j4( element->index() );
568 const VET v4( element->value() );
573 const size_t ibegin( ( IsLower_v<MT1> )
574 ?( IsStrictlyLower_v<MT1> ? j1+1UL : j1 )
576 const size_t iend( ( IsUpper_v<MT1> )
577 ?( IsStrictlyUpper_v<MT1> ? j4 : j4+1UL )
581 for(
size_t i=ibegin; i<iend; ++i ) {
582 y[i] += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
585 for( ; element!=
end; ++element )
587 const size_t j1( element->index() );
588 const VET v1( element->value() );
590 const size_t ibegin( ( IsLower_v<MT1> )
591 ?( IsStrictlyLower_v<MT1> ? j1+1UL : j1 )
593 const size_t iend( ( IsUpper_v<MT1> )
594 ?( IsStrictlyUpper_v<MT1> ? j1 : j1+1UL )
598 for(
size_t i=ibegin; i<iend; ++i ) {
599 y[i] += A(i,j1) * v1;
620 template<
typename VT1
623 static inline auto selectAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
624 -> EnableIf_t< UseVectorizedKernel_v<VT1,MT1,VT2> >
628 constexpr bool remainder( !IsPadded_v<MT1> || !IsPadded_v<VT1> );
630 const size_t M( A.rows() );
632 auto element( x.begin() );
633 const auto end( x.end() );
640 const size_t j1( element->index() );
641 const VET v1( element->value() );
643 const size_t j2( element->index() );
644 const VET v2( element->value() );
646 const size_t j3( element->index() );
647 const VET v3( element->value() );
649 const size_t j4( element->index() );
650 const VET v4( element->value() );
666 y.store( i, A.load(i,j1) * xmm1 + A.load(i,j2) * xmm2 + A.load(i,j3) * xmm3 + A.load(i,j4) * xmm4 );
668 for( ; remainder && i<M; ++i ) {
669 y[i] = A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
674 const size_t j1( element->index() );
675 const VET v1( element->value() );
686 y.store( i, A.load(i,j1) * xmm1 );
688 for( ; remainder && i<M; ++i ) {
693 for(
size_t j=(jpos>3UL)?(4UL):(1UL); (j+4UL)<=jpos; j+=4UL )
695 const size_t j1( element->index() );
696 const VET v1( element->value() );
698 const size_t j2( element->index() );
699 const VET v2( element->value() );
701 const size_t j3( element->index() );
702 const VET v3( element->value() );
704 const size_t j4( element->index() );
705 const VET v4( element->value() );
715 const size_t ibegin( ( IsLower_v<MT1> )
718 const size_t iend( ( IsUpper_v<MT1> )
719 ?( IsStrictlyUpper_v<MT1> ? j4 : j4+1UL )
729 y.store( i, y.load(i) + A.load(i,j1) * xmm1 + A.load(i,j2) * xmm2 + A.load(i,j3) * xmm3 + A.load(i,j4) * xmm4 );
731 for( ; remainder && i<iend; ++i ) {
732 y[i] += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
736 for( ; element!=
end; ++element )
738 const size_t j1( element->index() );
739 const VET v1( element->value() );
743 const size_t ibegin( ( IsLower_v<MT1> )
746 const size_t iend( ( IsUpper_v<MT1> )
747 ?( IsStrictlyUpper_v<MT1> ? j1 : j1+1UL )
757 y.store( i, y.load(i) + A.load(i,j1) * xmm1 );
759 for( ; remainder && i<iend; ++i ) {
760 y[i] += A(i,j1) * v1;
780 template<
typename VT1 >
781 friend inline void assign( SparseVector<VT1,false>& lhs,
const TDMatSVecMultExpr& rhs )
810 template<
typename VT1 >
811 friend inline void addAssign( DenseVector<VT1,false>& lhs,
const TDMatSVecMultExpr& rhs )
819 if( x.nonZeros() == 0UL )
return;
831 TDMatSVecMultExpr::selectAddAssignKernel( *lhs, A, x );
850 template<
typename VT1
853 static inline auto selectAddAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
854 -> EnableIf_t< UseDefaultKernel_v<VT1,MT1,VT2> >
858 const size_t M( A.rows() );
860 auto element( x.begin() );
861 const auto end( x.end() );
863 for( ; element!=
end; ++element )
865 const size_t index( element->index() );
867 if( IsDiagonal_v<MT1> )
869 y[index] += A(index,index) * element->value();
873 const size_t ibegin( ( IsLower_v<MT1> )
874 ?( IsStrictlyLower_v<MT1> ? index+1UL : index )
876 const size_t iend( ( IsUpper_v<MT1> )
877 ?( IsStrictlyUpper_v<MT1> ? index : index+1UL )
881 for(
size_t i=ibegin; i<iend; ++i ) {
882 y[i] += A(i,index) * element->value();
904 template<
typename VT1
907 static inline auto selectAddAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
908 -> EnableIf_t< UseOptimizedKernel_v<VT1,MT1,VT2> >
912 const size_t M( A.rows() );
914 auto element( x.begin() );
915 const auto end( x.end() );
920 for(
size_t j=0UL; (j+4UL)<=jpos; j+=4UL )
922 const size_t j1( element->index() );
923 const VET v1( element->value() );
925 const size_t j2( element->index() );
926 const VET v2( element->value() );
928 const size_t j3( element->index() );
929 const VET v3( element->value() );
931 const size_t j4( element->index() );
932 const VET v4( element->value() );
937 const size_t ibegin( ( IsLower_v<MT1> )
938 ?( IsStrictlyLower_v<MT1> ? j1+1UL : j1 )
940 const size_t iend( ( IsUpper_v<MT1> )
941 ?( IsStrictlyUpper_v<MT1> ? j4 : j4+1UL )
945 for(
size_t i=ibegin; i<iend; ++i ) {
946 y[i] += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
949 for( ; element!=
end; ++element )
951 const size_t j1( element->index() );
952 const VET v1( element->value() );
954 const size_t ibegin( ( IsLower_v<MT1> )
955 ?( IsStrictlyLower_v<MT1> ? j1+1UL : j1 )
957 const size_t iend( ( IsUpper_v<MT1> )
958 ?( IsStrictlyUpper_v<MT1> ? j1 : j1+1UL )
962 for(
size_t i=ibegin; i<iend; ++i ) {
963 y[i] += A(i,j1) * v1;
984 template<
typename VT1
987 static inline auto selectAddAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
988 -> EnableIf_t< UseVectorizedKernel_v<VT1,MT1,VT2> >
992 constexpr bool remainder( !IsPadded_v<MT1> || !IsPadded_v<VT1> );
994 const size_t M( A.rows() );
996 auto element( x.begin() );
997 const auto end( x.end() );
1002 for(
size_t j=0UL; (j+4UL)<=jpos; j+=4UL )
1004 const size_t j1( element->index() );
1005 const VET v1( element->value() );
1007 const size_t j2( element->index() );
1008 const VET v2( element->value() );
1010 const size_t j3( element->index() );
1011 const VET v3( element->value() );
1013 const size_t j4( element->index() );
1014 const VET v4( element->value() );
1024 const size_t ibegin( ( IsLower_v<MT1> )
1027 const size_t iend( ( IsUpper_v<MT1> )
1028 ?( IsStrictlyUpper_v<MT1> ? j4 : j4+1UL )
1038 y.store( i, y.load(i) + A.load(i,j1) * xmm1 + A.load(i,j2) * xmm2 + A.load(i,j3) * xmm3 + A.load(i,j4) * xmm4 );
1040 for( ; remainder && i<iend; ++i ) {
1041 y[i] += A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
1044 for( ; element!=
end; ++element )
1046 const size_t j1( element->index() );
1047 const VET v1( element->value() );
1051 const size_t ibegin( ( IsLower_v<MT1> )
1054 const size_t iend( ( IsUpper_v<MT1> )
1055 ?( IsStrictlyUpper_v<MT1> ? j1 : j1+1UL )
1065 y.store( i, y.load(i) + A.load(i,j1) * xmm1 );
1067 for( ; remainder && i<iend; ++i ) {
1068 y[i] += A(i,j1) * v1;
1092 template<
typename VT1 >
1093 friend inline void subAssign( DenseVector<VT1,false>& lhs,
const TDMatSVecMultExpr& rhs )
1101 if( x.nonZeros() == 0UL )
return;
1113 TDMatSVecMultExpr::selectSubAssignKernel( *lhs, A, x );
1132 template<
typename VT1
1135 static inline auto selectSubAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
1136 -> EnableIf_t< UseDefaultKernel_v<VT1,MT1,VT2> >
1140 const size_t M( A.rows() );
1142 auto element( x.begin() );
1143 const auto end( x.end() );
1145 for( ; element!=
end; ++element )
1147 const size_t index( element->index() );
1149 if( IsDiagonal_v<MT1> )
1151 y[index] -= A(index,index) * element->value();
1155 const size_t ibegin( ( IsLower_v<MT1> )
1156 ?( IsStrictlyLower_v<MT1> ? index+1UL : index )
1158 const size_t iend( ( IsUpper_v<MT1> )
1159 ?( IsStrictlyUpper_v<MT1> ? index : index+1UL )
1163 for(
size_t i=ibegin; i<iend; ++i ) {
1164 y[i] -= A(i,index) * element->value();
1186 template<
typename VT1
1189 static inline auto selectSubAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
1190 -> EnableIf_t< UseOptimizedKernel_v<VT1,MT1,VT2> >
1194 const size_t M( A.rows() );
1196 auto element( x.begin() );
1197 const auto end( x.end() );
1199 const size_t jpos(
prevMultiple( x.nonZeros(), 4UL ) );
1202 for(
size_t j=0UL; (j+4UL)<=jpos; j+=4UL )
1204 const size_t j1( element->index() );
1205 const VET v1( element->value() );
1207 const size_t j2( element->index() );
1208 const VET v2( element->value() );
1210 const size_t j3( element->index() );
1211 const VET v3( element->value() );
1213 const size_t j4( element->index() );
1214 const VET v4( element->value() );
1219 const size_t ibegin( ( IsLower_v<MT1> )
1220 ?( IsStrictlyLower_v<MT1> ? j1+1UL : j1 )
1222 const size_t iend( ( IsUpper_v<MT1> )
1223 ?( IsStrictlyUpper_v<MT1> ? j4 : j4+1UL )
1227 for(
size_t i=ibegin; i<iend; ++i ) {
1228 y[i] -= A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
1231 for( ; element!=
end; ++element )
1233 const size_t j1( element->index() );
1234 const VET v1( element->value() );
1236 const size_t ibegin( ( IsLower_v<MT1> )
1237 ?( IsStrictlyLower_v<MT1> ? j1+1UL : j1 )
1239 const size_t iend( ( IsUpper_v<MT1> )
1240 ?( IsStrictlyUpper_v<MT1> ? j1 : j1+1UL )
1244 for(
size_t i=ibegin; i<iend; ++i ) {
1245 y[i] -= A(i,j1) * v1;
1266 template<
typename VT1
1269 static inline auto selectSubAssignKernel( VT1& y,
const MT1& A,
const VT2& x )
1270 -> EnableIf_t< UseVectorizedKernel_v<VT1,MT1,VT2> >
1274 constexpr bool remainder( !IsPadded_v<MT1> || !IsPadded_v<VT1> );
1276 const size_t M( A.rows() );
1278 auto element( x.begin() );
1279 const auto end( x.end() );
1281 const size_t jpos(
prevMultiple( x.nonZeros(), 4UL ) );
1284 for(
size_t j=0UL; (j+4UL)<=jpos; j+=4UL )
1286 const size_t j1( element->index() );
1287 const VET v1( element->value() );
1289 const size_t j2( element->index() );
1290 const VET v2( element->value() );
1292 const size_t j3( element->index() );
1293 const VET v3( element->value() );
1295 const size_t j4( element->index() );
1296 const VET v4( element->value() );
1306 const size_t ibegin( ( IsLower_v<MT1> )
1309 const size_t iend( ( IsUpper_v<MT1> )
1310 ?( IsStrictlyUpper_v<MT1> ? j4 : j4+1UL )
1320 y.store( i, y.load(i) - A.load(i,j1) * xmm1 - A.load(i,j2) * xmm2 - A.load(i,j3) * xmm3 - A.load(i,j4) * xmm4 );
1322 for( ; remainder && i<iend; ++i ) {
1323 y[i] -= A(i,j1) * v1 + A(i,j2) * v2 + A(i,j3) * v3 + A(i,j4) * v4;
1326 for( ; element!=
end; ++element )
1328 const size_t j1( element->index() );
1329 const VET v1( element->value() );
1333 const size_t ibegin( ( IsLower_v<MT1> )
1336 const size_t iend( ( IsUpper_v<MT1> )
1337 ?( IsStrictlyUpper_v<MT1> ? j1 : j1+1UL )
1347 y.store( i, y.load(i) - A.load(i,j1) * xmm1 );
1349 for( ; remainder && i<iend; ++i ) {
1350 y[i] -= A(i,j1) * v1;
1374 template<
typename VT1 >
1375 friend inline void multAssign( DenseVector<VT1,false>& lhs,
const TDMatSVecMultExpr& rhs )
1386 multAssign( *lhs, tmp );
1408 template<
typename VT1 >
1409 friend inline void divAssign( DenseVector<VT1,false>& lhs,
const TDMatSVecMultExpr& rhs )
1420 divAssign( *lhs, tmp );
1444 template<
typename VT1 >
1446 -> EnableIf_t< UseSMPAssign_v<VT1> >
1454 if( x.nonZeros() == 0UL ) {
1489 template<
typename VT1 >
1491 -> EnableIf_t< UseSMPAssign_v<VT1> >
1522 template<
typename VT1 >
1524 -> EnableIf_t< UseSMPAssign_v<VT1> >
1532 if( x.nonZeros() == 0UL )
return;
1568 template<
typename VT1 >
1570 -> EnableIf_t< UseSMPAssign_v<VT1> >
1578 if( x.nonZeros() == 0UL )
return;
1614 template<
typename VT1 >
1616 -> EnableIf_t< UseSMPAssign_v<VT1> >
1651 template<
typename VT1 >
1653 -> EnableIf_t< UseSMPAssign_v<VT1> >
1708template<
typename MT
1710 , DisableIf_t< IsZero_v<VT> >* =
nullptr >
1711inline const TDMatSVecMultExpr<MT,VT>
1712 tdmatsvecmult(
const DenseMatrix<MT,true>& mat,
const SparseVector<VT,false>& vec )
1718 return TDMatSVecMultExpr<MT,VT>( *mat, *vec );
1737template<
typename MT
1739 , EnableIf_t< IsZero_v<VT> >* =
nullptr >
1740inline decltype(
auto)
1741 tdmatsvecmult(
const DenseMatrix<MT,true>& mat,
const SparseVector<VT,false>& vec )
1749 using ReturnType =
const MultTrait_t< ResultType_t<MT>, ResultType_t<VT> >;
1754 return ReturnType( (*mat).rows() );
1792template<
typename MT
1794inline decltype(
auto)
1801 if( (*mat).columns() != (*vec).size() ) {
1805 return tdmatsvecmult( *mat, *vec );
1820template<
typename MT,
typename VT >
1821struct IsAligned< TDMatSVecMultExpr<MT,VT> >
1822 :
public IsAligned<MT>
Header file for auxiliary alias declarations.
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.
Definition: Aliases.h:110
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 blaze::checked and blaze::unchecked instances.
Constraints on the storage order of matrix types.
Constraint on the transpose flag of vector types.
Header file for the EnableIf class template.
Header file for the function trace functionality.
Header file for the HasSIMDAdd type trait.
Header file for the HasSIMDMult type trait.
Header file for the If class template.
Header file for the IsAligned type trait.
Header file for the IsComputation type trait class.
Header file for the IsDiagonal type trait.
Header file for the IsExpression type trait class.
Header file for the IsLower type trait.
Header file for the IsPadded type trait.
Header file for the IsResizable type trait.
Header file for the IsSIMDCombinable type trait.
Header file for the IsStrictlyLower type trait.
Header file for the IsStrictlyUpper type trait.
Header file for the IsUpper type trait.
Deactivation of problematic macros.
Header file for the MAYBE_UNUSED function template.
Header file for the multiplication trait.
Header file for the prevMultiple shim.
Header file for all SIMD functionality.
Constraint on the data type.
Base class for dense matrices.
Definition: DenseMatrix.h:82
Base class for N-dimensional dense vectors.
Definition: DenseVector.h:77
SIMD characteristics of data types.
Definition: SIMDTrait.h:297
Base class for sparse vectors.
Definition: SparseVector.h:72
Expression object for transpose dense matrix-sparse vector multiplications.
Definition: TDMatSVecMultExpr.h:111
RightOperand rightOperand() const noexcept
Returns the right-hand side sparse vector operand.
Definition: TDMatSVecMultExpr.h:321
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: TDMatSVecMultExpr.h:365
LeftOperand mat_
Left-hand side dense matrix of the multiplication expression.
Definition: TDMatSVecMultExpr.h:372
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: TDMatSVecMultExpr.h:197
TDMatSVecMultExpr(const MT &mat, const VT &vec) noexcept
Constructor for the TDMatSVecMultExpr class.
Definition: TDMatSVecMultExpr.h:240
If_t< IsExpression_v< MT >, const MT, const MT & > LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: TDMatSVecMultExpr.h:204
If_t< IsExpression_v< VT >, const VT, const VT & > RightOperand
Composite type of the right-hand side dense vector expression.
Definition: TDMatSVecMultExpr.h:207
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: TDMatSVecMultExpr.h:254
ElementType_t< ResultType > ElementType
Resulting element type.
Definition: TDMatSVecMultExpr.h:198
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: TDMatSVecMultExpr.h:345
static constexpr bool evaluateVector
Compilation switch for the composite type of the right-hand side dense vector expression.
Definition: TDMatSVecMultExpr.h:129
const ResultType CompositeType
Data type for composite expression templates.
Definition: TDMatSVecMultExpr.h:201
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: TDMatSVecMultExpr.h:333
ElementType_t< MRT > MET
Element type of the left-hand side dense matrix expression.
Definition: TDMatSVecMultExpr.h:116
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: TDMatSVecMultExpr.h:288
CompositeType_t< MT > MCT
Composite type of the left-hand side dense matrix expression.
Definition: TDMatSVecMultExpr.h:118
static constexpr bool evaluateMatrix
Compilation switch for the composite type of the left-hand side dense matrix expression.
Definition: TDMatSVecMultExpr.h:124
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition: TDMatSVecMultExpr.h:218
ResultType_t< MT > MRT
Result type of the left-hand side dense matrix expression.
Definition: TDMatSVecMultExpr.h:114
const ElementType ReturnType
Return type for expression template evaluations.
Definition: TDMatSVecMultExpr.h:200
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: TDMatSVecMultExpr.h:355
static constexpr size_t SIMDSIZE
The number of elements packed within a single SIMD element.
Definition: TDMatSVecMultExpr.h:231
If_t< evaluateMatrix, const MRT, MCT > LT
Type for the assignment of the left-hand side dense matrix operand.
Definition: TDMatSVecMultExpr.h:210
ResultType_t< VT > VRT
Result type of the right-hand side sparse vector expression.
Definition: TDMatSVecMultExpr.h:115
CompositeType_t< VT > VCT
Composite type of the right-hand side sparse vector expression.
Definition: TDMatSVecMultExpr.h:119
size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition: TDMatSVecMultExpr.h:301
If_t< evaluateVector, const VRT, CompositeType_t< VT > > RT
Type for the assignment of the right-hand side dense matrix operand.
Definition: TDMatSVecMultExpr.h:213
RightOperand vec_
Right-hand side sparse vector of the multiplication expression.
Definition: TDMatSVecMultExpr.h:373
SIMDTrait_t< ElementType > SIMDType
Resulting SIMD element type.
Definition: TDMatSVecMultExpr.h:199
LeftOperand leftOperand() const noexcept
Returns the left-hand side transpose dense matrix operand.
Definition: TDMatSVecMultExpr.h:311
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: TDMatSVecMultExpr.h:225
MultTrait_t< MRT, VRT > ResultType
Result type for expression template evaluations.
Definition: TDMatSVecMultExpr.h:196
ElementType_t< VRT > VET
Element type of the right-hand side sparse vector expression.
Definition: TDMatSVecMultExpr.h:117
Constraint on the data type.
Constraint on the data type.
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 DenseVector base class.
Header file for the MatVecMultExpr 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_NOT_BE_MATMATMULTEXPR_TYPE(T)
Constraint on the data type.
Definition: MatMatMultExpr.h:83
#define BLAZE_CONSTRAINT_MUST_NOT_BE_ZERO_TYPE(T)
Constraint on the data type.
Definition: Zero.h:81
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.
Definition: DenseMatrix.h:61
#define BLAZE_CONSTRAINT_MUST_FORM_VALID_MATVECMULTEXPR(T1, T2)
Constraint on the data type.
Definition: MatVecMultExpr.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_DENSE_VECTOR_TYPE(T)
Constraint on the data type.
Definition: DenseVector.h:61
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_VECTOR_TYPE(T)
Constraint on the data type.
Definition: ColumnVector.h:61
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.
Definition: ColumnMajorMatrix.h:61
#define BLAZE_CONSTRAINT_MUST_BE_ZERO_TYPE(T)
Constraint on the data type.
Definition: Zero.h:61
typename MultTrait< T1, T2 >::Type MultTrait_t
Auxiliary alias declaration for the MultTrait class template.
Definition: MultTrait.h:165
BLAZE_ALWAYS_INLINE constexpr auto prevMultiple(T1 value, T2 factor) noexcept
Rounds down an integral value to the previous multiple of a given factor.
Definition: PrevMultiple.h:68
constexpr void reset(Matrix< MT, SO > &matrix)
Resetting the given matrix.
Definition: Matrix.h:806
MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:584
MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:518
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition: Row.h:137
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition: Assert.h:101
BLAZE_ALWAYS_INLINE const EnableIf_t< IsIntegral_v< T > &&HasSize_v< T, 1UL >, If_t< IsSigned_v< T >, SIMDint8, SIMDuint8 > > set(T value) noexcept
Sets all values in the vector to the given 1-byte integral value.
Definition: Set.h:75
typename SIMDTrait< T >::Type SIMDTrait_t
Auxiliary alias declaration for the SIMDTrait class template.
Definition: SIMDTrait.h:315
auto smpDivAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs) -> EnableIf_t< IsDenseVector_v< VT1 > >
Default implementation of the SMP division assignment of a vector to a dense vector.
Definition: DenseVector.h:221
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 smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:100
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
decltype(auto) subvector(Vector< VT, TF > &, RSAs...)
Creating a view on a specific subvector of the given vector.
Definition: Subvector.h:158
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
constexpr Unchecked unchecked
Global Unchecked instance.
Definition: Check.h:146
Header file for the exception macros of the math module.
Header file for all forward declarations for expression class templates.
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 matrix/vector multiplication expression templates.
Definition: MatVecMultExpr.h:69
System settings for performance optimizations.
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
Header file for the IsZero type trait.
Header file for the RequiresEvaluation type trait.
Header file for basic type definitions.