rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
cpu_program.hpp
1// SPDX-License-Identifier: GPL-3.0-only
2
3#pragma once
4
5#include <rexlib/core/hardware/program.hpp>
6#include <rexlib/core/span.hpp>
7
8namespace rexlib
9{
10
11class buffer;
12
13namespace cpu
14{
15
16class thread_pool;
17
21class REXLIB_API cpu_program
22 : public program
23{
24public:
43 virtual void execute(
44 span<const std::shared_ptr<buffer>> outputs,
45 span<const std::shared_ptr<const buffer>> inputs,
46 span<const std::shared_ptr<buffer>> scratch,
47 thread_pool &pool
48 ) const = 0;
49};
50
51} // namespace cpu
52} // namespace rexlib
CPU base class for executable programs.
Definition cpu_program.hpp:23
virtual void execute(span< const std::shared_ptr< buffer > > outputs, span< const std::shared_ptr< const buffer > > inputs, span< const std::shared_ptr< buffer > > scratch, thread_pool &pool) const =0
Immediately execute the the program.
A fixed set of threads a loop's iterations are spread over.
Definition thread_pool.hpp:38
Abstract representation of an executable program.
Definition program.hpp:27
Represents a non-owning area of contiguous memory.
Definition span.hpp:99
Arrays, the operations on them and the devices that run those operations.
Definition cpu_device.hpp:10
@ cpu
CPU of the host node.