DPC++ Runtime
Runtime libraries for oneAPI DPC++
Miscellaneous ESIMD convenience functions.
Collaboration diagram for Miscellaneous ESIMD convenience functions.:

Functions

template<class T , int N>
__ESIMD_API simd< T, N > cl::sycl::ext::intel::esimd::merge (simd< T, N > a, simd< T, N > b, simd_mask< N > m)
 "Merges" elements of the input simd object according to the merge mask. More...
 
template<int N>
__ESIMD_API simd_mask< N > cl::sycl::ext::intel::esimd::merge (simd_mask< N > a, simd_mask< N > b, simd_mask< N > m)
 "Merges" elements of the input masks according to the merge mask. More...
 
template<class BaseT1 , class BaseT2 , class RegionT1 , class RegionT2 , class = std::enable_if_t< (shape_type<RegionT1>::length == shape_type<RegionT2>::length) && std::is_same_v<detail::element_type_t<BaseT1>, detail::element_type_t<BaseT2>>>>
__ESIMD_API auto cl::sycl::ext::intel::esimd::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. More...
 
template<typename Ty , int N>
std::ostream & operator<< (std::ostream &OS, const sycl::ext::intel::esimd::simd< Ty, N > &V)
 

Detailed Description

Function Documentation

◆ merge() [1/3]

template<class T , int N>
__ESIMD_API simd<T, N> cl::sycl::ext::intel::esimd::merge ( simd< T, N >  a,
simd< T, N >  b,
simd_mask< N >  m 
)

"Merges" elements of the input simd object according to the merge mask.

Parameters
aThe first simd object.
bThe second simd object.
mThe merge mask.
Returns
A simd object, where each element equals to corresponding element from a if corresponding merge mask element is non-zero or element from b otherwise.

Definition at line 28 of file alt_ui.hpp.

References cl::sycl::a.

Referenced by cl::__ESIMD_DNS::simd_view_impl< BaseTy, RegionTy >::merge().

◆ merge() [2/3]

template<int N>
__ESIMD_API simd_mask<N> cl::sycl::ext::intel::esimd::merge ( simd_mask< N >  a,
simd_mask< N >  b,
simd_mask< N >  m 
)

"Merges" elements of the input masks according to the merge mask.

Parameters
aThe first mask.
bThe second mask.
mThe merge mask.
Returns
A mask, where each element equals to corresponding element from a if corresponding merge mask element is non-zero or element from b otherwise.

Definition at line 41 of file alt_ui.hpp.

References cl::sycl::a.

◆ merge() [3/3]

template<class BaseT1 , class BaseT2 , class RegionT1 , class RegionT2 , class = std::enable_if_t< (shape_type<RegionT1>::length == shape_type<RegionT2>::length) && std::is_same_v<detail::element_type_t<BaseT1>, detail::element_type_t<BaseT2>>>>
__ESIMD_API auto cl::sycl::ext::intel::esimd::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.

Available only when all of the length and the element type of the subregions referenced by both input views are the same.

Parameters
aThe first view.
bThe second view.
mThe merge mask.
Returns
A vector (mask or simd object), where each element equals to corresponding element from a if corresponding merge mask element is non-zero or element from b otherwise.

Definition at line 60 of file alt_ui.hpp.

◆ operator<<()

template<typename Ty , int N>
std::ostream& operator<< ( std::ostream &  OS,
const sycl::ext::intel::esimd::simd< Ty, N > &  V 
)

Prints a simd object to an output stream. TODO: implemented for host code only.

Definition at line 207 of file simd.hpp.