8
8
9
9
#pragma once
10
10
11
- #include < cstdint>
12
11
#include < type_traits>
13
12
14
13
#if __cpp_lib_bit_cast
@@ -21,21 +20,6 @@ namespace sycl {
21
20
// forward decl
22
21
namespace detail {
23
22
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
39
23
}
40
24
41
25
template <typename To, typename From>
@@ -57,8 +41,7 @@ constexpr
57
41
#if __has_builtin(__builtin_bit_cast)
58
42
return __builtin_bit_cast (To, from);
59
43
#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,
62
45
" To must be trivially default constructible" );
63
46
To to;
64
47
sycl::detail::memcpy (&to, &from, sizeof (To));
0 commit comments