Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
typeAliasFp16.hpp
Go to the documentation of this file.
1// -------------------------------------------------------//
2//
3// SHAMROCK code for hydrodynamics
4// Copyright (c) 2021-2026 Timothée David--Cléris <tim.shamrock@proton.me>
5// SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6// Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7//
8// -------------------------------------------------------//
9
10#pragma once
11
19#ifdef SYCL_COMP_ACPP
20
21 #include <hipSYCL/sycl/libkernel/vec.hpp>
22 #include <hipSYCL/sycl/types.hpp>
23
24// copied from hipsycl sycl/sycl.hpp
25namespace sycl {
26 using namespace hipsycl::sycl;
27}
28using f16 = sycl::detail::hp_float; // issue with hipsycl not supporting half
29
30#endif
31
32#ifdef SYCL_COMP_INTEL_LLVM
33
34 #if __has_include(<detail/generic_type_lists.hpp>)
35 #include <detail/generic_type_lists.hpp>
36 #include <sycl/types.hpp>
37 #include <cstdint>
38 #else
39 #include <sycl/sycl.hpp>
40 #endif
41
42using f16 = sycl::half;
43
44#endif
45
46// error with hipsycl half not constexpr
47// constexpr f16 operator""_f16(long double n){return f16(n);}