OpenMPCD
include
OpenMPCD
Vector2D_Implementation1.hpp
Go to the documentation of this file.
1
/**
2
* @file
3
* Implementation details for the Vector2D class.
4
*/
5
6
#ifndef OPENMPCD_VECTOR2D_IMPLEMENTATION1_HPP
7
#define OPENMPCD_VECTOR2D_IMPLEMENTATION1_HPP
8
9
#include <
OpenMPCD/CUDA/Macros.hpp
>
10
11
namespace
OpenMPCD
12
{
13
template
<
typename
T>
class
Vector2D;
14
15
/**
16
* Namespace for implementation details for Vector2D.
17
*/
18
namespace
Implementation_Vector2D
19
{
20
21
/**
22
* Helper class to allow partial template specialization of
23
* `OpenMPCD::Vector2D::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
45
OPENMPCD_CUDA_HOST_AND_DEVICE
46
const
T
dot
(
const
Vector2D<T>
& lhs,
const
Vector2D<T>
& rhs);
47
};
//class Dot
48
}
//namespace Implementation_Vector2D
49
}
//namespace OpenMPCD
50
51
#endif //OPENMPCD_VECTOR2D_IMPLEMENTATION1_HPP
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::Vector2D
2-dimensional vector.
Definition:
Vector2D.hpp:34
Macros.hpp
OpenMPCD::Implementation_Vector2D::Dot
Helper class to allow partial template specialization of OpenMPCD::Vector2D::dot.
Definition:
Vector2D_Implementation1.hpp:28
OpenMPCD::Implementation_Vector2D::Dot::dot
static const OPENMPCD_CUDA_HOST_AND_DEVICE T dot(const Vector2D< T > &lhs, const Vector2D< T > &rhs)
Returns the scalar product two vectors.
Generated by
1.8.17