DPC++ Runtime
Runtime libraries for oneAPI DPC++
sycl::_V1::sub_group Struct Reference

#include <sycl/sub_group.hpp>

Collaboration diagram for sycl::_V1::sub_group:

Public Types

using id_type = id< 1 >
 
using range_type = range< 1 >
 
using linear_id_type = uint32_t
 
template<typename T >
using EnableIfIsScalarArithmetic = std::enable_if_t< sycl::detail::is_scalar_arithmetic< T >::value, T >
 

Public Member Functions

id_type get_local_id () const
 
linear_id_type get_local_linear_id () const
 
range_type get_local_range () const
 
range_type get_max_local_range () const
 
id_type get_group_id () const
 
linear_id_type get_group_linear_id () const
 
range_type get_group_range () const
 
template<typename T >
shuffle (T x, id_type local_id) const
 
template<typename T >
shuffle_down (T x, uint32_t delta) const
 
template<typename T >
shuffle_up (T x, uint32_t delta) const
 
template<typename T >
shuffle_xor (T x, id_type value) const
 
template<typename CVT , typename T = std::remove_cv_t<CVT>>
load (CVT *src) const
 
template<typename CVT , access::address_space Space, access::decorated IsDecorated, typename T = std::remove_cv_t<CVT>>
std::enable_if_t< sycl::detail::sub_group::AcceptableForGlobalLoadStore< T, Space >::value, T > load (const multi_ptr< CVT, Space, IsDecorated > cv_src) const
 
template<typename CVT , access::address_space Space, access::decorated IsDecorated, typename T = std::remove_cv_t<CVT>>
std::enable_if_t< sycl::detail::sub_group::AcceptableForLocalLoadStore< T, Space >::value, T > load (const multi_ptr< CVT, Space, IsDecorated > cv_src) const
 
template<int N, typename CVT , access::address_space Space, access::decorated IsDecorated, typename T = std::remove_cv_t<CVT>>
std::enable_if_t< sycl::detail::sub_group::AcceptableForGlobalLoadStore< T, Space >::value, vec< T, N > > load (const multi_ptr< CVT, Space, IsDecorated > src) const
 
template<int N, typename CVT , access::address_space Space, access::decorated IsDecorated, typename T = std::remove_cv_t<CVT>>
std::enable_if_t< sycl::detail::sub_group::AcceptableForLocalLoadStore< T, Space >::value, vec< T, N > > load (const multi_ptr< CVT, Space, IsDecorated > cv_src) const
 
template<typename T >
void store (T *dst, const T &x) const
 
template<typename T , access::address_space Space, access::decorated DecorateAddress>
std::enable_if_t< sycl::detail::sub_group::AcceptableForGlobalLoadStore< T, Space >::value > store (multi_ptr< T, Space, DecorateAddress > dst, const T &x) const
 
template<typename T , access::address_space Space, access::decorated DecorateAddress>
std::enable_if_t< sycl::detail::sub_group::AcceptableForLocalLoadStore< T, Space >::value > store (multi_ptr< T, Space, DecorateAddress > dst, const T &x) const
 
template<int N, typename T , access::address_space Space, access::decorated DecorateAddress>
std::enable_if_t< sycl::detail::sub_group::AcceptableForGlobalLoadStore< T, Space >::value > store (multi_ptr< T, Space, DecorateAddress > dst, const vec< T, N > &x) const
 
template<int N, typename T , access::address_space Space, access::decorated DecorateAddress>
std::enable_if_t< sycl::detail::sub_group::AcceptableForLocalLoadStore< T, Space >::value > store (multi_ptr< T, Space, DecorateAddress > dst, const vec< T, N > &x) const
 
 __SYCL_DEPRECATED ("Sub-group barrier with no arguments is deprecated." "Use sycl::group_barrier with the sub-group as the argument instead.") void barrier() const
 
 __SYCL_DEPRECATED ("Sub-group barrier accepting fence_space is deprecated." "Use sycl::group_barrier with the sub-group as the argument instead.") void barrier(access
 

Static Public Attributes

static constexpr int dimensions = 1
 
static constexpr sycl::memory_scope fence_scope
 

Protected Member Functions

 sub_group ()=default
 

Friends

template<int dimensions>
class sycl::nd_item
 
bool operator!= (const sub_group &lhs, const sub_group &rhs)
 
sub_group ext::oneapi::this_work_item::get_sub_group ()
 

Detailed Description

Definition at line 139 of file sub_group.hpp.

Member Typedef Documentation

◆ EnableIfIsScalarArithmetic

template<typename T >
using sycl::_V1::sub_group::EnableIfIsScalarArithmetic = std::enable_if_t<sycl::detail::is_scalar_arithmetic<T>::value, T>

Definition at line 214 of file sub_group.hpp.

◆ id_type

Definition at line 141 of file sub_group.hpp.

◆ linear_id_type

Definition at line 143 of file sub_group.hpp.

◆ range_type

Definition at line 142 of file sub_group.hpp.

Constructor & Destructor Documentation

◆ sub_group()

sycl::_V1::sub_group::sub_group ( )
protecteddefault

Member Function Documentation

◆ __SYCL_DEPRECATED() [1/2]

sycl::_V1::sub_group::__SYCL_DEPRECATED ( "Sub-group barrier accepting fence_space is deprecated." "Use sycl::group_barrier with the sub-group as the argument instead."  )
inline

◆ __SYCL_DEPRECATED() [2/2]

◆ get_group_id()

id_type sycl::_V1::sub_group::get_group_id ( ) const
inline

Definition at line 186 of file sub_group.hpp.

References sycl::_V1::feature_not_supported, and sycl::_V1::make_error_code().

Referenced by get_group_linear_id().

◆ get_group_linear_id()

linear_id_type sycl::_V1::sub_group::get_group_linear_id ( ) const
inline

◆ get_group_range()

range_type sycl::_V1::sub_group::get_group_range ( ) const
inline

◆ get_local_id()

id_type sycl::_V1::sub_group::get_local_id ( ) const
inline

Definition at line 150 of file sub_group.hpp.

References sycl::_V1::feature_not_supported, and sycl::_V1::make_error_code().

Referenced by get_local_linear_id(), load(), and store().

◆ get_local_linear_id()

◆ get_local_range()

range_type sycl::_V1::sub_group::get_local_range ( ) const
inline

◆ get_max_local_range()

range_type sycl::_V1::sub_group::get_max_local_range ( ) const
inline

Definition at line 177 of file sub_group.hpp.

References sycl::_V1::feature_not_supported, and sycl::_V1::make_error_code().

Referenced by load(), and store().

◆ load() [1/5]

template<typename CVT , access::address_space Space, access::decorated IsDecorated, typename T = std::remove_cv_t<CVT>>
std::enable_if_t< sycl::detail::sub_group::AcceptableForGlobalLoadStore<T, Space>::value, T> sycl::_V1::sub_group::load ( const multi_ptr< CVT, Space, IsDecorated >  cv_src) const
inline

◆ load() [2/5]

template<typename CVT , access::address_space Space, access::decorated IsDecorated, typename T = std::remove_cv_t<CVT>>
std::enable_if_t< sycl::detail::sub_group::AcceptableForLocalLoadStore<T, Space>::value, T> sycl::_V1::sub_group::load ( const multi_ptr< CVT, Space, IsDecorated >  cv_src) const
inline

◆ load() [3/5]

template<int N, typename CVT , access::address_space Space, access::decorated IsDecorated, typename T = std::remove_cv_t<CVT>>
std::enable_if_t< sycl::detail::sub_group::AcceptableForLocalLoadStore<T, Space>::value, vec<T, N> > sycl::_V1::sub_group::load ( const multi_ptr< CVT, Space, IsDecorated >  cv_src) const
inline

◆ load() [4/5]

template<int N, typename CVT , access::address_space Space, access::decorated IsDecorated, typename T = std::remove_cv_t<CVT>>
std::enable_if_t< sycl::detail::sub_group::AcceptableForGlobalLoadStore<T, Space>::value, vec<T, N> > sycl::_V1::sub_group::load ( const multi_ptr< CVT, Space, IsDecorated >  src) const
inline

◆ load() [5/5]

template<typename CVT , typename T = std::remove_cv_t<CVT>>
T sycl::_V1::sub_group::load ( CVT *  src) const
inline

◆ shuffle()

template<typename T >
T sycl::_V1::sub_group::shuffle ( x,
id_type  local_id 
) const
inline

◆ shuffle_down()

template<typename T >
T sycl::_V1::sub_group::shuffle_down ( x,
uint32_t  delta 
) const
inline

◆ shuffle_up()

template<typename T >
T sycl::_V1::sub_group::shuffle_up ( x,
uint32_t  delta 
) const
inline

◆ shuffle_xor()

template<typename T >
T sycl::_V1::sub_group::shuffle_xor ( x,
id_type  value 
) const
inline

◆ store() [1/5]

template<typename T , access::address_space Space, access::decorated DecorateAddress>
std::enable_if_t< sycl::detail::sub_group::AcceptableForGlobalLoadStore<T, Space>::value> sycl::_V1::sub_group::store ( multi_ptr< T, Space, DecorateAddress >  dst,
const T &  x 
) const
inline

◆ store() [2/5]

template<typename T , access::address_space Space, access::decorated DecorateAddress>
std::enable_if_t< sycl::detail::sub_group::AcceptableForLocalLoadStore<T, Space>::value> sycl::_V1::sub_group::store ( multi_ptr< T, Space, DecorateAddress >  dst,
const T &  x 
) const
inline

◆ store() [3/5]

template<int N, typename T , access::address_space Space, access::decorated DecorateAddress>
std::enable_if_t< sycl::detail::sub_group::AcceptableForGlobalLoadStore<T, Space>::value> sycl::_V1::sub_group::store ( multi_ptr< T, Space, DecorateAddress >  dst,
const vec< T, N > &  x 
) const
inline

◆ store() [4/5]

template<int N, typename T , access::address_space Space, access::decorated DecorateAddress>
std::enable_if_t< sycl::detail::sub_group::AcceptableForLocalLoadStore<T, Space>::value> sycl::_V1::sub_group::store ( multi_ptr< T, Space, DecorateAddress >  dst,
const vec< T, N > &  x 
) const
inline

◆ store() [5/5]

template<typename T >
void sycl::_V1::sub_group::store ( T *  dst,
const T &  x 
) const
inline

Friends And Related Function Documentation

◆ ext::oneapi::this_work_item::get_sub_group

◆ operator!=

bool operator!= ( const sub_group lhs,
const sub_group rhs 
)
friend

Definition at line 805 of file sub_group.hpp.

◆ sycl::nd_item

template<int dimensions>
friend class sycl::nd_item
friend

Definition at line 817 of file sub_group.hpp.

Member Data Documentation

◆ dimensions

constexpr int sycl::_V1::sub_group::dimensions = 1
staticconstexpr

Definition at line 144 of file sub_group.hpp.

◆ fence_scope

constexpr sycl::memory_scope sycl::_V1::sub_group::fence_scope
staticconstexpr
Initial value:

Definition at line 145 of file sub_group.hpp.


The documentation for this struct was generated from the following file: