35#ifndef _BLAZE_MATH_EXPRESSIONS_SVECSVECINNEREXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_SVECSVECINNEREXPR_H_
113 if( (*lhs).size() != (*rhs).size() ) {
125 if( IsOpposedView_v<VT1> && IsOpposedView_v<VT2> )
127 if( left.size() == 0UL )
return sp;
129 sp = left[0UL] * right[0UL];
130 for(
size_t i=1UL; i<left.size(); ++i ) {
131 sp += left[i] * right[i];
134 else if( IsOpposedView_v<VT1> )
136 const auto rend( right.end() );
137 auto r( right.begin() );
139 if( r == rend )
return sp;
141 sp = left[r->index()] * r->value();
143 for( ; r!=rend; ++r ) {
144 sp += left[r->index()] * r->value();
147 else if( IsOpposedView_v<VT2> )
149 const auto lend( left.end() );
150 auto l( left.begin() );
152 if( l == lend )
return sp;
154 sp = l->value() * right[l->index()];
156 for( ; l!=lend; ++l ) {
157 sp += l->value() * right[l->index()];
162 const auto lend( left.end() );
163 const auto rend( right.end() );
164 auto l( left.begin() );
165 auto r( right.begin() );
167 if( l == lend || r == rend )
return sp;
170 if( l->index() < r->index() ) {
172 if( l == lend )
break;
174 else if( r->index() < l->index() ) {
176 if( r == rend )
break;
179 sp = l->value() * r->value();
186 if( l != lend && r != rend )
189 if( l->index() < r->index() ) {
191 if( l == lend )
break;
193 else if( r->index() < l->index() ) {
195 if( r == rend )
break;
198 sp += l->value() * r->value();
200 if( l == lend )
break;
202 if( r == rend )
break;
Header file for auxiliary alias declarations.
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.
Definition: Aliases.h:110
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition: Aliases.h:190
Constraint on the transpose flag of vector types.
Header file for the function trace functionality.
Header file for the IsOpposedView type trait.
Deactivation of problematic macros.
Header file for the multiplication trait.
Header file for the RemoveReference type trait.
Constraint on the transpose flag of vector types.
Base class for sparse vectors.
Definition: SparseVector.h:72
Constraint on the data type.
Header file for the SparseVector base class.
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_VECTOR_TYPE(T)
Constraint on the data type.
Definition: SparseVector.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_ROW_VECTOR_TYPE(T)
Constraint on the data type.
Definition: RowVector.h:61
typename MultTrait< T1, T2 >::Type MultTrait_t
Auxiliary alias declaration for the MultTrait class template.
Definition: MultTrait.h:165
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition: Assert.h:101
typename RemoveReference< T >::Type RemoveReference_t
Auxiliary alias declaration for the RemoveReference type trait.
Definition: RemoveReference.h:95
#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.
Header file for basic type definitions.