cuda::experimental::stf::exec_affinity

Defined in include/cuda/experimental/__stf/internal/exec_affinity.cuh

class exec_affinity

Defines the current execution places associated with a context.

When an affinity is set, the first entry of the current execution places defines the default execution place used in CUDASTF constructs when no execution place is supplied.

Public Functions

exec_affinity() = default
~exec_affinity() = default
inline void push(::std::vector<::std::shared_ptr<exec_place>> p)

Set the current affinity to a vector of execution places.

inline void push(::std::shared_ptr<exec_place> p)

Set the current affinity to a single execution place.

inline void pop()

Restore the affinity to its value before calling push.

inline bool has_affinity() const

Indicates if an affinity was set or not.

inline const auto &top() const

Get a reference to the vector of place pointers at the top of the stack (ie.

thread’s current affinity)