imate
C++/CUDA Reference
Loading...
Searching...
No Matches
_cu_add.h File Reference
#include "../_cu_definitions/cu_types.h"
#include <cassert>
Include dependency graph for _cu_add.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  cu_arithmetic
 perform arithmetics for __half and __nv_bfloat16 types in round-to-nearest-even mode.
 
namespace  cu_arithmetics
 Cast from float to __half and __nv_bfloat16 types and vice-versa, and float to double and vice-versa.
 

Functions

template<typename DataType >
__host__ __device__ DataType cu_arithmetics::add (const DataType x, const DataType y)
 Add two floating point numbers in round-to-nearest-even mode.
 
template<>
__host__ __device__ float cu_arithmetics::add< float > (const float x, const float y)
 Add two __nv_fp8_e5m2 type numbers in round-to-nearest-even mode.
 
template<>
__host__ __device__ double cu_arithmetics::add< double > (const double x, const double y)
 Add two double type float numbers.
 
template<typename DataType >
__host__ __device__ DataType cu_arithmetics::add (const DataType x, const DataType y, const DataType z)
 Add three floating point numbers in round-to-nearest-even mode.
 
template<>
__host__ __device__ float cu_arithmetics::add< float > (const float x, const float y, const float z)
 Add three __half type numbers in round-to-nearest-even mode.
 
template<>
__host__ __device__ double cu_arithmetics::add< double > (const double x, const double y, const double z)
 Add three double type numbers in round-to-nearest-even mode.