class ov::threading::CPUStreamsExecutor¶
Overview¶
CPU Streams executor implementation. The executor splits the CPU into groups of threads, that can be pinned to cores or NUMA nodes. It uses custom threads to pull tasks from single queue. More…
#include <cpu_streams_executor.hpp>
class CPUStreamsExecutor: public ov::threading::IStreamsExecutor
{
public:
// construction
CPUStreamsExecutor(const Config& config);
// methods
virtual void run(Task task);
virtual void execute(Task task);
virtual int get_stream_id();
virtual int get_numa_node_id();
};
Inherited Members¶
public:
// enums
enum ThreadBindingType;
// structs
struct Config;
// methods
virtual void run(Task task) = 0;
virtual void run_and_wait(const std::vector<Task>& tasks);
virtual int get_stream_id() = 0;
virtual int get_numa_node_id() = 0;
virtual void execute(Task task) = 0;
Detailed Documentation¶
CPU Streams executor implementation. The executor splits the CPU into groups of threads, that can be pinned to cores or NUMA nodes. It uses custom threads to pull tasks from single queue.
Construction¶
CPUStreamsExecutor(const Config& config)
Constructor.
Parameters:
config |
Stream executor parameters |
Methods¶
virtual void run(Task task)
Execute ov::Task inside task executor context.
Parameters:
task |
A task to start |
virtual void execute(Task task)
Execute the task in the current thread using streams executor configuration and constraints.
Parameters:
task |
A task to start |
virtual int get_stream_id()
Return the index of current stream.
Returns:
An index of current stream. Or throw exceptions if called not from stream thread
virtual int get_numa_node_id()
Return the id of current NUMA Node.
Returns:
ID
of current NUMA Node, or throws exceptions if called not from stream thread