class InferenceEngine::ExecutableNetworkThreadSafeDefault

Overview

This class provides optimal thread safe default implementation. The class is recommended to be used as a base class for Executable Network impleentation during plugin development. More…

#include <ie_executable_network_thread_safe_default.hpp>

class ExecutableNetworkThreadSafeDefault: public InferenceEngine::IExecutableNetworkInternal
{
public:
    // typedefs

    typedef std::shared_ptr<ExecutableNetworkThreadSafeDefault> Ptr;

    // construction

    ExecutableNetworkThreadSafeDefault(
        const ITaskExecutor::Ptr& taskExecutor = std::make_shared<CPUStreamsExecutor>(IStreamsExecutor::Config{ "Default"}),
        const ITaskExecutor::Ptr& callbackExecutor = std::make_shared<CPUStreamsExecutor>(IStreamsExecutor::Config{ "Callback"})
        );

    // methods

    virtual IInferRequestInternal::Ptr CreateInferRequest();
};

Inherited Members

public:
    // typedefs

    typedef std::shared_ptr<IExecutableNetworkInternal> Ptr;

    // methods

    virtual void setNetworkInputs(const InputsDataMap& networkInputs);
    virtual void setNetworkOutputs(const OutputsDataMap& networkOutputs);
    virtual void setInputs(const std::vector<std::shared_ptr<const ov::Node>>& params);
    virtual const std::vector<std::shared_ptr<const ov::Node>>& getInputs() const;
    virtual void setOutputs(const std::vector<std::shared_ptr<const ov::Node>>& results);
    virtual const std::vector<std::shared_ptr<const ov::Node>>& getOutputs() const;
    virtual ConstOutputsDataMap GetOutputsInfo() const;
    virtual ConstInputsDataMap GetInputsInfo() const;
    virtual std::shared_ptr<IInferRequestInternal> CreateInferRequest();
    virtual void Export(const std::string& modelFileName);
    virtual void Export(std::ostream& networkModel);
    virtual std::shared_ptr<ngraph::Function> GetExecGraphInfo();
    virtual void SetPointerToPlugin(const std::shared_ptr<IInferencePlugin>& plugin);
    virtual std::shared_ptr<void> GetPointerToSo();
    virtual void SetConfig(const std::map<std::string, Parameter>& config);
    virtual Parameter GetConfig(const std::string& name) const;
    virtual Parameter GetMetric(const std::string& name) const;
    virtual std::shared_ptr<RemoteContext> GetContext() const;

Detailed Documentation

This class provides optimal thread safe default implementation. The class is recommended to be used as a base class for Executable Network impleentation during plugin development.

Typedefs

typedef std::shared_ptr<ExecutableNetworkThreadSafeDefault> Ptr

A shared pointer to a ExecutableNetworkThreadSafeDefault object.

Construction

ExecutableNetworkThreadSafeDefault(
    const ITaskExecutor::Ptr& taskExecutor = std::make_shared<CPUStreamsExecutor>(IStreamsExecutor::Config{ "Default"}),
    const ITaskExecutor::Ptr& callbackExecutor = std::make_shared<CPUStreamsExecutor>(IStreamsExecutor::Config{ "Callback"})
    )

Constructs a new instance.

Parameters:

taskExecutor

The task executor used

callbackExecutor

The callback executor

Methods

virtual IInferRequestInternal::Ptr CreateInferRequest()

Given optional implementation of creating asynchronous inference request to avoid need for it to be implemented by plugin.

Returns:

shared_ptr for the created asynchronous inference request