milupHPC documentation
  • cuda
  • math
Functions
cuda::math Namespace Reference

Device/CUDA math functions. More...

Functions

__device__ real min (real a, real b)
 Minimum value out of two floating point values. More...
 
__device__ real min (real a, real b, real c)
 Minimum value out of three floating point values. More...
 
__device__ real max (real a, real b)
 Maximum value out of two floating point values. More...
 
__device__ real max (real a, real b, real c)
 Maximum value out of three floating point values. More...
 
__device__ real abs (real a)
 Absolute value of a floating point value. More...
 
__device__ real sqrt (real a)
 Square root of a floating point value. More...
 
__device__ real rsqrt (real a)
 Inverse square root of a floating point value. More...
 

Detailed Description

Device/CUDA math functions.

Wrapping CUDA math functionalities to provide correct function for both single and double precision.

Function Documentation

◆ abs()

__device__ real cuda::math::abs ( real  a)

Absolute value of a floating point value.

Parameters
aFloating point value
Returns
Absolute value of floating point value.

Definition at line 448 of file cuda_utilities.cu.

◆ max() [1/2]

__device__ real cuda::math::max ( real  a,
real  b 
)

Maximum value out of two floating point values.

Parameters
aFloating point value 1
bFloating point value 2
Returns
Maximum floating point value

Definition at line 431 of file cuda_utilities.cu.

◆ max() [2/2]

__device__ real cuda::math::max ( real  a,
real  b,
real  c 
)

Maximum value out of three floating point values.

Parameters
aFloating point value 1
bFloating point value 2
cFloating point value 3
Returns
Maximum floating point value

Definition at line 439 of file cuda_utilities.cu.

+ Here is the call graph for this function:

◆ min() [1/2]

__device__ real cuda::math::min ( real  a,
real  b 
)

Minimum value out of two floating point values.

Parameters
aFloating point value 1
bFloating point value 2
Returns
Minimum floating point value

Definition at line 414 of file cuda_utilities.cu.

◆ min() [2/2]

__device__ real cuda::math::min ( real  a,
real  b,
real  c 
)

Minimum value out of three floating point values.

Parameters
aFloating point value 1
bFloating point value 2
cFloating point value 3
Returns
Minimum floating point value

Definition at line 422 of file cuda_utilities.cu.

+ Here is the call graph for this function:

◆ rsqrt()

__device__ real cuda::math::rsqrt ( real  a)

Inverse square root of a floating point value.

Parameters
aFloating point value
Returns
Inverse square root of a floating point value

Definition at line 464 of file cuda_utilities.cu.

+ Here is the call graph for this function:

◆ sqrt()

__device__ real cuda::math::sqrt ( real  a)

Square root of a floating point value.

Parameters
aFloating point value
Returns
Square root of floating point value

Definition at line 456 of file cuda_utilities.cu.

+ Here is the call graph for this function:

milupHPC - cuda::math Namespace Reference
Generated on Wed Aug 31 2022 12:16:53 by Doxygen 1.9.3