Go to the documentation of this file.
31 class INFERENCE_ENGINE_API_CLASS(IStreamsExecutor) :
public ITaskExecutor {
36 using Ptr = std::shared_ptr<IStreamsExecutor>;
50 struct INFERENCE_ENGINE_API_CLASS(Config) {
62 void SetConfig(
const std::string& key,
const std::string& value);
81 int _threadsPerStream = 0;
83 int _threadBindingStep = 1;
84 int _threadBindingOffset = 0;
99 std::string name =
"StreamsExecutor",
101 int threadsPerStream = 0,
103 int threadBindingStep = 1,
104 int threadBindingOffset = 0,
108 _threadsPerStream{threadsPerStream},
109 _threadBindingType{threadBindingType},
110 _threadBindingStep{threadBindingStep},
111 _threadBindingOffset{threadBindingOffset},
Inference Engine Plugin API namespace.
@ NONE
Don't bind threads.
Definition: ie_istreams_executor.hpp:42
@ CORES
Bind threads to cores.
Definition: ie_istreams_executor.hpp:43
A header file for Inference Engine Task Executor Interface.
ThreadBindingType
Defines thread binding type.
Definition: ie_istreams_executor.hpp:41
virtual void Execute(Task task)=0
Execute the task in the current thread using streams executor configuration and constraints.
virtual int GetStreamId()=0
Return the index of current stream.
Defines IStreamsExecutor configuration.
Definition: ie_istreams_executor.hpp:50
Parameter GetConfig(const std::string &key)
Return configuration value.
void SetConfig(const std::string &key, const std::string &value)
Parses configuration key/value pair.
Config(std::string name="StreamsExecutor", int streams=1, int threadsPerStream=0, ThreadBindingType threadBindingType=ThreadBindingType::NONE, int threadBindingStep=1, int threadBindingOffset=0, int threads=0)
A constructor with arguments.
Definition: ie_istreams_executor.hpp:98
std::vector< std::string > SupportedKeys()
Supported Configuration keys.
virtual int GetNumaNodeId()=0
Return the id of current NUMA Node.
static Config MakeDefaultMultiThreaded(const Config &initial)
Create appropriate multithreaded configuration filing unconfigured values from initial configuration ...
std::shared_ptr< IStreamsExecutor > Ptr
Definition: ie_istreams_executor.hpp:36
~IStreamsExecutor() override
A virtual destructor.
Interface for Task Executor. Inference Engine uses InferenceEngine::ITaskExecutor interface to run al...
Definition: ie_itask_executor.hpp:46
std::string _name
Used by ITT to name executor threads.
Definition: ie_istreams_executor.hpp:79
std::function< void()> Task
Inference Engine Task Executor can use any copyable callable without parameters and output as a task....
Definition: ie_itask_executor.hpp:25