Construct functions of Cooperative groups

Construct functions of Cooperative groups#

HIP Runtime API Reference: Construct functions of Cooperative groups
Construct functions of Cooperative groups
Collaboration diagram for Construct functions of Cooperative groups:

Functions

multi_grid_group cooperative_groups::this_multi_grid ()
 User-exposed API interface to construct grid cooperative group type object - multi_grid_group.
 
grid_group cooperative_groups::this_grid ()
 User-exposed API interface to construct grid cooperative group type object - grid_group.
 
thread_block cooperative_groups::this_thread_block ()
 User-exposed API interface to construct workgroup cooperative group type object - thread_block.
 
coalesced_group cooperative_groups::coalesced_threads ()
 User-exposed API to create coalesced groups.
 
thread_group cooperative_groups::tiled_partition (const thread_group &parent, unsigned int tile_size)
 User-exposed API to partition groups.
 
template<unsigned int size, class ParentCGTy >
thread_block_tile< size, ParentCGTy > cooperative_groups::tiled_partition (const ParentCGTy &g)
 Create a partition.
 
coalesced_group cooperative_groups::binary_partition (const coalesced_group &cgrp, bool pred)
 Binary partition.
 
template<unsigned int size, class parent >
coalesced_group cooperative_groups::binary_partition (const thread_block_tile< size, parent > &tgrp, bool pred)
 Binary partition.
 

Detailed Description

Function Documentation

◆ binary_partition() [1/2]

coalesced_group cooperative_groups::binary_partition ( const coalesced_group cgrp,
bool  pred 
)

Binary partition.

This splits the input thread group into two partitions determined by predicate.

Parameters
cgrp[in] The coalesced group for split.
pred[in] The predicate used during the group split up.

◆ binary_partition() [2/2]

template<unsigned int size, class parent >
coalesced_group cooperative_groups::binary_partition ( const thread_block_tile< size, parent > &  tgrp,
bool  pred 
)

Binary partition.

This splits the input thread group into two partitions determined by predicate.

Template Parameters
sizeThe size of the input thread block tile group.
parentThe cooperative group class template parameter of the input group.
Parameters
tgrp[in] The thread block tile group for split.
pred[in] The predicate used during the group split up.

◆ coalesced_threads()

coalesced_group cooperative_groups::coalesced_threads ( )

User-exposed API to create coalesced groups.

A collective operation that groups all active lanes into a new thread group.

Note
This function is implemented on Linux and is under development on Microsoft Windows.

◆ this_grid()

grid_group cooperative_groups::this_grid ( )

User-exposed API interface to construct grid cooperative group type object - grid_group.

User is not allowed to construct an object of type grid_group directly. Instead, they should construct it through this API function.

Note
This function is implemented on Linux and is under development on Microsoft Windows.

◆ this_multi_grid()

multi_grid_group cooperative_groups::this_multi_grid ( )

User-exposed API interface to construct grid cooperative group type object - multi_grid_group.

User is not allowed to construct an object of type multi_grid_group directly. Instead, they should construct it through this API function.

Note
This multi-grid cooperative API type is implemented on Linux, under development on Microsoft Windows.

◆ this_thread_block()

thread_block cooperative_groups::this_thread_block ( )

User-exposed API interface to construct workgroup cooperative group type object - thread_block.

User is not allowed to construct an object of type thread_block directly. Instead, they should construct it through this API function.

Note
This function is implemented on Linux and is under development on Microsoft Windows.

◆ tiled_partition() [1/2]

template<unsigned int size, class ParentCGTy >
thread_block_tile< size, ParentCGTy > cooperative_groups::tiled_partition ( const ParentCGTy &  g)

Create a partition.

This constructs a templated class derived from thread_group. The template defines the tile size of the new thread group at compile time.

Template Parameters
sizeThe new size of the partition.
ParentCGTyThe cooperative group class template parameter of the input group.
Parameters
g[in] The coalesced group for split.

◆ tiled_partition() [2/2]

thread_group cooperative_groups::tiled_partition ( const thread_group parent,
unsigned int  tile_size 
)

User-exposed API to partition groups.

A collective operation that partitions the parent group into a one-dimensional, row-major, tiling of subgroups.