OpenMPCD
|
Defines common mathematical functions. More...
Functions | |
template<typename T > | |
OPENMPCD_CUDA_HOST_AND_DEVICE T | acos (const T x) |
Returns the arc cosine of the argument. More... | |
template<typename T > | |
OPENMPCD_CUDA_HOST_AND_DEVICE T | cos (const T x) |
Returns the cosine of the argument. More... | |
template<typename T > | |
OPENMPCD_CUDA_HOST_AND_DEVICE T | cospi (const T x) |
Returns the cosine of the product of the argument and \( \pi \). More... | |
template<typename T > | |
OPENMPCD_CUDA_HOST_AND_DEVICE T | sin (const T x) |
Returns the sine of the argument. More... | |
template<typename T > | |
OPENMPCD_CUDA_HOST_AND_DEVICE T | sinpi (const T x) |
Returns the sine of the product of the argument and \( \pi \). More... | |
template<typename T > | |
OPENMPCD_CUDA_HOST_AND_DEVICE void | sincos (const T x, T *const s, T *const c) |
Computes both the sine and the cosine of the argument. More... | |
template<typename T > | |
OPENMPCD_CUDA_HOST_AND_DEVICE void | sincospi (const T x, T *const s, T *const c) |
Computes both the sine and the cosine of the product of the argument and \( \pi \). More... | |
template<typename T > | |
OPENMPCD_CUDA_HOST_AND_DEVICE T | sqrt (const T x) |
Returns the sqaure root of the argument. More... | |
Defines common mathematical functions.
OPENMPCD_CUDA_HOST_AND_DEVICE T OpenMPCD::Utility::MathematicalFunctions::acos | ( | const T | x | ) |
Returns the arc cosine of the argument.
T | The data type to use. |
[in] | x | The argument \( x \), which must be in the range \( \left[1, 1\right] \). |
OPENMPCD_CUDA_HOST_AND_DEVICE T OpenMPCD::Utility::MathematicalFunctions::cos | ( | const T | x | ) |
Returns the cosine of the argument.
T | The data type to use. |
[in] | x | The argument \( x \). |
OPENMPCD_CUDA_HOST_AND_DEVICE T OpenMPCD::Utility::MathematicalFunctions::cospi | ( | const T | x | ) |
Returns the cosine of the product of the argument and \( \pi \).
T | The data type to use. |
[in] | x | The argument \( x \). |
OPENMPCD_CUDA_HOST_AND_DEVICE T OpenMPCD::Utility::MathematicalFunctions::sin | ( | const T | x | ) |
Returns the sine of the argument.
T | The data type to use. |
[in] | x | The argument \( x \). |
OPENMPCD_CUDA_HOST_AND_DEVICE void OpenMPCD::Utility::MathematicalFunctions::sincos | ( | const T | x, |
T *const | s, | ||
T *const | c | ||
) |
Computes both the sine and the cosine of the argument.
OpenMPCD::NULLPointerException | If OPENMPCD_DEBUG is defined, throws if s == nullptr or c == nullptr . |
T | The data type to use. |
[in] | x | The argument \( x \). |
[out] | s | Where to store the sine of the argument, \( \sin \left( x \right) \). Must not be nullptr . |
[out] | c | Where to store the cosine of the argument, \( \cos \left( x \right) \). Must not be nullptr . |
OPENMPCD_CUDA_HOST_AND_DEVICE void OpenMPCD::Utility::MathematicalFunctions::sincospi | ( | const T | x, |
T *const | s, | ||
T *const | c | ||
) |
Computes both the sine and the cosine of the product of the argument and \( \pi \).
OpenMPCD::NULLPointerException | If OPENMPCD_DEBUG is defined, throws if s == nullptr or c == nullptr . |
T | The data type to use. |
[in] | x | The argument \( x \). |
[out] | s | Where to store the sine of the product of the argument and \( \pi \), \( \sin \left( x \pi \right) \). Must not be nullptr . |
[out] | c | Where to store the cosine of the product of the argument and \( \pi \), \( \cos \left( x \pi \right) \). Must not be nullptr . |
OPENMPCD_CUDA_HOST_AND_DEVICE T OpenMPCD::Utility::MathematicalFunctions::sinpi | ( | const T | x | ) |
Returns the sine of the product of the argument and \( \pi \).
T | The data type to use. |
[in] | x | The argument \( x \). |
OPENMPCD_CUDA_HOST_AND_DEVICE T OpenMPCD::Utility::MathematicalFunctions::sqrt | ( | const T | x | ) |
Returns the sqaure root of the argument.
T | The data type to use. |
[in] | x | The argument \( x \). |