22 #ifndef _BLAZE_MATH_EXPRESSIONS_SMATDVECMULTEXPR_H_
23 #define _BLAZE_MATH_EXPRESSIONS_SMATDVECMULTEXPR_H_
31 #include <boost/type_traits/remove_reference.hpp>
79 typedef typename MT::ResultType
MRT;
80 typedef typename VT::ResultType
VRT;
81 typedef typename MT::CompositeType
MCT;
82 typedef typename VT::CompositeType
VCT;
99 template<
typename VT2 >
101 enum { value = useAssign };
132 enum { vectorizable = 0 };
162 typedef typename boost::remove_reference<MCT>::type::ConstIterator ConstIterator;
167 if(
mat_.columns() == 0UL )
175 const ConstIterator end( A.end(index) );
176 ConstIterator element( A.begin(index) );
185 const size_t last( A.nonZeros(index) &
size_t(-2) );
188 for(
size_t i=0UL; i<last; i+=2UL )
190 const ElementType value1( element->value() );
191 const size_t index1( element->index() );
193 const ElementType value2( element->value() );
194 const size_t index2( element->index() );
197 tmp += value1 *
vec_[index1];
198 tmp2 += value2 * vec_[index2];
201 tmp += element->value() *
vec_[element->index()];
209 tmp = element->value() *
vec_[element->index()];
211 for( ; element!=end; ++element )
212 tmp += element->value() *
vec_[element->index()];
219 for(
size_t k=1UL; k<
mat_.columns(); ++k ) {
264 template<
typename T >
293 template<
typename VT1 >
299 typedef typename boost::remove_reference<LT>::type::ConstIterator ConstIterator;
301 if( rhs.
mat_.columns() == 0UL ) {
334 template<
typename VT1 >
344 const ResultType tmp( rhs );
365 template<
typename VT1 >
366 friend inline typename EnableIf< UseAssign<VT1> >::Type
371 typedef typename boost::remove_reference<LT>::type::ConstIterator ConstIterator;
373 if( rhs.mat_.columns() == 0UL ) {
409 template<
typename VT1 >
410 friend inline typename EnableIf< UseAssign<VT1> >::Type
415 typedef typename boost::remove_reference<LT>::type::ConstIterator ConstIterator;
417 if( rhs.mat_.columns() == 0UL ) {
453 template<
typename VT1 >
454 friend inline typename EnableIf< UseAssign<VT1> >::Type
463 const ResultType tmp( rhs );
524 template<
typename T1
530 throw std::invalid_argument(
"Matrix and vector sizes do not match" );
558 template<
typename T1
561 inline const typename EnableIf< IsMatMatMultExpr<T1>, MultExprTrait<T1,T2> >::Type::Type
564 return (~mat).leftOperand() * ( (~mat).
rightOperand() * vec );