|
| template<typename InputDataType , typename OutputDataType > |
| __host__ __device__ OutputDataType | cu_arithmetics::cast (const InputDataType x) |
| | Cast a floating point type to another floating point type.
|
| |
| template<> |
| __host__ __device__ float | cu_arithmetics::cast< float, float > (const float x) |
| | Cast __nv_fp8_e5m2 type to float type.
|
| |
| template<> |
| __host__ __device__ double | cu_arithmetics::cast< float, double > (const float x) |
| | Cast float type to double type.
|
| |
| template<> |
| __host__ __device__ double | cu_arithmetics::cast< double, double > (const double x) |
| | Cast double type to double type (no action needed)
|
| |
| template<> |
| __host__ __device__ float | cu_arithmetics::cast< double, float > (const double x) |
| | Cast double type to float type.
|
| |
| template<> |
| __host__ __device__ float | cu_arithmetics::cast< int, float > (const int x) |
| | Cast int type to __nv_fp8_e5m2 type in round-to-nearest-even mode.
|
| |
| template<> |
| __host__ __device__ int | cu_arithmetics::cast< float, int > (const float x) |
| | Cast float type to int type in round-to-nearest-even mode.
|
| |
| template<> |
| __host__ __device__ double | cu_arithmetics::cast< int, double > (const int x) |
| | Cast int type to double type in round-to-nearest-even mode.
|
| |
| template<> |
| __host__ __device__ int | cu_arithmetics::cast< double, int > (const double x) |
| | Cast double type to int type in round-to-nearest-even mode.
|
| |
| template<> |
| __host__ __device__ float | cu_arithmetics::cast< unsigned int, float > (const unsigned int x) |
| | Cast unsigned int type to __nv_fp8_e5m2 type in round-to-nearest-even mode.
|
| |
| template<> |
| __host__ __device__ unsigned int | cu_arithmetics::cast< float, unsigned int > (const float x) |
| | Cast float type to unsigned int type in round-to-nearest-even mode.
|
| |
| template<> |
| __host__ __device__ double | cu_arithmetics::cast< unsigned int, double > (const unsigned int x) |
| | Cast unsigned int type to double type in round-to-nearest-even mode.
|
| |
| template<> |
| __host__ __device__ unsigned int | cu_arithmetics::cast< double, unsigned int > (const double x) |
| | Cast double type to unsigned int type in round-to-nearest-even mode.
|
| |
| template<> |
| __host__ __device__ float | cu_arithmetics::cast< long long int, float > (const long long int x) |
| | Cast long long int type to __nv_fp8_e5m2 type in round-to-nearest-even mode.
|
| |
| template<> |
| __host__ __device__ long long int | cu_arithmetics::cast< float, long long int > (const float x) |
| | Cast float type to long long int type in round-to-nearest-even mode.
|
| |
| template<> |
| __host__ __device__ double | cu_arithmetics::cast< long long int, double > (const long long int x) |
| | Cast long long int type to double type in round-to-nearest-even mode.
|
| |
| template<> |
| __host__ __device__ long long int | cu_arithmetics::cast< double, long long int > (const double x) |
| | Cast double type to long long int type in round-to-nearest-even mode.
|
| |
| template<> |
| __host__ __device__ float | cu_arithmetics::cast< unsigned long long int, float > (const unsigned long long int x) |
| | Cast unsigned long long int type to __nv_fp8_e5m2 type in round-to-nearest-even mode.
|
| |
| template<> |
| __host__ __device__ unsigned long long int | cu_arithmetics::cast< float, unsigned long long int > (const float x) |
| | Cast float type to unsigned long long int type in round-to-nearest-even mode.
|
| |
| template<> |
| __host__ __device__ double | cu_arithmetics::cast< unsigned long long int, double > (const unsigned long long int x) |
| | Cast unsigned long long int type to double type in round-to-nearest-even mode.
|
| |
| template<> |
| __host__ __device__ unsigned long long int | cu_arithmetics::cast< double, unsigned long long int > (const double x) |
| | Cast double type to unsigned long long int type in round-to-nearest-even mode.
|
| |