Class ov::threading::CPUStreamsExecutor¶
-
class CPUStreamsExecutor : public ov::threading::IStreamsExecutor¶
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.
Public Types
-
using Ptr = std::shared_ptr<CPUStreamsExecutor>¶
A shared pointer to a CPUStreamsExecutor object.
Public Functions
-
explicit CPUStreamsExecutor(const Config &config)¶
Constructor.
- Parameters
config – Stream executor parameters
-
~CPUStreamsExecutor() override¶
A class destructor.
-
virtual void run(Task task) override¶
Execute ov::Task inside task executor context.
- Parameters
task – A task to start
-
virtual void execute(Task task) override¶
Execute the task in the current thread using streams executor configuration and constraints.
- Parameters
task – A task to start
-
virtual int get_stream_id() override¶
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() override¶
Return the id of current NUMA Node Return 0 when current stream cross some NUMA Nodes.
- Returns
ID
of current NUMA Node, or throws exceptions if called not from stream thread
-
virtual int get_socket_id() override¶
Return the id of current socket Return 0 when current stream cross some sockets.
- Returns
ID
of current socket, or throws exceptions if called not from stream thread
-
using Ptr = std::shared_ptr<CPUStreamsExecutor>¶