Execution Operators#

Execution operators configure how the function will run on the GPU. Only one execution operator can be used; combined with description operators, they form a complete function descriptor that can be executed on a GPU.

Operator

Description

Thread

Creates a thread-level execution object.

Block

Creates a block-level execution object where all threads within a block collectively participate in the execution. Not currently supported.

Device

Creates a device-level execution object where all threads within a GPU device collectively participate in the execution. Not currently supported.

Thread Operator#

curanddx::Thread()

Sets the random number generation to run in a thread context, i.e., each thread independently creates a random number in its register.

For example, the following code example creates a function descriptor that will run on a thread level:

#include <curanddx.hpp>

using RNG = decltype(curanddx::Generator<curanddx::pcg>() +
                     curanddx::SM<700>() +
                     curanddx::Thread());