cub::WarpMask#

template<int LogicalWarpThreads>
inline unsigned cub::WarpMask(
unsigned warp_id
)#

Returns the warp mask for a logical warp of LogicalWarpThreads threads.

If the number of threads assigned to the logical warp is not a power of two, it’s assumed that only one logical warp exists within the hardware warp.

Template Parameters:

LogicalWarpThreads – The number of threads per logical warp (may be less than the number of hardware warp threads).

Parameters:

warp_id – Index of the logical warp within the hardware warp.

Pre:

LogicalWarpThreads must be in the range [1, 32].

Pre:

warp_id must be less than 32 / LogicalWarpThreads.

Pre:

If LogicalWarpThreads is not a power of two, warp_id must be zero.