Skip to content

Commit 1e76a8c

Browse files
committed
Change bit_cast.hpp
1 parent 5deae7d commit 1e76a8c

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

sycl/include/CL/sycl/bit_cast.hpp

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
#pragma once
1010

11-
#include <cstdint>
1211
#include <type_traits>
1312

1413
#if __cpp_lib_bit_cast
@@ -21,21 +20,6 @@ namespace sycl {
2120
// forward decl
2221
namespace detail {
2322
inline void memcpy(void *Dst, const void *Src, std::size_t Size);
24-
25-
namespace half_impl {
26-
class half;
27-
}
28-
using half = cl::sycl::detail::half_impl::half;
29-
30-
template <typename T>
31-
#ifdef __SYCL_DEVICE_ONLY__
32-
using lowering_half_type =
33-
typename std::conditional<std::is_same<T, half>::value, _Float16, T>::type;
34-
#else
35-
using lowering_half_type =
36-
typename std::conditional<std::is_same<T, half>::value, std::uint16_t,
37-
T>::type;
38-
#endif
3923
}
4024

4125
template <typename To, typename From>
@@ -57,8 +41,7 @@ constexpr
5741
#if __has_builtin(__builtin_bit_cast)
5842
return __builtin_bit_cast(To, from);
5943
#else // __has_builtin(__builtin_bit_cast)
60-
static_assert(std::is_trivially_default_constructible<
61-
typename sycl::detail::lowering_half_type<To>>::value,
44+
static_assert(std::is_trivially_default_constructible<To>::value,
6245
"To must be trivially default constructible");
6346
To to;
6447
sycl::detail::memcpy(&to, &from, sizeof(To));

0 commit comments

Comments
 (0)