class InferenceEngine::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 <ie_cpu_streams_executor.hpp>

class CPUStreamsExecutor: public InferenceEngine::IStreamsExecutor
{
public:
    // typedefs

    typedef std::shared_ptr<CPUStreamsExecutor> Ptr;

    // construction

    CPUStreamsExecutor();

    // methods

    virtual voidTask run();
    virtual voidTask Execute();
    virtual int GetStreamId();
    virtual int GetNumaNodeId();
    virtual int GetSocketId();
};

Inherited Members

public:
    // typedefs

    typedef std::shared_ptr<ITaskExecutor> Ptr;
    typedef std::shared_ptr<IStreamsExecutor> Ptr;

    // enums

    enum ThreadBindingType;

    // structs

    struct Config;
    struct Config;

    // methods

    virtual voidTask run() = 0;
    virtual voidconst std::vector<Task>& run_and_wait();
    virtual voidconst std::vector<Task>& runAndWait();
    virtual int get_stream_id() = 0;
    virtual int get_numa_node_id() = 0;
    virtual int get_socket_id() = 0;
    virtual voidTask execute() = 0;
    virtual int GetStreamId() = 0;
    virtual int GetNumaNodeId() = 0;
    virtual int GetSocketId() = 0;
    virtual voidTask Execute() = 0;
    virtual int get_stream_id();
    virtual int get_numa_node_id();
    virtual int get_socket_id();
    virtual voidTask execute();

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.

Typedefs

typedef std::shared_ptr<CPUStreamsExecutor> Ptr

A shared pointer to a CPUStreamsExecutor object.

Construction

CPUStreamsExecutor()

Constructor.

Parameters:

config

Stream executor parameters

Methods

virtual voidTask run()

Execute ov::Task inside task executor context.

Parameters:

task

A task to start

virtual voidTask Execute()

Execute the task in the current thread using streams executor configuration and constraints.

Parameters:

task

A task to start

virtual int GetStreamId()

Return the index of current stream.

Returns:

An index of current stream. Or throw exceptions if called not from stream thread

virtual int GetNumaNodeId()

Return the id of current NUMA Node.

Returns:

ID of current NUMA Node, or throws exceptions if called not from stream thread

virtual int GetSocketId()

Return the id of current socket.

Returns:

ID of current socket, or throws exceptions if called not from stream thread