DPC++ Runtime
Runtime libraries for oneAPI DPC++
fpga_utils.hpp
Go to the documentation of this file.
1 //==------------- fpga_utils.hpp --- SYCL FPGA Reg Extensions --------------==//
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 <sycl/detail/defines.hpp>
13 
14 namespace sycl {
15 inline namespace _V1 {
16 namespace ext::intel {
17 
18 template <template <int32_t> class _Type, class _T>
19 struct _MatchType : std::is_same<_Type<_T::value>, _T> {};
20 
21 template <template <int32_t> class _Type, class... _T> struct _GetValue {
22  static constexpr auto value = _Type<0>::default_value;
23 };
24 
25 template <template <int32_t> class _Type, class _T1, class... _T>
26 struct _GetValue<_Type, _T1, _T...> {
27  static constexpr auto value =
28  std::conditional_t<_MatchType<_Type, _T1>::value, _T1,
29  _GetValue<_Type, _T...>>::value;
30 };
31 } // namespace ext::intel
32 
33 } // namespace _V1
34 } // namespace sycl
Definition: access.hpp:18
static constexpr auto value
Definition: fpga_utils.hpp:22