Go to the documentation of this file.
6 #ifndef OPENMPCD_VECTOR3D_IMPLEMENTATION2_HPP
7 #define OPENMPCD_VECTOR3D_IMPLEMENTATION2_HPP
11 #include <boost/type_traits/is_floating_point.hpp>
15 namespace Implementation_Vector3D
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 Vector3D<std::complex<T> >& lhs,
85 const Vector3D<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() +
92 std::conj(lhs.getZ())*rhs.getZ();
OPENMPCD_CUDA_HOST_AND_DEVICE T getZ() const
Returns the z coordinate.
OPENMPCD_CUDA_HOST_AND_DEVICE T getX() const
Returns the x coordinate.
static const OPENMPCD_CUDA_HOST_AND_DEVICE T dot(const Vector3D< T > &lhs, const Vector3D< T > &rhs)
Returns the scalar product two real-valued vectors.
static const OPENMPCD_CUDA_HOST_AND_DEVICE std::complex< T > dot(const Vector3D< std::complex< T > > &lhs, const Vector3D< std::complex< T > > &rhs)
Returns the scalar product two vectors.
#define OPENMPCD_CUDA_HOST_AND_DEVICE
Denotes a function to be callable both from the Host and from a CUDA Device.
OPENMPCD_CUDA_HOST_AND_DEVICE T getY() const
Returns the y coordinate.
Helper class to allow partial template specialization of OpenMPCD::Vector3D::dot.