imate
C++/CUDA Reference
Loading...
Searching...
No Matches
_cu_mul.h File Reference
#include "../_cu_definitions/cu_types.h"
#include <cassert>
Include dependency graph for _cu_mul.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::mul (const DataType x, const DataType y)
 Multiply two floating point numbers in round-to-nearest-even mode.
 
template<>
__host__ __device__ float cu_arithmetics::mul< float > (const float x, const float y)
 Multiply two __nv_fp8_e5m2 type numbers in round-to-nearest-even mode.
 
template<>
__host__ __device__ double cu_arithmetics::mul< double > (const double x, const double y)
 Multiply two double type numbers in round-to-nearest-even mode.
 
template<typename DataType >
__host__ __device__ DataType cu_arithmetics::mul (const DataType x, const DataType y, const DataType z)
 Multiply three floating point numbers in round-to-nearest-even mode.
 
template<>
__host__ __device__ float cu_arithmetics::mul< float > (const float x, const float y, const float z)
 Multiply three __half numbers in round-to-nearest-even mode.
 
template<>
__host__ __device__ double cu_arithmetics::mul< double > (const double x, const double y, const double z)
 Multiply three double numbers in round-to-nearest-even mode.