32 #ifndef __VMML__VMMLIB_BLAS_DOT__HPP__
33 #define __VMML__VMMLIB_BLAS_DOT__HPP__
36 #include <vmmlib/vector.hpp>
37 #include <vmmlib/exception.hpp>
38 #include <vmmlib/blas_includes.hpp>
39 #include <vmmlib/blas_types.hpp>
67 template<
typename float_t >
76 friend std::ostream& operator << ( std::ostream& os,
80 <<
" (1)\tn " << p.n << std::endl
81 <<
" (2)\tx " << p.x << std::endl
82 <<
" (3)\tincX " << p.inc_x << std::endl
83 <<
" (4)\ty " << p.y << std::endl
84 <<
" (5)\tincY " << p.inc_y << std::endl
93 template<
typename float_t >
97 VMMLIB_ERROR(
"not implemented for this type.", VMMLIB_HERE );
103 dot_call( dot_params< float >& p )
106 float vvi = cblas_sdot(
118 dot_call( dot_params< double >& p )
121 double vvi = cblas_ddot(
135 template<
size_t M,
typename float_t >
155 template<
size_t M,
typename float_t >
166 template<
size_t M,
typename float_t >
168 blas_dot< M, float_t >::compute(
const vector_t& A_,
const vector_t& B_, float_t& dot_prod_ )
171 vector_t* AA =
new vector_t( A_ );
172 vector_t* BB =
new vector_t( B_ );
177 dot_prod_ = blas::dot_call< float_t >( p );