An object used to specify a device.
More...
#include <DeviceAdapterTag.h>
An object used to specify a device.
viskores::cont::DeviceAdapterId
can be used to specify a device to use when executing some code. Each DeviceAdapterTag
object inherits from viskores::cont::DeviceAdapterId
. Functions can accept a viskores::cont::DeviceAdapterId
object rather than a templated tag to select a device adapter at runtime.
◆ DeviceAdapterId()
constexpr viskores::cont::DeviceAdapterId::DeviceAdapterId |
( |
viskores::Int8 |
id | ) |
|
|
inlineexplicitconstexprprotected |
◆ GetName()
Return a name representing the device.
The string returned from this method is stored in a type named viskores::cont::DeviceAdapterNameType
, which is currently aliased to std::string
. The device adapter name is useful for printing information about a device being used.
◆ GetValue()
constexpr viskores::Int8 viskores::cont::DeviceAdapterId::GetValue |
( |
| ) |
const |
|
inlineconstexpr |
Returns the numeric value of the index.
◆ IsValueValid()
constexpr bool viskores::cont::DeviceAdapterId::IsValueValid |
( |
| ) |
const |
|
inlineconstexpr |
Return whether this object represents a valid type of device.
This method will return true if the id represents a specific, valid device. It will return true even if the device is disabled in by the runtime tracker or if the device is not supported by the Viskores build configuration.
It should be noted that this method return false for tags that are not specific devices. This includes viskores::cont::DeviceAdapterTagAny
and viskores::cont::DeviceAdapterTagUndefined
.
◆ operator!=()
constexpr bool viskores::cont::DeviceAdapterId::operator!= |
( |
DeviceAdapterId |
other | ) |
const |
|
inlineconstexpr |
◆ operator<()
constexpr bool viskores::cont::DeviceAdapterId::operator< |
( |
DeviceAdapterId |
other | ) |
const |
|
inlineconstexpr |
◆ operator==()
constexpr bool viskores::cont::DeviceAdapterId::operator== |
( |
DeviceAdapterId |
other | ) |
const |
|
inlineconstexpr |
◆ make_DeviceAdapterId
◆ Value
The documentation for this struct was generated from the following file: