class InferenceEngine::TBBStreamsExecutor

Overview

CPU Streams executor implementation. Use TBB thread pool to run tasks. More…

#include <ie_tbb_streams_executor.hpp>

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

    typedef std::shared_ptr<TBBStreamsExecutor> Ptr;

    // construction

    TBBStreamsExecutor(const Config& config = {});

    // methods

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

Inherited Members

public:
    // typedefs

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

    // enums

    enum ThreadBindingType;

    // structs

    struct Config;

    // methods

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

Detailed Documentation

CPU Streams executor implementation. Use TBB thread pool to run tasks.

Methods

virtual void run(Task task)

Execute InferenceEngine::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 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