Пример #1
0
static void dot_impl(
    vector_expression<E1> const& v1,
    vector_expression<E2> const& v2,
    result_type& result,
    sparse_bidirectional_iterator_tag t1,
    dense_random_access_iterator_tag t2
) {
    //use commutativity!
    dot_impl(v2,v1,result,t2,t1);
}
Пример #2
0
void dot(
    vector_expression<E1> const& v1,
    vector_expression<E2> const& v2,
    result_type& result
) {
    SIZE_CHECK(v1().size()==v2().size());
    return dot_impl(v1,v2,result,
                    typename E1::const_iterator::iterator_category(),
                    typename E2::const_iterator::iterator_category()
                   );
}
Пример #3
0
void dot(
	vector_expression<E1,cpu_tag> const& v1,
	vector_expression<E2,cpu_tag> const& v2,
	result_type& result,
	boost::mpl::false_
) {
	ABLAS_SIZE_CHECK(v1().size()==v2().size());
	return dot_impl(v1,v2,result,
		typename E1::const_iterator::iterator_category(),
		typename E2::const_iterator::iterator_category()
	);
}