Go to the documentation of this file.
6 #ifndef OPENMPCD_VECTOR2D_IMPLEMENTATION2_HPP
7 #define OPENMPCD_VECTOR2D_IMPLEMENTATION2_HPP
11 #include <boost/type_traits/is_floating_point.hpp>
15 namespace Implementation_Vector2D
27 class Dot<T, typename boost::enable_if<boost::is_floating_point<T> >::type>
46 BOOST_STATIC_ASSERT(boost::is_floating_point<T>::value);
62 class Dot<std::complex<T> >
83 const std::complex<T>
dot(
84 const Vector2D<std::complex<T> >& lhs,
85 const Vector2D<std::complex<T> >& rhs)
87 BOOST_STATIC_ASSERT(boost::is_floating_point<T>::value);
90 std::conj(lhs.getX())*rhs.getX() +
91 std::conj(lhs.getY())*rhs.getY();
97 #endif //OPENMPCD_VECTOR2D_IMPLEMENTATION2_HPP
OPENMPCD_CUDA_HOST_AND_DEVICE T getY() const
Returns the y coordinate.
OPENMPCD_CUDA_HOST_AND_DEVICE T getX() const
Returns the x coordinate.
static const OPENMPCD_CUDA_HOST_AND_DEVICE T dot(const Vector2D< T > &lhs, const Vector2D< T > &rhs)
Returns the scalar product two real-valued vectors.
#define OPENMPCD_CUDA_HOST_AND_DEVICE
Denotes a function to be callable both from the Host and from a CUDA Device.
Helper class to allow partial template specialization of OpenMPCD::Vector2D::dot.
static const OPENMPCD_CUDA_HOST_AND_DEVICE std::complex< T > dot(const Vector2D< std::complex< T > > &lhs, const Vector2D< std::complex< T > > &rhs)
Returns the scalar product two vectors.