interface InferenceEngine::IStreamsExecutor

Overview

Interface for Streams Task Executor. This executor groups worker threads into so-called streams. More…

#include <ie_istreams_executor.hpp>

template IStreamsExecutor: public InferenceEngine::ITaskExecutor
{
    // typedefs

    typedef std::shared_ptr<IStreamsExecutor> Ptr;

    // enums

    enum ThreadBindingType;

    // structs

    struct Config;

    // methods

    virtual int GetStreamId() = 0;
    virtual int GetNumaNodeId() = 0;
    virtual void Execute(Task task) = 0;
};

// direct descendants

class CPUStreamsExecutor;
class TBBStreamsExecutor;

Inherited Members

public:
    // typedefs

    typedef std::shared_ptr<ITaskExecutor> Ptr;

    // methods

    virtual void run(Task task) = 0;
    virtual void runAndWait(const std::vector<Task>& tasks);

Detailed Documentation

Interface for Streams Task Executor. This executor groups worker threads into so-called streams.

The executor executes all parallel tasks using threads from one stream. With proper pinning settings it should reduce cache misses for memory bound workloads.

On NUMA hosts GetNumaNodeId() method can be used to define the NUMA node of current stream

Typedefs

typedef std::shared_ptr<IStreamsExecutor> Ptr

A shared pointer to IStreamsExecutor interface

Methods

virtual int GetStreamId() = 0

Return the index of current stream.

Returns:

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

virtual int GetNumaNodeId() = 0

Return the id of current NUMA Node.

Returns:

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

virtual void Execute(Task task) = 0

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

Parameters:

task

A task to start