DPC++ Runtime
Runtime libraries for oneAPI DPC++
alt_ui.hpp
Go to the documentation of this file.
1 //==-------------- alt_ui.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 // "Alternative" convenience Explicit SIMD APIs.
9 //===----------------------------------------------------------------------===//
10 
13 
14 namespace sycl {
16 namespace ext::intel::esimd {
19 
27 template <class T, int N>
29  b.merge(a, m);
30  return b;
31 }
32 
40 template <int N>
42  b.merge(a, m);
43  return a;
44 }
45 
55 template <class BaseT1, class BaseT2, class RegionT1, class RegionT2,
56  class = std::enable_if_t<
58  std::is_same_v<detail::element_type_t<BaseT1>,
59  detail::element_type_t<BaseT2>>>>
60 __ESIMD_API auto merge(simd_view<BaseT1, RegionT1> v1,
63  return merge(v1.read(), v2.read(), m);
64 }
65 
67 
68 } // namespace ext::intel::esimd
69 } // __SYCL_INLINE_VER_NAMESPACE(_V1)
70 } // namespace sycl
value_type read() const
Reads the viewed region from the target w/o any conversion and returns as an object of the value_type...
This class represents a reference to a sub-region of a base simd object.
Definition: simd_view.hpp:37
The main simd vector class.
Definition: simd.hpp:57
#define __SYCL_INLINE_VER_NAMESPACE(X)
__ESIMD_API auto merge(simd_view< BaseT1, RegionT1 > v1, simd_view< BaseT2, RegionT2 > v2, simd_mask< shape_type< RegionT1 >::length > m)
"Merges" elements of vectors referenced by the input views.
Definition: alt_ui.hpp:60
typename std::enable_if< B, T >::type enable_if_t
float length(T p) __NOEXC
Definition: builtins.hpp:1032
---— Error handling, matching OpenCL plugin semantics.
Definition: access.hpp:14