|
rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
|
Abstract representation of a hardware compute device. More...
#include <rexlib/core/hardware/device.hpp>
Public Member Functions | |
| device (const device &other)=delete | |
| device (device &&other)=delete | |
| device & | operator= (const device &other)=delete |
| device & | operator= (device &&other)=delete |
| virtual const memory_resource & | get_memory_resource (memory_resource_affinity affinity) const =0 |
| Retrieve a memory resource by its affinity. | |
| virtual std::shared_ptr< command_queue > | create_command_queue () const =0 |
| Create a new command queue on this device. | |
Abstract representation of a hardware compute device.
A device is the entry point for interacting with a backend's compute resource: it advertises the memory resources reachable from the device and acts as a factory for the per-device objects used by the rest of the framework (queues, ...).
|
pure virtual |
Create a new command queue on this device.
The returned queue is independent from any previously created queue on the same device, including the default queue and may execute its commands concurrently with them. A command of one queue is ordered after a command of another by depending on it.
Implemented in rexlib::cpu::cpu_device.
|
pure virtual |
Retrieve a memory resource by its affinity.
Returns the memory_resource that is best suited for the access pattern described by affinity. The returned reference is valid for the lifetime of this device.
memory_resource (i.e. the references may alias).| affinity | The intended access pattern for which a resource is requested. |
memory_resource.Implemented in rexlib::cpu::cpu_device.