|
LvArray
|
Contains protable wrappers around cmath functions and some cuda specific functions. More...
Functions | |
Square root and inverse square root. | |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE float | sqrt (float const x) |
| template<typename T > | |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE double | sqrt (T const x) |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE float | invSqrt (float const x) |
| template<typename T > | |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE double | invSqrt (T const x) |
Trigonometric functions | |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE float | sin (float const theta) |
| template<typename T > | |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE double | sin (T const theta) |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE float | cos (float const theta) |
| template<typename T > | |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE double | cos (T const theta) |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE void | sincos (float const theta, float &sinTheta, float &cosTheta) |
Compute the sine and cosine of theta. More... | |
| template<typename T > | |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE void | sincos (double const theta, double &sinTheta, double &cosTheta) |
Compute the sine and cosine of theta. More... | |
| template<typename T > | |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE void | sincos (T const theta, double &sinTheta, double &cosTheta) |
Compute the sine and cosine of theta. More... | |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE float | tan (float const theta) |
| template<typename T > | |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE double | tan (T const theta) |
Inverse trigonometric functions | |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE float | asin (float const x) |
| template<typename T > | |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE double | asin (T const x) |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE float | acos (float const x) |
| template<typename T > | |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE double | acos (T const x) |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE float | atan2 (float const y, float const x) |
| template<typename T > | |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE double | atan2 (T const y, T const x) |
Exponential functions | |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE float | exp (float const x) |
| template<typename T > | |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE double | exp (T const x) |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE float | log (float const x) |
| template<typename T > | |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE double | log (T const x) |
General purpose functions | |
| template<typename T > | |
| using | SingleType = typename internal::SingleType< T >::type |
The type of a single value of type T. More... | |
| template<typename T > | |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE constexpr int | numValues () |
| Return the number of values stored in type. More... | |
| template<typename T , typename U > | |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE constexpr T | convert (U const u) |
Convert u to type. More... | |
| template<typename T , typename U , typename V > | |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE constexpr T | convert (U const u, V const v) |
Convert u and v to a dual type. More... | |
| template<typename T > | |
| LVARRAY_DEVICE LVARRAY_FORCE_INLINE SingleType< T > | getFirst (T const x) |
| template<typename T > | |
| LVARRAY_DEVICE LVARRAY_FORCE_INLINE SingleType< T > | getSecond (T const x) |
| template<typename T > | |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE constexpr std::enable_if_t< std::is_arithmetic< T >::value, T > | max (T const a, T const b) |
| template<typename T > | |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE constexpr std::enable_if_t< std::is_arithmetic< T >::value, T > | min (T const a, T const b) |
| template<typename T > | |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE constexpr T | abs (T const x) |
| template<typename T > | |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE constexpr T | square (T const x) |
Contains protable wrappers around cmath functions and some cuda specific functions.
| using LvArray::math::SingleType = typedef typename internal::SingleType< T >::type |
The type of a single value of type T.
| T | The type to query. |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE constexpr T LvArray::math::abs | ( | T const | x | ) |
x. | x | The number to get the absolute value of. |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE float LvArray::math::acos | ( | float const | x | ) |
x. | x | The value to get the arccosine of, must be in [-1, 1]. |
x is integral it is converted to double and the return type is double. | LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE double LvArray::math::acos | ( | T const | x | ) |
x. | x | The value to get the arccosine of, must be in [-1, 1]. |
x is integral it is converted to double and the return type is double. | LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE float LvArray::math::asin | ( | float const | x | ) |
x. | x | The value to get the arcsine of, must be in [-1, 1]. |
x is integral it is converted to double and the return type is double. | LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE double LvArray::math::asin | ( | T const | x | ) |
x. | x | The value to get the arcsine of, must be in [-1, 1]. |
x is integral it is converted to double and the return type is double. | LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE float LvArray::math::atan2 | ( | float const | y, |
| float const | x | ||
| ) |
| y | The y coordinate. |
| x | The x coordinate. |
x is integral it is converted to double and the return type is double. | LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE double LvArray::math::atan2 | ( | T const | y, |
| T const | x | ||
| ) |
| y | The y coordinate. |
| x | The x coordinate. |
x is integral it is converted to double and the return type is double. | LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE constexpr T LvArray::math::convert | ( | U const | u | ) |
Convert u to type.
| T. | |
| T | The type to convert to. |
| U | The type to convert from. |
| u | The value to convert. |
u converted to | T. |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE constexpr T LvArray::math::convert | ( | U const | u, |
| V const | v | ||
| ) |
Convert u and v to a dual type.
| T. | |
| T | The type to convert to, must hold two values such as __half2. |
| U | The first type to convert from. |
| U | The second type to convert from. |
| u | The first value to convert. |
| v | The second value to convert. |
u, v converted to | T. |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE float LvArray::math::cos | ( | float const | theta | ) |
theta. | theta | The angle in radians. |
theta is not a float it is converted to a double and the return type is double. | LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE double LvArray::math::cos | ( | T const | theta | ) |
theta. | theta | The angle in radians. |
theta is not a float it is converted to a double and the return type is double. | LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE float LvArray::math::exp | ( | float const | x | ) |
x. | x | The power to raise e to. |
x is integral it is converted to double and the return type is double. | LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE double LvArray::math::exp | ( | T const | x | ) |
x. | x | The power to raise e to. |
x is integral it is converted to double and the return type is double. | LVARRAY_DEVICE LVARRAY_FORCE_INLINE SingleType< T > LvArray::math::getFirst | ( | T const | x | ) |
x. | T | The type of x. |
| x | The value to query. |
x is returned. | LVARRAY_DEVICE LVARRAY_FORCE_INLINE SingleType< T > LvArray::math::getSecond | ( | T const | x | ) |
x. | T | The type of x. |
| x | The value to query. |
x is returned. | LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE float LvArray::math::invSqrt | ( | float const | x | ) |
x. | x | The number to get the inverse square root of. |
x is integral it is converted to double and the return type is double. | LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE double LvArray::math::invSqrt | ( | T const | x | ) |
x. | x | The number to get the inverse square root of. |
x is integral it is converted to double and the return type is double. | LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE float LvArray::math::log | ( | float const | x | ) |
x. | x | The number to get the natural logarithm of. |
x is integral it is converted to double and the return type is double. | LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE double LvArray::math::log | ( | T const | x | ) |
x. | x | The number to get the natural logarithm of. |
x is integral it is converted to double and the return type is double. | LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE constexpr std::enable_if_t< std::is_arithmetic< T >::value, T > LvArray::math::max | ( | T const | a, |
| T const | b | ||
| ) |
a and b. | T | A numeric type. |
| a | The first number. |
| b | The second number. |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE constexpr std::enable_if_t< std::is_arithmetic< T >::value, T > LvArray::math::min | ( | T const | a, |
| T const | b | ||
| ) |
a and b. | T | A numeric type. |
| a | The first number. |
| b | The second number. |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE constexpr int LvArray::math::numValues | ( | ) |
Return the number of values stored in type.
| T. |
| T | The type to query. |
| T. |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE float LvArray::math::sin | ( | float const | theta | ) |
theta. | theta | The angle in radians. |
x is integral it is converted to double and the return type is double. | LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE double LvArray::math::sin | ( | T const | theta | ) |
theta. | theta | The angle in radians. |
x is integral it is converted to double and the return type is double. | LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE void LvArray::math::sincos | ( | float const | theta, |
| float & | sinTheta, | ||
| float & | cosTheta | ||
| ) |
Compute the sine and cosine of theta.
| theta | The angle in radians. |
| sinTheta | The sine of theta. |
| cosTheta | The cosine of theta. |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE void LvArray::math::sincos | ( | double const | theta, |
| double & | sinTheta, | ||
| double & | cosTheta | ||
| ) |
Compute the sine and cosine of theta.
| theta | The angle in radians. |
| sinTheta | The sine of theta. |
| cosTheta | The cosine of theta. |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE void LvArray::math::sincos | ( | T const | theta, |
| double & | sinTheta, | ||
| double & | cosTheta | ||
| ) |
Compute the sine and cosine of theta.
| theta | The angle in radians. |
| sinTheta | The sine of theta. |
| cosTheta | The cosine of theta. |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE float LvArray::math::sqrt | ( | float const | x | ) |
x. | x | The number to get the square root of. |
x is integral it is converted to double and the return type is double. | LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE double LvArray::math::sqrt | ( | T const | x | ) |
x. | x | The number to get the square root of. |
x is integral it is converted to double and the return type is double. | LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE constexpr T LvArray::math::square | ( | T const | x | ) |
| T | The typeof x. |
| x | The value to square. |
| LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE float LvArray::math::tan | ( | float const | theta | ) |
theta. | theta | The angle in radians. |
theta is not a float it is converted to a double and the return type is double. | LVARRAY_HOST_DEVICE LVARRAY_FORCE_INLINE double LvArray::math::tan | ( | T const | theta | ) |
theta. | theta | The angle in radians. |
theta is not a float it is converted to a double and the return type is double.
1.8.13