43 #include <viennacl/linalg/inner_prod.hpp>
44 #endif // HAVE_VIENNACL
55 namespace implementation
63 template <enum Backend,
class Vector>
67 typedef typename Vector::Scalar
T;
77 static T
compute(Vector a, Vector b);
83 template <
class Vector>
84 struct dot<Backend::EIGEN3, Vector>
87 typedef typename Vector::Scalar
T;
102 return vec_a.dot(vec_b);
110 template <
class Vector>
111 struct dot<Backend::VIENNACL, Vector>
114 typedef typename Vector::Scalar
T;
124 static T
compute(shogun::CGPUVector<T> a, shogun::CGPUVector<T> b)
126 return viennacl::linalg::inner_prod(a.vcl_vector(), b.vcl_vector());
129 #endif // HAVE_VIENNACL
136 #endif // DOT_IMPL_H_
Vector::Scalar dot(Vector a, Vector b)
Generic class dot which provides a static compute method. This class is specialized for different typ...
static T compute(shogun::SGVector< T > a, shogun::SGVector< T > b)
all of classes and functions are contained in the shogun namespace
static T compute(Vector a, Vector b)