DPC++ Runtime
Runtime libraries for oneAPI DPC++
invoke_simd_types.hpp
Go to the documentation of this file.
1 //==- invoke_simd_types.hpp - SYCL invoke_simd extension types --*- C++ -*-==//
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 // Part of the implemenation of the sycl_ext_oneapi_invoke_simd extension.
9 // https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/proposed/sycl_ext_oneapi_invoke_simd.asciidoc
10 // ===--------------------------------------------------------------------=== //
11 
12 #pragma once
13 
14 // SYCL extension macro definition as required by the SYCL specification.
15 // 1 - Initial extension version. Base features are supported.
16 #define SYCL_EXT_ONEAPI_INVOKE_SIMD 1
17 
20 
21 namespace sycl {
22 inline namespace _V1 {
23 
24 namespace ext::oneapi::experimental {
25 
26 // --- Basic definitions prescribed by the spec.
27 namespace simd_abi {
28 // "Fixed-size simd width of N" ABI based on clang vectors - used as the ABI for
29 // SIMD objects this implementation of invoke_simd spec is based on.
30 template <class T, int N>
31 using native_fixed_size = typename std::experimental::__simd_abi<
32  std::experimental::_StorageKind::_VecExt, N>;
33 } // namespace simd_abi
34 
35 // The SIMD object type, which is the generic std::experimental::simd type with
36 // the native fixed size ABI.
37 template <class T, int N>
38 using simd = std::experimental::simd<T, simd_abi::native_fixed_size<T, N>>;
39 
40 // The SIMD mask object type.
41 template <class T, int N>
42 using simd_mask =
43  std::experimental::simd_mask<T, simd_abi::native_fixed_size<T, N>>;
44 } // namespace ext::oneapi::experimental
45 } // namespace _V1
46 } // namespace sycl
Definition: simd.hpp:1387
typename std::experimental::__simd_abi< std::experimental::_StorageKind::_VecExt, N > native_fixed_size
Definition: access.hpp:18