Go to the documentation of this file.
6 #ifndef OPENMPCD_UTILITY_IMPLEMENTATIONDETAILS_MATHEMATICALFUNCTIONS_HPP
7 #define OPENMPCD_UTILITY_IMPLEMENTATIONDETAILS_MATHEMATICALFUNCTIONS_HPP
22 namespace MathematicalFunctions
28 float acos(
const float x)
33 double acos(
const double x)
38 long double acos(
const long double x)
46 float cos(
const float x)
51 double cos(
const double x)
56 long double cos(
const long double x)
64 float cospi(
const float x)
66 #if defined(OPENMPCD_PLATFORM_CUDA) && defined(__CUDA_ARCH__)
74 double cospi(
const double x)
76 #if defined(OPENMPCD_PLATFORM_CUDA) && defined(__CUDA_ARCH__)
84 long double cospi(
const long double x)
86 typedef long double T;
93 float sin(
const float x)
98 double sin(
const double x)
103 long double sin(
const long double x)
111 float sinpi(
const float x)
113 #if defined(OPENMPCD_PLATFORM_CUDA) && defined(__CUDA_ARCH__)
121 double sinpi(
const double x)
123 #if defined(OPENMPCD_PLATFORM_CUDA) && defined(__CUDA_ARCH__)
131 long double sinpi(
const long double x)
133 typedef long double T;
140 void sincos(
const float x,
float*
const s,
float*
const c)
147 #if defined(OPENMPCD_PLATFORM_CUDA) && defined(__CUDA_ARCH__)
148 return ::sincosf(x, s, c);
155 void sincos(
const double x,
double*
const s,
double*
const c)
162 #if defined(OPENMPCD_PLATFORM_CUDA) && defined(__CUDA_ARCH__)
170 void sincos(
const long double x,
long double*
const s,
long double*
const c)
183 void sincospi(
const float x,
float*
const s,
float*
const c)
190 #if defined(OPENMPCD_PLATFORM_CUDA) && defined(__CUDA_ARCH__)
191 return ::sincospif(x, s, c);
198 void sincospi(
const double x,
double*
const s,
double*
const c)
205 #if defined(OPENMPCD_PLATFORM_CUDA) && defined(__CUDA_ARCH__)
213 void sincospi(
const long double x,
long double*
const s,
long double*
const c)
227 float sqrt(
const float x)
232 double sqrt(
const double x)
237 long double sqrt(
const long double x)
249 #endif //OPENMPCD_UTILITY_IMPLEMENTATIONDETAILS_MATHEMATICALFUNCTIONS_HPP
OPENMPCD_CUDA_HOST_AND_DEVICE T cos(const T x)
Returns the cosine of the argument.
OPENMPCD_CUDA_HOST_AND_DEVICE T cospi(const T x)
Returns the cosine of the product of the argument and .
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.
#define OPENMPCD_CUDA_HOST_AND_DEVICE
Denotes a function to be callable both from the Host and from a CUDA Device.
#define OPENMPCD_DEBUG_ASSERT_EXCEPTIONTYPE(assertion, ExceptionType)
#define OPENMPCD_CUDA_HOST
Denotes a function to be callable from the Host.
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 .
OPENMPCD_CUDA_HOST_AND_DEVICE T sqrt(const T x)
Returns the sqaure root of the argument.
OPENMPCD_CUDA_HOST_AND_DEVICE T sinpi(const T x)
Returns the sine of the product of the argument and .
OPENMPCD_CUDA_HOST_AND_DEVICE T acos(const T x)
Returns the arc cosine of the argument.
OPENMPCD_CUDA_HOST_AND_DEVICE T sin(const T x)
Returns the sine of the argument.