From 9662fa86bb7c57c1a015ac0bf52cb52940fbbf80 Mon Sep 17 00:00:00 2001 From: danthe3rd Date: Fri, 14 Oct 2022 09:59:24 +0000 Subject: [PATCH] Remove bit_cast --- include/cutlass/platform/platform.h | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/include/cutlass/platform/platform.h b/include/cutlass/platform/platform.h index ced1bef21..db8297496 100644 --- a/include/cutlass/platform/platform.h +++ b/include/cutlass/platform/platform.h @@ -574,21 +574,6 @@ using std::is_trivially_copyable; #endif - -//----------------------------------------------------------------------------- -// bit_cast -//----------------------------------------------------------------------------- - -template< class To, class From > -constexpr To CUTLASS_HOST_DEVICE bit_cast(const From& from ) noexcept; - -template -constexpr To CUTLASS_HOST_DEVICE bit_cast(const From& src) noexcept -{ - static_assert(sizeof(To) == sizeof(From), "sizes must match"); - return reinterpret_cast(src); -} - //----------------------------------------------------------------------------- // Alignment and layout utilities //----------------------------------------------------------------------------- @@ -883,7 +868,7 @@ struct numeric_limits { template <> struct numeric_limits { CUTLASS_HOST_DEVICE - static constexpr float infinity() noexcept { return bit_cast(0x7f800000);} + static constexpr float infinity() noexcept { return 1.0f / 0.0f;} static constexpr bool is_integer = false; static constexpr bool has_infinity = true; };