Commit 6fbd9970 authored by Umang Yadav's avatar Umang Yadav
Browse files

Remove old cast

parent 86605723
...@@ -209,35 +209,35 @@ struct float8 ...@@ -209,35 +209,35 @@ struct float8
// Constructor from half // Constructor from half
explicit constexpr __device__ explicit constexpr __device__
float8(const _Float16 v, rounding_mode rm = rounding_mode::standard, uint32_t rng = 0) float8(const _Float16 v, rounding_mode rm = rounding_mode::standard, uint32_t rng = 0)
: float8((float)v, rm, rng) : float8(static_cast<float>(v), rm, rng)
{ {
} }
// constructor from int // constructor from int
explicit constexpr __device__ explicit constexpr __device__
float8(const int v, rounding_mode rm = rounding_mode::standard, uint32_t rng = 0) float8(const int v, rounding_mode rm = rounding_mode::standard, uint32_t rng = 0)
: float8((float)v, rm, rng) : float8(static_cast<float>(v), rm, rng)
{ {
} }
// constructor from uint // constructor from uint
explicit constexpr __device__ explicit constexpr __device__
float8(const uint32_t v, rounding_mode rm = rounding_mode::standard, uint32_t rng = 0) float8(const uint32_t v, rounding_mode rm = rounding_mode::standard, uint32_t rng = 0)
: float8((float)v, rm, rng) : float8(static_cast<float>(v), rm, rng)
{ {
} }
// constructor from double // constructor from double
explicit constexpr __device__ explicit constexpr __device__
float8(const double v, rounding_mode rm = rounding_mode::standard, uint32_t rng = 0) float8(const double v, rounding_mode rm = rounding_mode::standard, uint32_t rng = 0)
: float8((float)v, rm, rng) : float8(static_cast<float>(v), rm, rng)
{ {
} }
// constructor from bool // constructor from bool
explicit constexpr __device__ explicit constexpr __device__
float8(const bool v, rounding_mode rm = rounding_mode::standard, uint32_t rng = 0) float8(const bool v, rounding_mode rm = rounding_mode::standard, uint32_t rng = 0)
: float8((float)(v), rm, rng) : float8(static_cast<float>(v), rm, rng)
{ {
} }
// convert to float // convert to float
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment