OpenMPCD
Vector3D_Implementation1.hpp
Go to the documentation of this file.
1 /**
2  * @file
3  * Implementation details for the Vector3D class.
4  */
5 
6 #ifndef OPENMPCD_VECTOR3D_IMPLEMENTATION1_HPP
7 #define OPENMPCD_VECTOR3D_IMPLEMENTATION1_HPP
8 
10 
11 namespace OpenMPCD
12 {
13 template<typename T> class Vector3D;
14 
15 /**
16  * Namespace for implementation details for Vector3D.
17  */
18 namespace Implementation_Vector3D
19 {
20 
21 /**
22  * Helper class to allow partial template specialization of
23  * `OpenMPCD::Vector3D::dot`.
24  *
25  * @tparam T The underlying scalar type.
26  */
27 template<typename T, typename=void>
28 class Dot
29 {
30  private:
31  Dot(); ///< The constructor.
32 
33  public:
34  /**
35  * Returns the scalar product two vectors.
36  *
37  * The scalar product is defined such that the left-hand-side's components
38  * are complex-conjugated prior to multiplication with the right-hand-side's
39  * components.
40  *
41  * @param[in] lhs The left-hand-side.
42  * @param[in] rhs The right-hand-side.
43  */
44  static
46  const T dot(const Vector3D<T>& lhs, const Vector3D<T>& rhs);
47 }; //class Dot
48 } //namespace Implementation_Vector3D
49 } //namespace OpenMPCD
50 
51 #endif
OpenMPCD::Vector3D
3-dimensional vector.
Definition: Vector3D.hpp:38
OPENMPCD_CUDA_HOST_AND_DEVICE
#define OPENMPCD_CUDA_HOST_AND_DEVICE
Denotes a function to be callable both from the Host and from a CUDA Device.
Definition: Macros.hpp:15
OpenMPCD::Implementation_Vector3D::Dot::dot
static const OPENMPCD_CUDA_HOST_AND_DEVICE T dot(const Vector3D< T > &lhs, const Vector3D< T > &rhs)
Returns the scalar product two vectors.
Macros.hpp
OpenMPCD::Implementation_Vector3D::Dot
Helper class to allow partial template specialization of OpenMPCD::Vector3D::dot.
Definition: Vector3D_Implementation1.hpp:28