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 
13 #include <CL/sycl/stl.hpp>
15 #include <tuple>
16 
18 namespace sycl::ext::intel::experimental::detail {
19 
20 template <template <int32_t> class _Type, class _T>
21 struct _MatchType : std::is_same<_Type<_T::value>, _T> {};
22 
23 template <template <int32_t> class _Type, class... _T> struct _GetValue {
24  static constexpr auto value = _Type<0>::default_value;
25 };
26 
27 template <template <int32_t> class _Type, class _T1, class... _T>
28 struct _GetValue<_Type, _T1, _T...> {
29  static constexpr auto value =
31  _GetValue<_Type, _T...>>::value;
32 };
33 
34 // Get the specified property from the given compile-time property list. If
35 // the property is not provided in the property list, get the default version of
36 // this property.
37 template <typename PropListT, typename PropKeyT, typename DefaultPropValT,
38  typename = void>
40  using type = DefaultPropValT;
41 };
42 template <typename PropListT, typename PropKeyT, typename DefaultPropValT>
44  PropListT, PropKeyT, DefaultPropValT,
45  std::enable_if_t<PropListT::template has_property<PropKeyT>()>> {
46  using type = decltype(PropListT::template get_property<PropKeyT>());
47 };
48 
49 // Default latency_anchor_id property for latency control, indicating the
50 // applied operation is not an anchor.
52 // Default latency_constraint property for latency control, indicating the
53 // applied operation is not a non-anchor.
56 
57 } // namespace sycl::ext::intel::experimental::detail
58 } // __SYCL_INLINE_NAMESPACE(cl)
cl::sycl::ext::intel::experimental::detail::GetOrDefaultValT< PropListT, PropKeyT, DefaultPropValT, std::enable_if_t< PropListT::template has_property< PropKeyT >()> >::type
decltype(PropListT::template get_property< PropKeyT >()) type
Definition: fpga_utils.hpp:46
conditional_t
stl.hpp
cl::sycl::ext::intel::experimental::detail::_GetValue
Definition: fpga_utils.hpp:23
cl::sycl::ext::intel::experimental::detail::_MatchType
Definition: fpga_utils.hpp:21
stl_type_traits.hpp
properties.hpp
defines.hpp
cl::sycl::ext::intel::experimental::detail::GetOrDefaultValT::type
DefaultPropValT type
Definition: fpga_utils.hpp:40
cl
We provide new interfaces for matrix muliply in this patch:
Definition: access.hpp:13
cl::sycl::ext::intel::experimental::detail::GetOrDefaultValT
Definition: fpga_utils.hpp:39
std
Definition: accessor.hpp:2616
cl::sycl::detail::enable_if_t
typename std::enable_if< B, T >::type enable_if_t
Definition: stl_type_traits.hpp:24
cl::sycl::ext::oneapi::experimental::property_value
Definition: property_utils.hpp:23
__SYCL_INLINE_NAMESPACE
#define __SYCL_INLINE_NAMESPACE(X)
Definition: defines_elementary.hpp:12