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 
15 namespace __ESIMD_NS {
16 
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 __ESIMD_NS
69 } // __SYCL_INLINE_NAMESPACE(cl)
simd_mask
Definition: simd.hpp:1029
simd_view.hpp
cl::sycl::length
float length(T p) __NOEXC
Definition: builtins.hpp:1032
cl::sycl::ext::intel::esimd::simd_view
This class represents a reference to a sub-region of a base simd object.
Definition: types.hpp:32
cl::sycl::ext::intel::esimd::simd
The main simd vector class.
Definition: types.hpp:31
cl::sycl::ext::intel::esimd::merge
__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
cl
We provide new interfaces for matrix muliply in this patch:
Definition: access.hpp:13
simd.hpp
cl::sycl::image_channel_order::a
@ a
cl::sycl::detail::enable_if_t
typename std::enable_if< B, T >::type enable_if_t
Definition: stl_type_traits.hpp:24
__SYCL_INLINE_NAMESPACE
#define __SYCL_INLINE_NAMESPACE(X)
Definition: defines_elementary.hpp:12