cuda::experimental::logical_device
Defined in include/cuda/experimental/__device/logical_device.cuh
-
class logical_device
A non-owning representation of a CUDA device or a green context.
Public Types
Public Functions
-
inline constexpr CUcontext context() const noexcept
-
inline constexpr device_ref get_underlying_device() const noexcept
Retrieve the device on which this logical device resides.
-
inline constexpr kinds get_kind() const noexcept
Retrieve the kind of logical device stored in this object The kind indicates if this logical_device holds a device or green_context.
-
inline explicit logical_device(int __id)
Construct logical_device from a device ordinal.
Constructing a logical_device for a given device ordinal has a side effect of initializing that device
-
inline explicit logical_device(device_ref __dev)
Construct logical_device from a device_ref.
Constructing a logical_device for a given device_ref has a side effect of initializing that device
-
inline logical_device(const ::cuda::experimental::device &__dev)
Constructing a logical_device for a given device has a side effect of initializing that device.
-
inline bool operator==(logical_device __lhs, logical_device __rhs) noexcept
Compares two logical_devices for equality.
- Parameters
__lhs – The first
logical_device
to compare__rhs – The second
logical_device
to compare
- Returns
true if
lhs
andrhs
refer to the same logical device
-
inline constexpr CUcontext context() const noexcept