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