Base class for "simd view" types. More...
#include <sycl/ext/intel/esimd/detail/simd_view_impl.hpp>
Public Types | |
using | Derived = simd_view< BaseTy, RegionTy > |
The only type which is supposed to extend this one and be used in user code. More... | |
using | element_type = typename ShapeTy::element_type |
Element type of this view, may differ from the element type of the target object. More... | |
using | raw_element_type = __raw_t< element_type > |
Corresponding "raw" (storage) type for the element type. More... | |
using | value_type = get_simd_t< element_type, length > |
The simd type of the viewed region of the target object. More... | |
using | raw_vector_type = vector_type_t< __raw_t< element_type >, length > |
The underlying builtin vector type of the the viewed region. More... | |
Public Member Functions | |
simd_view_impl (const simd_view_impl &Other)=default | |
Default copy constructor. More... | |
simd_view_impl (simd_view_impl &&Other)=default | |
Default move constructor. More... | |
template<typename ToTy , class T = BaseTy, class = std::enable_if_t<is_simd_type_v<T>>> | |
operator simd< ToTy, length > () const | |
Implicit conversion to a simd object with potentially different element type. More... | |
template<class T = BaseTy, class = std::enable_if_t<is_simd_mask_type_v<T>>> | |
operator simd_mask_type< length > () const | |
Implicit conversion to a simd_mask object. More... | |
constexpr uint16_t | getOffsetX () const |
Get the offset of the first element of the view within the parent object along X dimension. More... | |
constexpr uint16_t | getOffsetY () const |
Get the offset of the first element of the view within the parent object along Y dimension. More... | |
value_type | read () const |
Reads the viewed region from the target w/o any conversion and returns as an object of the value_type type. More... | |
value_type::raw_vector_type | data () const |
Derived & | write (const value_type &Val) |
Assigns a new value to the viewed target's region. More... | |
void | merge (const value_type &Val, const simd_mask_type< length > &Mask) |
"Merges" the viewed target's region with given value according to a per-element mask. More... | |
void | merge (const value_type &Val1, value_type Val2, const simd_mask_type< length > &Mask) |
"Merges" given values according to a per-element mask and writes the result to the viewed target's region. More... | |
template<typename EltTy > | |
auto | bit_cast_view () |
Create a 1-dimensional view of the target region. More... | |
template<typename EltTy , int Height, int Width> | |
auto | bit_cast_view () |
Create a 2-dimensional view of the target region. More... | |
template<int Size, int Stride, typename T = Derived, typename = std::enable_if_t<T::is1D()>> | |
auto | select (uint16_t Offset=0) |
1D region select. More... | |
template<int SizeY, int StrideY, int SizeX, int StrideX, typename T = Derived, typename = std::enable_if_t<T::is2D()>> | |
auto | select (uint16_t OffsetY=0, uint16_t OffsetX=0) |
2D region select. More... | |
template<class T1 , int N1, class SimdT1 , class T = element_type, class SimdT = BaseTy, class = std::enable_if_t<(is_simd_type_v<SimdT> == is_simd_type_v<SimdT1>) && (N1 == length) && std::is_integral_v<T> &&std::is_integral_v<T1> >> | |
Derived & | operator^= (const simd_obj_impl< T1, N1, SimdT1 > &RHS) |
template<class SimdT1 , class RegionT1 , class T1 = typename sycl::ext::intel::esimd ::shape_type<RegionT1>::element_type, class T = element_type, class SimdT = BaseTy, class = std::enable_if_t< (is_simd_type_v<SimdT> == is_simd_type_v<SimdT1>) && (length == sycl::ext::intel::esimd ::shape_type<RegionT1>::length) && std::is_integral_v<T> &&std::is_integral_v<T1> >> | |
Derived & | operator^= (const simd_view_impl< SimdT1, RegionT1 > &RHS) |
template<class T1 , class T = element_type, class SimdT = BaseTy, class = std::enable_if_t< std::is_integral_v<T> &&std::is_integral_v<T1> >> | |
Derived & | operator^= (T1 RHS) |
template<class T1 , int N1, class SimdT1 , class T = element_type, class SimdT = BaseTy, class = std::enable_if_t<(is_simd_type_v<SimdT> == is_simd_type_v<SimdT1>) && (N1 == length) && std::is_integral_v<T> &&std::is_integral_v<T1> >> | |
Derived & | operator|= (const simd_obj_impl< T1, N1, SimdT1 > &RHS) |
template<class SimdT1 , class RegionT1 , class T1 = typename sycl::ext::intel::esimd ::shape_type<RegionT1>::element_type, class T = element_type, class SimdT = BaseTy, class = std::enable_if_t< (is_simd_type_v<SimdT> == is_simd_type_v<SimdT1>) && (length == sycl::ext::intel::esimd ::shape_type<RegionT1>::length) && std::is_integral_v<T> &&std::is_integral_v<T1> >> | |
Derived & | operator|= (const simd_view_impl< SimdT1, RegionT1 > &RHS) |
template<class T1 , class T = element_type, class SimdT = BaseTy, class = std::enable_if_t< std::is_integral_v<T> &&std::is_integral_v<T1> >> | |
Derived & | operator|= (T1 RHS) |
template<class T1 , int N1, class SimdT1 , class T = element_type, class SimdT = BaseTy, class = std::enable_if_t<(is_simd_type_v<SimdT> == is_simd_type_v<SimdT1>) && (N1 == length) && std::is_integral_v<T> &&std::is_integral_v<T1> >> | |
Derived & | operator&= (const simd_obj_impl< T1, N1, SimdT1 > &RHS) |
template<class SimdT1 , class RegionT1 , class T1 = typename sycl::ext::intel::esimd ::shape_type<RegionT1>::element_type, class T = element_type, class SimdT = BaseTy, class = std::enable_if_t< (is_simd_type_v<SimdT> == is_simd_type_v<SimdT1>) && (length == sycl::ext::intel::esimd ::shape_type<RegionT1>::length) && std::is_integral_v<T> &&std::is_integral_v<T1> >> | |
Derived & | operator&= (const simd_view_impl< SimdT1, RegionT1 > &RHS) |
template<class T1 , class T = element_type, class SimdT = BaseTy, class = std::enable_if_t< std::is_integral_v<T> &&std::is_integral_v<T1> >> | |
Derived & | operator&= (T1 RHS) |
template<class T1 , int N1, class SimdT1 , class T = element_type, class SimdT = BaseTy, class = std::enable_if_t<(is_simd_type_v<SimdT> == is_simd_type_v<SimdT1>) && (N1 == length) && std::is_integral_v<T> &&std::is_integral_v<T1> >> | |
Derived & | operator%= (const simd_obj_impl< T1, N1, SimdT1 > &RHS) |
template<class SimdT1 , class RegionT1 , class T1 = typename sycl::ext::intel::esimd ::shape_type<RegionT1>::element_type, class T = element_type, class SimdT = BaseTy, class = std::enable_if_t< (is_simd_type_v<SimdT> == is_simd_type_v<SimdT1>) && (length == sycl::ext::intel::esimd ::shape_type<RegionT1>::length) && std::is_integral_v<T> &&std::is_integral_v<T1> >> | |
Derived & | operator%= (const simd_view_impl< SimdT1, RegionT1 > &RHS) |
template<class T1 , class T = element_type, class SimdT = BaseTy, class = std::enable_if_t< std::is_integral_v<T> &&std::is_integral_v<T1> >> | |
Derived & | operator%= (T1 RHS) |
template<class T1 , int N1, class SimdT1 , class T = element_type, class SimdT = BaseTy, class = std::enable_if_t<(is_simd_type_v<SimdT> == is_simd_type_v<SimdT1>) && (N1 == length) && std::is_integral_v<T> &&std::is_integral_v<T1> &&is_simd_type_v<SimdT> >> | |
Derived & | operator<<= (const simd_obj_impl< T1, N1, SimdT1 > &RHS) |
template<class SimdT1 , class RegionT1 , class T1 = typename sycl::ext::intel::esimd ::shape_type<RegionT1>::element_type, class T = element_type, class SimdT = BaseTy, class = std::enable_if_t< (is_simd_type_v<SimdT> == is_simd_type_v<SimdT1>) && (length == sycl::ext::intel::esimd ::shape_type<RegionT1>::length) && std::is_integral_v<T> &&std::is_integral_v<T1> &&is_simd_type_v<SimdT> >> | |
Derived & | operator<<= (const simd_view_impl< SimdT1, RegionT1 > &RHS) |
template<class T1 , class T = element_type, class SimdT = BaseTy, class = std::enable_if_t< std::is_integral_v<T> &&std::is_integral_v<T1> &&is_simd_type_v<SimdT> >> | |
Derived & | operator<<= (T1 RHS) |
template<class T1 , int N1, class SimdT1 , class T = element_type, class SimdT = BaseTy, class = std::enable_if_t<(is_simd_type_v<SimdT> == is_simd_type_v<SimdT1>) && (N1 == length) && std::is_integral_v<T> &&std::is_integral_v<T1> &&is_simd_type_v<SimdT> >> | |
Derived & | operator>>= (const simd_obj_impl< T1, N1, SimdT1 > &RHS) |
template<class SimdT1 , class RegionT1 , class T1 = typename sycl::ext::intel::esimd ::shape_type<RegionT1>::element_type, class T = element_type, class SimdT = BaseTy, class = std::enable_if_t< (is_simd_type_v<SimdT> == is_simd_type_v<SimdT1>) && (length == sycl::ext::intel::esimd ::shape_type<RegionT1>::length) && std::is_integral_v<T> &&std::is_integral_v<T1> &&is_simd_type_v<SimdT> >> | |
Derived & | operator>>= (const simd_view_impl< SimdT1, RegionT1 > &RHS) |
template<class T1 , class T = element_type, class SimdT = BaseTy, class = std::enable_if_t< std::is_integral_v<T> &&std::is_integral_v<T1> &&is_simd_type_v<SimdT> >> | |
Derived & | operator>>= (T1 RHS) |
template<class T1 , int N1, class SimdT1 , class T = element_type, class SimdT = BaseTy, class = std::enable_if_t<(is_simd_type_v<SimdT> == is_simd_type_v<SimdT1>) && (N1 == length) && is_valid_simd_elem_type_v<T> &&is_valid_simd_elem_type_v<T1> &&is_simd_type_v<SimdT> >> | |
Derived & | operator+= (const simd_obj_impl< T1, N1, SimdT1 > &RHS) |
template<class SimdT1 , class RegionT1 , class T1 = typename sycl::ext::intel::esimd ::shape_type<RegionT1>::element_type, class T = element_type, class SimdT = BaseTy, class = std::enable_if_t< (is_simd_type_v<SimdT> == is_simd_type_v<SimdT1>) && (length == sycl::ext::intel::esimd ::shape_type<RegionT1>::length) && is_valid_simd_elem_type_v<T> &&is_valid_simd_elem_type_v<T1> &&is_simd_type_v<SimdT> >> | |
Derived & | operator+= (const simd_view_impl< SimdT1, RegionT1 > &RHS) |
template<class T1 , class T = element_type, class SimdT = BaseTy, class = std::enable_if_t< is_valid_simd_elem_type_v<T> &&is_valid_simd_elem_type_v<T1> &&is_simd_type_v<SimdT> >> | |
Derived & | operator+= (T1 RHS) |
template<class T1 , int N1, class SimdT1 , class T = element_type, class SimdT = BaseTy, class = std::enable_if_t<(is_simd_type_v<SimdT> == is_simd_type_v<SimdT1>) && (N1 == length) && is_valid_simd_elem_type_v<T> &&is_valid_simd_elem_type_v<T1> &&is_simd_type_v<SimdT> >> | |
Derived & | operator-= (const simd_obj_impl< T1, N1, SimdT1 > &RHS) |
template<class SimdT1 , class RegionT1 , class T1 = typename sycl::ext::intel::esimd ::shape_type<RegionT1>::element_type, class T = element_type, class SimdT = BaseTy, class = std::enable_if_t< (is_simd_type_v<SimdT> == is_simd_type_v<SimdT1>) && (length == sycl::ext::intel::esimd ::shape_type<RegionT1>::length) && is_valid_simd_elem_type_v<T> &&is_valid_simd_elem_type_v<T1> &&is_simd_type_v<SimdT> >> | |
Derived & | operator-= (const simd_view_impl< SimdT1, RegionT1 > &RHS) |
template<class T1 , class T = element_type, class SimdT = BaseTy, class = std::enable_if_t< is_valid_simd_elem_type_v<T> &&is_valid_simd_elem_type_v<T1> &&is_simd_type_v<SimdT> >> | |
Derived & | operator-= (T1 RHS) |
template<class T1 , int N1, class SimdT1 , class T = element_type, class SimdT = BaseTy, class = std::enable_if_t<(is_simd_type_v<SimdT> == is_simd_type_v<SimdT1>) && (N1 == length) && is_valid_simd_elem_type_v<T> &&is_valid_simd_elem_type_v<T1> &&is_simd_type_v<SimdT> >> | |
Derived & | operator*= (const simd_obj_impl< T1, N1, SimdT1 > &RHS) |
template<class SimdT1 , class RegionT1 , class T1 = typename sycl::ext::intel::esimd ::shape_type<RegionT1>::element_type, class T = element_type, class SimdT = BaseTy, class = std::enable_if_t< (is_simd_type_v<SimdT> == is_simd_type_v<SimdT1>) && (length == sycl::ext::intel::esimd ::shape_type<RegionT1>::length) && is_valid_simd_elem_type_v<T> &&is_valid_simd_elem_type_v<T1> &&is_simd_type_v<SimdT> >> | |
Derived & | operator*= (const simd_view_impl< SimdT1, RegionT1 > &RHS) |
template<class T1 , class T = element_type, class SimdT = BaseTy, class = std::enable_if_t< is_valid_simd_elem_type_v<T> &&is_valid_simd_elem_type_v<T1> &&is_simd_type_v<SimdT> >> | |
Derived & | operator*= (T1 RHS) |
template<class T1 , int N1, class SimdT1 , class T = element_type, class SimdT = BaseTy, class = std::enable_if_t<(is_simd_type_v<SimdT> == is_simd_type_v<SimdT1>) && (N1 == length) && is_valid_simd_elem_type_v<T> &&is_valid_simd_elem_type_v<T1> &&is_simd_type_v<SimdT> >> | |
Derived & | operator/= (const simd_obj_impl< T1, N1, SimdT1 > &RHS) |
template<class SimdT1 , class RegionT1 , class T1 = typename sycl::ext::intel::esimd ::shape_type<RegionT1>::element_type, class T = element_type, class SimdT = BaseTy, class = std::enable_if_t< (is_simd_type_v<SimdT> == is_simd_type_v<SimdT1>) && (length == sycl::ext::intel::esimd ::shape_type<RegionT1>::length) && is_valid_simd_elem_type_v<T> &&is_valid_simd_elem_type_v<T1> &&is_simd_type_v<SimdT> >> | |
Derived & | operator/= (const simd_view_impl< SimdT1, RegionT1 > &RHS) |
template<class T1 , class T = element_type, class SimdT = BaseTy, class = std::enable_if_t< is_valid_simd_elem_type_v<T> &&is_valid_simd_elem_type_v<T1> &&is_simd_type_v<SimdT> >> | |
Derived & | operator/= (T1 RHS) |
template<class T = element_type, class = std::enable_if_t<std::is_integral_v<T>>> | |
auto | operator! () |
Unary logical negeation operator. Applies only to integer element types. More... | |
simd_view_impl & | operator= (const simd_view_impl &Other) |
Copy assignment. More... | |
Derived & | operator= (const Derived &Other) |
Assignment from an object of the derived class. More... | |
Derived & | operator= (const value_type &Val) |
Assignment from a value_type object - simd or simd_mask . More... | |
Derived & | operator= (Derived &&Other) |
Assignment from an rvalue object of the derived class. More... | |
simd_view_impl & | operator= (simd_view_impl &&Other) |
Move assignment operator. Updates the target region viewed by this object. More... | |
template<class T , int N, class SimdT , class = std::enable_if_t<(is_simd_type_v<SimdT> == is_simd_type_v<BaseTy>) && (length == SimdT::length)>> | |
Derived & | operator= (const simd_obj_impl< T, N, SimdT > &Other) |
Assignment with element type conversion from a vector object. More... | |
template<class T1 , class = std::enable_if_t<is_valid_simd_elem_type_v<T1>>> | |
Derived & | operator= (T1 RHS) |
Broadcast assignment of a scalar with conversion. More... | |
Derived & | operator++ () |
Prefix increment. More... | |
value_type | operator++ (int) |
Postfix increment. More... | |
Derived & | operator-- () |
Prefix decrement. More... | |
value_type | operator-- (int) |
Postfix decrement. More... | |
template<typename T = Derived, typename = std::enable_if_t<T::is2D()>> | |
auto | row (int i) |
Reference a row from a 2D region. More... | |
template<typename T = Derived, typename = std::enable_if_t<T::is2D()>> | |
auto | column (int i) |
Reference a column from a 2D region. More... | |
template<typename T = Derived, typename = std::enable_if_t<T::is1D()>> | |
element_type | operator[] (int i) const |
Read a single element from the target 1D region. More... | |
template<typename T = Derived, typename = std::enable_if_t<T::is1D()>> | |
auto | operator[] (int i) |
Return a writeable view of a single element in the target 1D region. More... | |
template<int Rep> | |
get_simd_t< element_type, Rep > | replicate () |
Applies simd_obj_impl::replicate to the target region. More... | |
template<int Rep, int W> | |
get_simd_t< element_type, Rep *W > | replicate_w (uint16_t OffsetX) |
Shortcut to replicate_vs_w<int Rep, int Vs, int W>(uint16_t) with with Vs = 0. More... | |
template<int Rep, int W> | |
get_simd_t< element_type, Rep *W > | replicate_w (uint16_t OffsetY, uint16_t OffsetX) |
Shortcut to replicate_vs_w<int Rep, int Vs, int W>(uint16_t, uint16_t) with Vs = 0. More... | |
template<int Rep, int VS, int W> | |
get_simd_t< element_type, Rep *W > | replicate_vs_w (uint16_t OffsetX) |
Shortcut to replicate_vs_w_hs<int Rep, int VS, int W, int Hs>(uint16_t OffsetY, uint16_t OffsetX) with Hs = 1 and OffsetY = 0. More... | |
template<int Rep, int VS, int W> | |
get_simd_t< element_type, Rep *W > | replicate_vs_w (uint16_t OffsetY, uint16_t OffsetX) |
Shortcut to replicate_vs_w_hs<int Rep, int VS, int W, int Hs>(uint16_t OffsetY, uint16_t OffsetX) with Hs = 1. More... | |
template<int Rep, int VS, int W, int HS> | |
get_simd_t< element_type, Rep *W > | replicate_vs_w_hs (uint16_t OffsetX) |
Applies simd_obj_impl::replicate_vs_w_hs<int Rep, int VS, int W, int HS> to the target region. More... | |
template<int Rep, int VS, int W, int HS> | |
get_simd_t< element_type, Rep *W > | replicate_vs_w_hs (uint16_t OffsetY, uint16_t OffsetX) |
Applies simd_obj_impl::replicate_vs_w_hs<int Rep, int VS, int W, int HS> to the target region. More... | |
template<typename T1 = element_type, typename T2 = BaseTy, typename = std::enable_if_t<std::is_integral_v<T1>, T2>> | |
uint16_t | any () |
Applies simd_obj_impl::any operation to the target region. More... | |
template<typename T1 = element_type, typename T2 = BaseTy, typename = std::enable_if_t<std::is_integral_v<T1>, T2>> | |
uint16_t | all () |
Applies simd_obj_impl::all operation to the target region. More... | |
Static Public Member Functions | |
static constexpr bool | is1D () |
Tells whether this view is 1-dimensional. More... | |
static constexpr bool | is2D () |
Tells whether this view is 2-dimensional. More... | |
static constexpr int | getSizeX () |
Get number of elements in the view along X dimension. More... | |
static constexpr int | getStrideX () |
Get element stride of the view along X dimension. More... | |
static constexpr int | getSizeY () |
Get number of elements in the view along Y dimension. More... | |
static constexpr int | getStrideY () |
Get element stride of the view along Y dimension. More... | |
Base class for "simd view" types.
It is an internal class implementing basic functionality inherited by all simd_view specializations. Objects of this type and its subclasses provide a "view" into objects of types inheriting from simd_obj_impl - simd or simd_mask. Such "viewed into" object are called view "targets". The element type of the view and the target object may differ. The view can also span a subset of target's elements (region) - e.g. in a strided manner. These view parameters - element type and region - are defined by the region type the view class is templated on. simd_view_impl objects are never created directly, only via subclassing.
BaseTy | The type of the target object. Auto-deduced. |
RegionTy | The type defining compile-time known characteristics of the viewed region within the target object. Auto-deduced. |
Definition at line 42 of file simd_view_impl.hpp.
using sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::Derived = simd_view<BaseTy, RegionTy> |
The only type which is supposed to extend this one and be used in user code.
Definition at line 50 of file simd_view_impl.hpp.
using sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::element_type = typename ShapeTy::element_type |
Element type of this view, may differ from the element type of the target object.
Definition at line 79 of file simd_view_impl.hpp.
using sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::raw_element_type = __raw_t<element_type> |
Corresponding "raw" (storage) type for the element type.
Definition at line 82 of file simd_view_impl.hpp.
using sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::raw_vector_type = vector_type_t<__raw_t<element_type>, length> |
The underlying builtin vector type of the the viewed region.
Definition at line 88 of file simd_view_impl.hpp.
using sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::value_type = get_simd_t<element_type, length> |
The simd type of the viewed region of the target object.
Definition at line 85 of file simd_view_impl.hpp.
|
default |
Default copy constructor.
|
default |
Default move constructor.
|
inline |
Applies simd_obj_impl::all operation to the target region.
Definition at line 577 of file simd_view_impl.hpp.
References sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::read().
|
inline |
Applies simd_obj_impl::any operation to the target region.
Definition at line 570 of file simd_view_impl.hpp.
References sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::read().
|
inline |
Create a 1-dimensional view of the target region.
EltTy | The element type of the new view. |
Definition at line 204 of file simd_view_impl.hpp.
|
inline |
Create a 2-dimensional view of the target region.
sizeof(EltTy)*Height*Width
must be equal to the byte size of the target region.
ElTy | The element type of the new view. |
Height | Height of the new view in rows. |
Width | Width of the new view in elements. |
simd_view
object which spans the same target region, but potentially with a different element type and different number of elements, if the sizes of this object's element type and the new one don't match. Definition at line 222 of file simd_view_impl.hpp.
|
inline |
Reference a column from a 2D region.
Available only if this object is 2D.
i | Column index. |
Definition at line 484 of file simd_view_impl.hpp.
|
inline |
Definition at line 167 of file simd_view_impl.hpp.
References sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::read().
Referenced by sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::operator simd< ToTy, length >().
|
inlineconstexpr |
Get the offset of the first element of the view within the parent object along X dimension.
Definition at line 147 of file simd_view_impl.hpp.
|
inlineconstexpr |
Get the offset of the first element of the view within the parent object along Y dimension.
Definition at line 153 of file simd_view_impl.hpp.
|
inlinestaticconstexpr |
Get number of elements in the view along X dimension.
Definition at line 137 of file simd_view_impl.hpp.
Referenced by sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::replicate_vs_w_hs().
|
inlinestaticconstexpr |
Get number of elements in the view along Y dimension.
Definition at line 141 of file simd_view_impl.hpp.
|
inlinestaticconstexpr |
Get element stride of the view along X dimension.
Definition at line 139 of file simd_view_impl.hpp.
|
inlinestaticconstexpr |
Get element stride of the view along Y dimension.
Definition at line 143 of file simd_view_impl.hpp.
|
inlinestaticconstexpr |
Tells whether this view is 1-dimensional.
Definition at line 133 of file simd_view_impl.hpp.
|
inlinestaticconstexpr |
Tells whether this view is 2-dimensional.
Definition at line 135 of file simd_view_impl.hpp.
Referenced by sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::replicate_vs_w_hs().
|
inline |
"Merges" the viewed target's region with given value according to a per-element mask.
Val | The new value to merge with. |
Mask | The mask. Only elements in lanes with non-zero mask predicate are assigned from corresponding Val elements. |
Definition at line 183 of file simd_view_impl.hpp.
References sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::read().
|
inline |
"Merges" given values according to a per-element mask and writes the result to the viewed target's region.
Val1 | Value1 being merged. |
Val2 | Value2 being merged. |
Mask | The mask. non-zero in a mask's lane tells to take corresponding element from Val1 , zero - from Val2 . |
Definition at line 193 of file simd_view_impl.hpp.
References sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::write().
|
inline |
Implicit conversion to a simd object with potentially different element type.
Reads the viewed region from the target, converts elements to the requested type and returns as a simd object. Available only when the type of the view target is simd.
ToTy | The element type of the result. |
Definition at line 117 of file simd_view_impl.hpp.
References sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::data(), and sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::read().
|
inline |
Implicit conversion to a simd_mask object.
Reads the viewed region from the target and returns it as a simd object. Available only when the type of the view target is simd_mask.
Definition at line 128 of file simd_view_impl.hpp.
References sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::read().
|
inline |
Unary logical negeation operator. Applies only to integer element types.
Definition at line 375 of file simd_view_impl.hpp.
References sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::read().
|
inline |
Definition at line 337 of file simd_view_impl.hpp.
|
inline |
Definition at line 337 of file simd_view_impl.hpp.
|
inline |
Definition at line 337 of file simd_view_impl.hpp.
|
inline |
Definition at line 336 of file simd_view_impl.hpp.
|
inline |
Definition at line 336 of file simd_view_impl.hpp.
|
inline |
Definition at line 336 of file simd_view_impl.hpp.
|
inline |
Definition at line 353 of file simd_view_impl.hpp.
|
inline |
Definition at line 353 of file simd_view_impl.hpp.
|
inline |
Definition at line 353 of file simd_view_impl.hpp.
|
inline |
Prefix increment.
Updates the target region viewed by this object.
Definition at line 440 of file simd_view_impl.hpp.
Referenced by sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::operator++().
|
inline |
Postfix increment.
Definition at line 448 of file simd_view_impl.hpp.
References sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::operator++(), and sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::read().
|
inline |
Definition at line 351 of file simd_view_impl.hpp.
|
inline |
Definition at line 351 of file simd_view_impl.hpp.
|
inline |
Definition at line 351 of file simd_view_impl.hpp.
|
inline |
Prefix decrement.
Updates the target region viewed by this object.
Definition at line 456 of file simd_view_impl.hpp.
Referenced by sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::operator--().
|
inline |
Postfix decrement.
Definition at line 464 of file simd_view_impl.hpp.
References sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::operator--(), and sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::read().
|
inline |
Definition at line 352 of file simd_view_impl.hpp.
|
inline |
Definition at line 352 of file simd_view_impl.hpp.
|
inline |
Definition at line 352 of file simd_view_impl.hpp.
|
inline |
Definition at line 354 of file simd_view_impl.hpp.
|
inline |
Definition at line 354 of file simd_view_impl.hpp.
|
inline |
Definition at line 354 of file simd_view_impl.hpp.
|
inline |
Definition at line 343 of file simd_view_impl.hpp.
|
inline |
Definition at line 343 of file simd_view_impl.hpp.
|
inline |
Definition at line 343 of file simd_view_impl.hpp.
|
inline |
Assignment from an object of the derived class.
Updates the target region viewed by this object.
Other | The source object. |
Definition at line 392 of file simd_view_impl.hpp.
References sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::read(), and sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::write().
|
inline |
Assignment with element type conversion from a vector object.
Updates the target region viewed by this object. Available only when the length (number of elements) of the source object matches the length of the target region.
T | The source vector element type. Auto-deduced. |
N | The source vector length. Auto-deduced. |
Other | The source vector. |
Definition at line 423 of file simd_view_impl.hpp.
References sycl::_V1::ext::intel::esimd::detail::simd_obj_impl< RawTy, N, Derived, SFINAE >::data(), and sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::write().
|
inline |
Copy assignment.
Updates the target region viewed by this object.
Other | The source object. |
Definition at line 384 of file simd_view_impl.hpp.
References sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::read(), and sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::write().
|
inline |
Assignment from a value_type
object - simd
or simd_mask
.
Updates the target region viewed by this object.
Val | The source object. |
Definition at line 398 of file simd_view_impl.hpp.
References sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::write().
|
inline |
Assignment from an rvalue object of the derived class.
Updates the target region viewed by this object.
Other | The source rvalue object. |
Definition at line 404 of file simd_view_impl.hpp.
References sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::write().
|
inline |
Move assignment operator. Updates the target region viewed by this object.
Definition at line 407 of file simd_view_impl.hpp.
References sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::write().
|
inline |
Broadcast assignment of a scalar with conversion.
Updates the target region viewed by this object.
T1 | The type of the scalar. |
RHS | The scalar. |
Definition at line 434 of file simd_view_impl.hpp.
References sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::write().
|
inline |
Definition at line 344 of file simd_view_impl.hpp.
|
inline |
Definition at line 344 of file simd_view_impl.hpp.
|
inline |
Definition at line 344 of file simd_view_impl.hpp.
|
inline |
Return a writeable view of a single element in the target 1D region.
i | Element index. |
Definition at line 501 of file simd_view_impl.hpp.
|
inline |
Read a single element from the target 1D region.
i | Element index. |
Definition at line 492 of file simd_view_impl.hpp.
References sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::read().
|
inline |
Definition at line 334 of file simd_view_impl.hpp.
|
inline |
Definition at line 334 of file simd_view_impl.hpp.
|
inline |
Definition at line 334 of file simd_view_impl.hpp.
|
inline |
Definition at line 335 of file simd_view_impl.hpp.
|
inline |
Definition at line 335 of file simd_view_impl.hpp.
|
inline |
Definition at line 335 of file simd_view_impl.hpp.
|
inline |
Reads the viewed region from the target w/o any conversion and returns as an object of the value_type
type.
Definition at line 160 of file simd_view_impl.hpp.
Referenced by sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::all(), sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::any(), sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::data(), sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::merge(), sycl::_V1::ext::intel::esimd::merge(), sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::operator simd< ToTy, length >(), sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::operator simd_mask_type< length >(), sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::operator!(), sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::operator++(), sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::operator--(), sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::operator=(), sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::operator[](), sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::replicate(), and sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::replicate_vs_w_hs().
|
inline |
Applies simd_obj_impl::replicate to the target region.
Definition at line 506 of file simd_view_impl.hpp.
References sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::read().
|
inline |
Shortcut to replicate_vs_w_hs<int Rep, int VS, int W, int Hs>(uint16_t OffsetY, uint16_t OffsetX) with Hs
= 1 and OffsetY
= 0.
Definition at line 533 of file simd_view_impl.hpp.
|
inline |
Shortcut to replicate_vs_w_hs<int Rep, int VS, int W, int Hs>(uint16_t OffsetY, uint16_t OffsetX) with Hs
= 1.
Definition at line 543 of file simd_view_impl.hpp.
|
inline |
Applies simd_obj_impl::replicate_vs_w_hs<int Rep, int VS, int W, int HS> to the target region.
Definition at line 551 of file simd_view_impl.hpp.
References sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::read().
|
inline |
Applies simd_obj_impl::replicate_vs_w_hs<int Rep, int VS, int W, int HS> to the target region.
The offset is calculated as OffsetY * RowSize + OffsetX
where RowSize
is the size of the X dimension if this object is 2D or 0
otherwise.
Definition at line 560 of file simd_view_impl.hpp.
References sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::getSizeX(), sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::is2D(), and sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::read().
|
inline |
Shortcut to replicate_vs_w<int Rep, int Vs, int W>(uint16_t) with with Vs
= 0.
Used to replicate the same elements chunk multiple times. Used for 1D views.
Definition at line 514 of file simd_view_impl.hpp.
|
inline |
Shortcut to replicate_vs_w<int Rep, int Vs, int W>(uint16_t, uint16_t) with Vs
= 0.
Used to replicate the same elements chunk multiple times. Used for 2D views.
Definition at line 522 of file simd_view_impl.hpp.
|
inline |
Reference a row from a 2D region.
Available only if this object is 2D.
i | Row index. |
Definition at line 474 of file simd_view_impl.hpp.
|
inline |
1D region select.
Selects a 1D subregion in the target region.
Size | The number of elements to be selected. |
Stride | Distance in elements between two consecutive elements. |
Offset | is the starting element offset. |
simd_view
representing the subregion. Definition at line 239 of file simd_view_impl.hpp.
|
inline |
2D region select.
Selects a 2D subregion in the target region. The target region must be a 2D region, for example, a result of calling the 2D version of simd_obj_impl::bit_cast_view
. Code snippet below shows example of naive implementation of matrix multiplication of two matrices:
tile_a
, [Wm
x Wk
] elements selected from object a
, with offsets off_m
, off_k
and strides Sm
and Sk
along the Y and X dimensionstile_b
, [Wk
x Wn
] elements selected from object b
, with offsets off_k
, off_n
and strides Sk
and Sn
along the Y and X dimensions SizeY | The number of elements to be selected in Y-dimension. |
StrideY | Distance in elements between two consecutive elements in Y-dimension. |
SizeX | The number of elements to be selected in X-dimension. |
StrideX | Distance in elements between two consecutive elements in X-dimension. |
OffsetX | Starting element offset in X-dimension. |
OffsetY | Starting element offset in Y-dimension. |
Definition at line 289 of file simd_view_impl.hpp.
|
inline |
Assigns a new value to the viewed target's region.
Val | The new value to assign. |
Definition at line 173 of file simd_view_impl.hpp.
Referenced by sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::merge(), and sycl::_V1::ext::intel::esimd::detail::simd_view_impl< BaseTy, RegionTy >::operator=().