EXSWHTEC-335 - Introduce float16 support to numerical accuracy test base #409

Change-Id: I2b8ba06b4a078b72469615d2e075d18d58de9652
This commit is contained in:
Mirza Halilcevic
2024-02-05 20:11:52 +05:30
gecommit door Rakesh Roy
bovenliggende 8f8e30e1c6
commit 6b9857cf17
+1 -3
Bestand weergeven
@@ -33,9 +33,7 @@ class Float16 {
__host__ __device__ Float16(__half2 x) : x_{__low2half(x)} {}
__host__ __device__ Float16(float x) : x_{__float2half(x)} {}
__host__ __device__ bool operator==(Float16 other) const {
return static_cast<__half_raw>(x_).data == static_cast<__half_raw>(other.x_).data;
}
__host__ __device__ bool operator==(Float16 other) const { return __heq(x_, other.x_); }
__host__ __device__ bool operator!=(Float16 other) const { return !(*this == other); }
__host__ __device__ operator __half() const { return x_; }