VTK-m  2.0
Namespaces | Macros | Functions
Math.h File Reference
#include <vtkm/TypeTraits.h>
#include <vtkm/Types.h>
#include <vtkm/VecTraits.h>
#include <limits>
#include <cmath>
#include <cstring>
#include <limits.h>
#include <math.h>
#include <stdlib.h>
#include <algorithm>

Go to the source code of this file.

Namespaces

 vtkm
 Groups connected points that have the same field value.
 

Macros

#define VTKM_USE_STL
 
#define VTKM_CUDA_MATH_FUNCTION_32(func)   func##f
 
#define VTKM_CUDA_MATH_FUNCTION_64(func)   func
 
#define VTKM_USE_IEEE_NONFINITE
 
#define VTKM_NAN_BITS_32   0x7FC00000U
 
#define VTKM_INF_BITS_32   0x7F800000U
 
#define VTKM_NEG_INF_BITS_32   0xFF800000U
 
#define VTKM_EPSILON_32   1e-5f
 
#define VTKM_NAN_BITS_64   0x7FF8000000000000ULL
 
#define VTKM_INF_BITS_64   0x7FF0000000000000ULL
 
#define VTKM_NEG_INF_BITS_64   0xFFF0000000000000ULL
 
#define VTKM_EPSILON_64   1e-9
 

Functions

VTKM_EXEC_CONT vtkm::Float32 vtkm::Sin (vtkm::Float32 x)
 Compute the sine of x. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::Sin (vtkm::Float64 x)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::Cos (vtkm::Float32 x)
 Compute the cosine of x. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::Cos (vtkm::Float64 x)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::Tan (vtkm::Float32 x)
 Compute the tangent of x. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::Tan (vtkm::Float64 x)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::ASin (vtkm::Float32 x)
 Compute the arc sine of x. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::ASin (vtkm::Float64 x)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::ACos (vtkm::Float32 x)
 Compute the arc cosine of x. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::ACos (vtkm::Float64 x)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::ATan (vtkm::Float32 x)
 Compute the arc tangent of x. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::ATan (vtkm::Float64 x)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::SinH (vtkm::Float32 x)
 Compute the hyperbolic sine of x. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::SinH (vtkm::Float64 x)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::CosH (vtkm::Float32 x)
 Compute the hyperbolic cosine of x. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::CosH (vtkm::Float64 x)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::TanH (vtkm::Float32 x)
 Compute the hyperbolic tangent of x. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::TanH (vtkm::Float64 x)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::ASinH (vtkm::Float32 x)
 Compute the hyperbolic arc sine of x. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::ASinH (vtkm::Float64 x)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::ACosH (vtkm::Float32 x)
 Compute the hyperbolic arc cosine of x. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::ACosH (vtkm::Float64 x)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::ATanH (vtkm::Float32 x)
 Compute the hyperbolic arc tangent of x. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::ATanH (vtkm::Float64 x)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::Sqrt (vtkm::Float32 x)
 Compute the square root of x. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::Sqrt (vtkm::Float64 x)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::Cbrt (vtkm::Float32 x)
 Compute the cube root of x. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::Cbrt (vtkm::Float64 x)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::Exp (vtkm::Float32 x)
 Computes e**x, the base-e exponential of x. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::Exp (vtkm::Float64 x)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::Exp2 (vtkm::Float32 x)
 Computes 2**x, the base-2 exponential of x. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::Exp2 (vtkm::Float64 x)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::ExpM1 (vtkm::Float32 x)
 Computes (e**x) - 1, the of base-e exponental of x then minus 1. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::ExpM1 (vtkm::Float64 x)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::Log (vtkm::Float32 x)
 Computes the natural logarithm of x. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::Log (vtkm::Float64 x)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::Log2 (vtkm::Float32 x)
 Computes the logarithm base 2 of x. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::Log2 (vtkm::Float64 x)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::Log10 (vtkm::Float32 x)
 Computes the logarithm base 10 of x. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::Log10 (vtkm::Float64 x)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::Log1P (vtkm::Float32 x)
 Computes the value of log(1+x) accurately for very small values of x. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::Log1P (vtkm::Float64 x)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::Clamp (vtkm::Float32 x, vtkm::Float32 lo, vtkm::Float32 hi)
 Clamp x to the given range. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::Clamp (vtkm::Float64 x, vtkm::Float64 lo, vtkm::Float64 hi)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::Ceil (vtkm::Float32 x)
 Round x to the smallest integer value not less than x. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::Ceil (vtkm::Float64 x)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::Floor (vtkm::Float32 x)
 Round x to the largest integer value not greater than x. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::Floor (vtkm::Float64 x)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::Round (vtkm::Float32 x)
 Round x to the nearest integral value. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::Round (vtkm::Float64 x)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::Frexp (vtkm::Float32 x, vtkm::Int32 *exponent)
 Decompose floating poing value. More...
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::Frexp (vtkm::Float64 x, vtkm::Int32 *exponent)
 
VTKM_EXEC_CONT vtkm::Float32 vtkm::Ldexp (vtkm::Float32 x, vtkm::Int32 exponent)
 
VTKM_EXEC_CONT vtkm::Float64 vtkm::Ldexp (vtkm::Float64 x, vtkm::Int32 exponent)
 
VTKM_EXEC_CONT vtkm::UInt64 vtkm::FloatDistance (vtkm::Float64 x, vtkm::Float64 y)
 
VTKM_EXEC_CONT vtkm::UInt64 vtkm::FloatDistance (vtkm::Float32 x, vtkm::Float32 y)
 
template<typename T >
VTKM_EXEC_CONTvtkm::DifferenceOfProducts (T a, T b, T c, T d)
 
template<typename T >
VTKM_EXEC_CONT vtkm::Vec< T, 2 > vtkm::QuadraticRoots (T a, T b, T c)
 
VTKM_EXEC_CONT vtkm::Int32 vtkm::FindFirstSetBit (vtkm::UInt32 word)
 Bitwise operations. More...
 
VTKM_EXEC_CONT vtkm::Int32 vtkm::FindFirstSetBit (vtkm::UInt64 word)
 Find the first set bit in word, and return its position (1-64). More...
 
VTKM_EXEC_CONT vtkm::Int32 vtkm::CountSetBits (vtkm::UInt32 word)
 Count the total number of bits set in word. More...
 
VTKM_EXEC_CONT vtkm::Int32 vtkm::CountSetBits (vtkm::UInt64 word)
 Count the total number of bits set in word. More...
 

Macro Definition Documentation

◆ VTKM_CUDA_MATH_FUNCTION_32

#define VTKM_CUDA_MATH_FUNCTION_32 (   func)    func##f

◆ VTKM_CUDA_MATH_FUNCTION_64

#define VTKM_CUDA_MATH_FUNCTION_64 (   func)    func

◆ VTKM_EPSILON_32

#define VTKM_EPSILON_32   1e-5f

◆ VTKM_EPSILON_64

#define VTKM_EPSILON_64   1e-9

◆ VTKM_INF_BITS_32

#define VTKM_INF_BITS_32   0x7F800000U

◆ VTKM_INF_BITS_64

#define VTKM_INF_BITS_64   0x7FF0000000000000ULL

◆ VTKM_NAN_BITS_32

#define VTKM_NAN_BITS_32   0x7FC00000U

◆ VTKM_NAN_BITS_64

#define VTKM_NAN_BITS_64   0x7FF8000000000000ULL

◆ VTKM_NEG_INF_BITS_32

#define VTKM_NEG_INF_BITS_32   0xFF800000U

◆ VTKM_NEG_INF_BITS_64

#define VTKM_NEG_INF_BITS_64   0xFFF0000000000000ULL

◆ VTKM_USE_IEEE_NONFINITE

#define VTKM_USE_IEEE_NONFINITE

◆ VTKM_USE_STL

#define VTKM_USE_STL