Skip to navigation

holoscan::DeviceId

Beta
View as Markdown

Identify one CUDA device without treating an omitted value as device zero.

Device identity is a value carried by tensor allocation and publication records. Negative values are invalid and must be resolved before device-visible execution. The value is not a process-global device authority and grants no access to a CUDA context.

#include <holoscan/memory_kind.hpp>

Methods

valid

bool holoscan::DeviceId::valid() const noexcept

Return whether this value contains a resolved CUDA ordinal.

Returns: true when value is nonnegative; otherwise false.


Member variables

NameTypeDescription
valuestd::int32_tCUDA ordinal, or a negative value when unresolved.