libSCALE  0.2.0
A modern C++ CUDA API
Lanemask Functions

Functions for computing lane masks. More...

Functions

__device__ lanemask_t sp::lanemaskLt (int laneID)
 Get a bitmask with a 1 in every position lower than this thread's lane ID. More...
 
__device__ lanemask_t sp::lanemaskLe (int laneID)
 Get a bitmask with a 1 in every position lower than or equal to this thread's lane ID. More...
 
__device__ lanemask_t sp::lanemaskEq (int laneID)
 Get a bitmask with a 1 only in the position equal to this thread's lane ID. More...
 
__device__ lanemask_t sp::lanemaskGe (int laneID)
 Get a bitmask with a 1 in every position greater than this thread's lane ID. More...
 
__device__ lanemask_t sp::lanemaskGt (int laneID)
 Get a bitmask with a 1 in every position greater than or equal to this thread's lane ID. More...
 

Detailed Description

Functions for computing lane masks.

These are preferable to using inline PTX to read the corresponding special registers because:

Function Documentation

◆ lanemaskEq()

__device__ lanemask_t sp::lanemaskEq ( int  laneID)

Get a bitmask with a 1 only in the position equal to this thread's lane ID.

Parameters
laneIDThe laneID for this thread. This may not be used (and hence optimised out) if the target has an instruction for directly getting the desired mask. Otherwise this will be used to calculate the result.

◆ lanemaskGe()

__device__ lanemask_t sp::lanemaskGe ( int  laneID)

Get a bitmask with a 1 in every position greater than this thread's lane ID.

Parameters
laneIDThe laneID for this thread. This may not be used (and hence optimised out) if the target has an instruction for directly getting the desired mask. Otherwise this will be used to calculate the result.

◆ lanemaskGt()

__device__ lanemask_t sp::lanemaskGt ( int  laneID)

Get a bitmask with a 1 in every position greater than or equal to this thread's lane ID.

Parameters
laneIDThe laneID for this thread. This may not be used (and hence optimised out) if the target has an instruction for directly getting the desired mask. Otherwise this will be used to calculate the result.

◆ lanemaskLe()

__device__ lanemask_t sp::lanemaskLe ( int  laneID)

Get a bitmask with a 1 in every position lower than or equal to this thread's lane ID.

Parameters
laneIDThe laneID for this thread. This may not be used (and hence optimised out) if the target has an instruction for directly getting the desired mask. Otherwise this will be used to calculate the result.

◆ lanemaskLt()

__device__ lanemask_t sp::lanemaskLt ( int  laneID)

Get a bitmask with a 1 in every position lower than this thread's lane ID.

Parameters
laneIDThe laneID for this thread. This may not be used (and hence optimised out) if the target has an instruction for directly getting the desired mask. Otherwise this will be used to calculate the result.