interface InferenceEngine::ExecutorManager¶
Overview¶
Interface for tasks execution manager. This is global point for getting task executor objects by string id. It’s necessary in multiple asynchronous requests for having unique executors to avoid oversubscription. E.g. There 2 task executors for CPU device: one - in FPGA, another - in OneDNN. Parallel execution both of them leads to not optimal CPU usage. More efficient to run the corresponding tasks one by one via single executor. More…
#include <ie_executor_manager.hpp>
template ExecutorManager
{
// typedefs
typedef std::shared_ptr<ExecutorManager> Ptr;
// methods
virtual ITaskExecutor::Ptr getExecutor(const std::string& id) = 0;
virtual void setTbbFlag(bool flag) = 0;
virtual bool getTbbFlag() = 0;
static ExecutorManager \* getInstance();
};
Detailed Documentation¶
Interface for tasks execution manager. This is global point for getting task executor objects by string id. It’s necessary in multiple asynchronous requests for having unique executors to avoid oversubscription. E.g. There 2 task executors for CPU device: one - in FPGA, another - in OneDNN. Parallel execution both of them leads to not optimal CPU usage. More efficient to run the corresponding tasks one by one via single executor.
Typedefs¶
typedef std::shared_ptr<ExecutorManager> Ptr
A shared pointer to ExecutorManager interface
Methods¶
virtual ITaskExecutor::Ptr getExecutor(const std::string& id) = 0
Returns executor by unique identificator.
Parameters:
id |
An unique identificator of device (Usually string representation of TargetDevice) |
Returns:
A shared pointer to existing or newly ITaskExecutor
virtual void setTbbFlag(bool flag) = 0
Set TBB terminate flag.
Parameters:
flag |
A boolean value: True to terminate tbb during destruction False to not terminate tbb during destruction |
Returns:
void
static ExecutorManager \* getInstance()
Returns a global instance of ExecutorManager.
Returns:
The instance.