rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
device.hpp
1// SPDX-License-Identifier: GPL-3.0-only
2
3#pragma once
4
5#include <memory>
6
7#include <rexlib/core/platform/dynamic_shared_object.h>
8
9#include "memory_resource_affinity.hpp"
10
11namespace rexlib
12{
13
14class command_queue;
15class memory_resource;
16
25class REXLIB_API device
26{
27public:
28 device() noexcept;
29 device(const device &other) = delete;
30 device(device &&other) = delete;
31 virtual ~device();
32
33 device& operator=(const device &other) = delete;
34 device& operator=(device &&other) = delete;
35
54 virtual
55 const memory_resource&
57
68 virtual std::shared_ptr<command_queue> create_command_queue() const = 0;
69};
70
71} // namespace rexlib
Abstract representation of a hardware compute device.
Definition device.hpp:26
virtual std::shared_ptr< command_queue > create_command_queue() const =0
Create a new command queue on this device.
virtual const memory_resource & get_memory_resource(memory_resource_affinity affinity) const =0
Retrieve a memory resource by its affinity.
Abstract description of a physical memory region.
Definition memory_resource.hpp:21
Arrays, the operations on them and the devices that run those operations.
Definition cpu_device.hpp:10
memory_resource_affinity
Enumeration to query memory_resource according to its intended usage.
Definition memory_resource_affinity.hpp:12