|
rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
|
Location of a device as a (backend, id) tuple. More...
#include <rexlib/core/hardware/device_index.hpp>
Public Member Functions | |
| device_index (const std::string &backend_name, std::size_t device_id) | |
| Construct a new device index from its components. | |
| device_index (std::string &&backend_name, std::size_t device_id) | |
| Construct a new device index from its components. | |
| device_index (const device_index &other) | |
| device_index (device_index &&other) noexcept | |
| device_index & | operator= (const device_index &other) |
| device_index & | operator= (device_index &&other) noexcept |
| const std::string & | get_backend_name () const noexcept |
| Get the name of the device backend. | |
| std::size_t | get_device_id () const noexcept |
| Get the ID of the device within the backend. | |
Friends | |
| bool | operator== (const device_index &lhs, const device_index &rhs) noexcept |
| bool | operator!= (const device_index &lhs, const device_index &rhs) noexcept |
| bool | operator< (const device_index &lhs, const device_index &rhs) noexcept |
| bool | operator<= (const device_index &lhs, const device_index &rhs) noexcept |
| bool | operator> (const device_index &lhs, const device_index &rhs) noexcept |
| bool | operator>= (const device_index &lhs, const device_index &rhs) noexcept |
| std::ostream & | operator<< (std::ostream &os, const device_index &index) |
Location of a device as a (backend, id) tuple.
A device_index is a unique identifier within a device_manager of a physical device.
Default-constructed indices hold an empty backend name and a zero device id; such an index does not refer to any real device and is intended only as a placeholder before assignment or parsing.
| rexlib::device_index::device_index | ( | const std::string & | backend_name, |
| std::size_t | device_id | ||
| ) |
Construct a new device index from its components.
| backend_name | Name of the backend. Must match the name reported by the target device_backend for the index to refer to a real device. |
| device_id | ID of the device within backend_name, as returned by device_backend::enumerate_devices. |
| rexlib::device_index::device_index | ( | std::string && | backend_name, |
| std::size_t | device_id | ||
| ) |
Construct a new device index from its components.
Move overload that avoids copying backend_name.
| backend_name | Name of the backend (moved from). |
| device_id | ID of the device within backend_name, as returned by device_backend::enumerate_devices. |
|
noexcept |
Get the name of the device backend.
|
noexcept |
Get the ID of the device within the backend.