DPC++ Runtime
Runtime libraries for oneAPI DPC++
sycl::_V1::ext::intel::esimd::simd_view< BaseTy, RegionTy > Class Template Reference

This class represents a reference to a sub-region of a base simd object. More...

#include <sycl/ext/intel/esimd/detail/types.hpp>

Collaboration diagram for sycl::_V1::ext::intel::esimd::simd_view< BaseTy, RegionTy >:

Public Types

using region_type = RegionTy
 The region type of this class. More...
 
using element_type = typename ShapeTy::element_type
 The element type of this class, which could be different from the element type of the base object type. More...
 
using value_type = get_simd_t< element_type, length >
 The simd type if reading the object. More...
 
using raw_vector_type = detail::vector_type_t< detail::__raw_t< element_type >, length >
 The underlying builtin value type. More...
 

Public Member Functions

 simd_view (const simd_view &Other)=default
 Default copy and move constructors for simd_view. More...
 
 simd_view (simd_view &&Other)=default
 
 simd_view (BaseTy &Base)
 Construct a complete view of a vector. More...
 
simd_viewoperator= (const simd_view &Other)
 Copy assignment operator. More...
 

Static Public Attributes

static constexpr int length = ShapeTy::Size_x * ShapeTy::Size_y
 

Detailed Description

template<typename BaseTy, typename RegionTy = region1d_t<typename BaseTy::element_type, BaseTy::length, 1>>
class sycl::_V1::ext::intel::esimd::simd_view< BaseTy, RegionTy >

This class represents a reference to a sub-region of a base simd object.

The referenced sub-region of the base object can be read from and written to via an instance of this class. Derives from detail::simd_view_impl, which defines the majority of available APIs for view classes.

User code is never supposed to explicitly provide actual template parameters for this class. They are always auto-deduced or provided by APIs.

Template Parameters
BaseTyThe base type - type of the object viewed by this one.
RegionTyDescribes the viewed region - its shape and element type. Regions can be 1D and 2D.

Definition at line 35 of file types.hpp.

Member Typedef Documentation

◆ element_type

template<typename BaseTy , typename RegionTy = region1d_t<typename BaseTy::element_type, BaseTy::length, 1>>
using sycl::_V1::ext::intel::esimd::simd_view< BaseTy, RegionTy >::element_type = typename ShapeTy::element_type

The element type of this class, which could be different from the element type of the base object type.

Definition at line 64 of file simd_view.hpp.

◆ raw_vector_type

template<typename BaseTy , typename RegionTy = region1d_t<typename BaseTy::element_type, BaseTy::length, 1>>
using sycl::_V1::ext::intel::esimd::simd_view< BaseTy, RegionTy >::raw_vector_type = detail::vector_type_t<detail::__raw_t<element_type>, length>

The underlying builtin value type.

Definition at line 71 of file simd_view.hpp.

◆ region_type

template<typename BaseTy , typename RegionTy = region1d_t<typename BaseTy::element_type, BaseTy::length, 1>>
using sycl::_V1::ext::intel::esimd::simd_view< BaseTy, RegionTy >::region_type = RegionTy

The region type of this class.

Definition at line 60 of file simd_view.hpp.

◆ value_type

template<typename BaseTy , typename RegionTy = region1d_t<typename BaseTy::element_type, BaseTy::length, 1>>
using sycl::_V1::ext::intel::esimd::simd_view< BaseTy, RegionTy >::value_type = get_simd_t<element_type, length>

The simd type if reading the object.

Definition at line 67 of file simd_view.hpp.

Constructor & Destructor Documentation

◆ simd_view() [1/3]

template<typename BaseTy , typename RegionTy = region1d_t<typename BaseTy::element_type, BaseTy::length, 1>>
sycl::_V1::ext::intel::esimd::simd_view< BaseTy, RegionTy >::simd_view ( const simd_view< BaseTy, RegionTy > &  Other)
default

Default copy and move constructors for simd_view.

◆ simd_view() [2/3]

template<typename BaseTy , typename RegionTy = region1d_t<typename BaseTy::element_type, BaseTy::length, 1>>
sycl::_V1::ext::intel::esimd::simd_view< BaseTy, RegionTy >::simd_view ( simd_view< BaseTy, RegionTy > &&  Other)
default

◆ simd_view() [3/3]

template<typename BaseTy , typename RegionTy = region1d_t<typename BaseTy::element_type, BaseTy::length, 1>>
sycl::_V1::ext::intel::esimd::simd_view< BaseTy, RegionTy >::simd_view ( BaseTy &  Base)
inline

Construct a complete view of a vector.

Parameters
BaseThe vector to construct a view of.

Definition at line 86 of file simd_view.hpp.

Member Function Documentation

◆ operator=()

template<typename BaseTy , typename RegionTy = region1d_t<typename BaseTy::element_type, BaseTy::length, 1>>
simd_view& sycl::_V1::ext::intel::esimd::simd_view< BaseTy, RegionTy >::operator= ( const simd_view< BaseTy, RegionTy > &  Other)
inline

Copy assignment operator.

Definition at line 89 of file simd_view.hpp.

References sycl::_V1::ext::oneapi::experimental::operator=().

Member Data Documentation

◆ length

template<typename BaseTy , typename RegionTy = region1d_t<typename BaseTy::element_type, BaseTy::length, 1>>
constexpr int sycl::_V1::ext::intel::esimd::simd_view< BaseTy, RegionTy >::length = ShapeTy::Size_x * ShapeTy::Size_y
staticconstexpr

Definition at line 57 of file simd_view.hpp.


The documentation for this class was generated from the following files: