DPC++ Runtime
Runtime libraries for oneAPI DPC++
syclcompat::experimental::logical_group< dimensions > Class Template Reference

The logical-group is a logical collection of some work-items within a work-group. More...

#include <syclcompat/util.hpp>

Public Member Functions

 logical_group (sycl::nd_item< dimensions > item, sycl::group< dimensions > parent_group, uint32_t size)
 Dividing parent_group into several logical-groups. More...
 
 logical_group (sycl::nd_item< dimensions > item)
 
uint32_t get_local_linear_id () const
 Returns the index of the work-item within the logical-group. More...
 
uint32_t get_group_linear_id () const
 Returns the index of the logical-group in the parent group. More...
 
uint32_t get_local_linear_range () const
 Returns the number of work-items in the logical-group. More...
 
uint32_t get_group_linear_range () const
 Returns the number of logical-group in the parent group. More...
 

Detailed Description

template<int dimensions = 3>
class syclcompat::experimental::logical_group< dimensions >

The logical-group is a logical collection of some work-items within a work-group.

Note: Please make sure that the logical-group size is a power of 2 in the range [1, current_sub_group_size].

Definition at line 669 of file util.hpp.

Constructor & Destructor Documentation

◆ logical_group() [1/2]

template<int dimensions = 3>
syclcompat::experimental::logical_group< dimensions >::logical_group ( sycl::nd_item< dimensions >  item,
sycl::group< dimensions >  parent_group,
uint32_t  size 
)
inline

Dividing parent_group into several logical-groups.

Parameters
[in]itemCurrent work-item.
[in]parent_groupThe group to be divided.
[in]sizeThe logical-group size.

Definition at line 680 of file util.hpp.

◆ logical_group() [2/2]

template<int dimensions = 3>
syclcompat::experimental::logical_group< dimensions >::logical_group ( sycl::nd_item< dimensions >  item)
inline

Definition at line 686 of file util.hpp.

Member Function Documentation

◆ get_group_linear_id()

template<int dimensions = 3>
uint32_t syclcompat::experimental::logical_group< dimensions >::get_group_linear_id ( ) const
inline

Returns the index of the logical-group in the parent group.

Definition at line 693 of file util.hpp.

◆ get_group_linear_range()

template<int dimensions = 3>
uint32_t syclcompat::experimental::logical_group< dimensions >::get_group_linear_range ( ) const
inline

Returns the number of logical-group in the parent group.

Definition at line 711 of file util.hpp.

◆ get_local_linear_id()

template<int dimensions = 3>
uint32_t syclcompat::experimental::logical_group< dimensions >::get_local_linear_id ( ) const
inline

Returns the index of the work-item within the logical-group.

Definition at line 689 of file util.hpp.

Referenced by syclcompat::experimental::group_base< dimensions >::get_local_linear_id().

◆ get_local_linear_range()

template<int dimensions = 3>
uint32_t syclcompat::experimental::logical_group< dimensions >::get_local_linear_range ( ) const
inline

Returns the number of work-items in the logical-group.

Definition at line 697 of file util.hpp.

Referenced by syclcompat::experimental::group_base< dimensions >::get_local_linear_range().


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