DPC++ Runtime
Runtime libraries for oneAPI DPC++
common.hpp
Go to the documentation of this file.
1 //===- common.hpp ---------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #pragma once
10 
11 #include <type_traits>
12 
13 #include <sycl/half_type.hpp>
14 
15 namespace sycl {
16 inline namespace _V1 {
17 
18 namespace ext {
19 namespace oneapi {
20 namespace experimental {
21 
25 
26 template <class _Tp> struct is_genfloat;
27 
28 template <class _Tp, class _Enable = void> class complex;
29 
30 template <class _Tp>
31 class complex<_Tp, typename std::enable_if_t<is_genfloat<_Tp>::value>>;
32 
36 
37 template <class _Tp>
38 struct is_genfloat : std::bool_constant<std::is_same_v<_Tp, double> ||
39  std::is_same_v<_Tp, float> ||
40  std::is_same_v<_Tp, sycl::half>> {};
41 
42 template <class _Tp>
44  : std::bool_constant<std::is_same_v<_Tp, complex<double>> ||
45  std::is_same_v<_Tp, complex<float>> ||
46  std::is_same_v<_Tp, complex<sycl::half>>> {};
47 
51 
52 #define _SYCL_EXT_CPLX_INLINE_VISIBILITY \
53  inline __attribute__((__visibility__("hidden"), __always_inline__))
54 
55 } // namespace experimental
56 } // namespace oneapi
57 } // namespace ext
58 
59 } // namespace _V1
60 } // namespace sycl
Definition: access.hpp:18