DPC++ Runtime
Runtime libraries for oneAPI DPC++
common.hpp
Go to the documentation of this file.
1 //==---------------- common.hpp - DPC++ Explicit SIMD API ----------------==//
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 // Common definitions used in experimental Explicit SIMD APIs.
9 //===----------------------------------------------------------------------===//
10 
11 #pragma once
12 
17 
18 #include <cstdint>
19 #include <type_traits>
20 
21 namespace sycl {
22 inline namespace _V1 {
23 namespace ext::intel::experimental::esimd {
24 
27 
29 
30 namespace detail {
31 
33 
35 
36 template <lsc_vector_size VS> constexpr void check_lsc_vector_size() {
37  __ESIMD_DNS::check_lsc_vector_size<VS>();
38 }
39 
40 template <int VS> constexpr void check_lsc_vector_size() {
41  __ESIMD_DNS::check_lsc_vector_size<VS>();
42 }
43 
44 template <typename T, lsc_data_size DS> constexpr void check_lsc_data_size() {
45  __ESIMD_DNS::check_lsc_data_size<T, DS>();
46 }
47 
48 template <lsc_vector_size VS> constexpr uint8_t to_int() {
49  return __ESIMD_DNS::to_int<VS>();
50 }
51 
52 template <int VS> constexpr lsc_vector_size to_lsc_vector_size() {
53  return __ESIMD_DNS::to_lsc_vector_size<VS>();
54 }
55 
56 template <typename T, lsc_data_size DS>
58  return __ESIMD_DNS::finalize_data_size<T, DS>();
59 }
60 
63 }
64 
65 template <typename T> struct lsc_expand_type {
66  using type = __ESIMD_DNS::lsc_expand_type<T>::type;
67 };
68 
69 } // namespace detail
70 
73 
75 enum class split_barrier_action : uint8_t {
76  wait = 0, // split barrier wait
77  signal = 1, // split barrier signal
78 };
79 
81 
82 } // namespace ext::intel::experimental::esimd
83 } // namespace _V1
84 } // namespace sycl
__ESIMD_DNS::lsc_data_size lsc_data_size
Definition: common.hpp:28
sycl::ext::intel::esimd::cache_hint cache_hint
L1 or L2 cache hint kinds.
Definition: common.hpp:72
split_barrier_action
Represents a split barrier action.
Definition: common.hpp:75
cache_hint
L1, L2 or L3 cache hints.
constexpr lsc_data_size finalize_data_size()
Definition: common.hpp:57
constexpr lsc_vector_size to_lsc_vector_size()
Definition: common.hpp:52
constexpr lsc_data_size expand_data_size(lsc_data_size DS)
Definition: common.hpp:61
__ESIMD_DNS::lsc_data_order lsc_data_order
Definition: common.hpp:34
__ESIMD_DNS::lsc_vector_size lsc_vector_size
Definition: common.hpp:32
Definition: access.hpp:18