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>
39  : std::integral_constant<bool, std::is_same_v<_Tp, double> ||
40  std::is_same_v<_Tp, float> ||
41  std::is_same_v<_Tp, sycl::half>> {};
42 
43 template <class _Tp>
45  : std::integral_constant<bool,
46  std::is_same_v<_Tp, complex<double>> ||
47  std::is_same_v<_Tp, complex<float>> ||
48  std::is_same_v<_Tp, complex<sycl::half>>> {};
49 
53 
54 #define _SYCL_EXT_CPLX_INLINE_VISIBILITY \
55  inline __attribute__((__visibility__("hidden"), __always_inline__))
56 
57 } // namespace experimental
58 } // namespace oneapi
59 } // namespace ext
60 
61 } // namespace _V1
62 } // namespace sycl
Definition: access.hpp:18