DPC++ Runtime
Runtime libraries for oneAPI DPC++
syclcompat::experimental::logical_group Class 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< 3 > item, sycl::group< 3 > parent_group, uint32_t size)
 Dividing parent_group into several logical-groups. More...
 
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

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 497 of file util.hpp.

Constructor & Destructor Documentation

◆ logical_group()

syclcompat::experimental::logical_group::logical_group ( sycl::nd_item< 3 >  item,
sycl::group< 3 >  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 508 of file util.hpp.

Member Function Documentation

◆ get_group_linear_id()

uint32_t syclcompat::experimental::logical_group::get_group_linear_id ( ) const
inline

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

Definition at line 519 of file util.hpp.

References sycl::_V1::nd_item< Dimensions >::get_local_linear_id().

◆ get_group_linear_range()

uint32_t syclcompat::experimental::logical_group::get_group_linear_range ( ) const
inline

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

Definition at line 537 of file util.hpp.

◆ get_local_linear_id()

uint32_t syclcompat::experimental::logical_group::get_local_linear_id ( ) const
inline

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

Definition at line 515 of file util.hpp.

References sycl::_V1::nd_item< Dimensions >::get_local_linear_id().

◆ get_local_linear_range()

uint32_t syclcompat::experimental::logical_group::get_local_linear_range ( ) const
inline

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

Definition at line 523 of file util.hpp.

References sycl::_V1::nd_item< Dimensions >::get_local_linear_id().


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