45 Info(
TargetDevice device, std::string name) : device(device), name(name){}
48 static const std::vector<Info> & getAll() {
49 #define DECL_DEVICE(device_type) {TargetDevice::e##device_type, #device_type}
51 static std::vector<Info> g_allDeviceInfos = {
53 DECL_DEVICE(Balanced),
64 return g_allDeviceInfos;
74 INFERENCE_ENGINE_DEPRECATED
76 static std::map<std::string, InferenceEngine::TargetDevice> deviceFromNameMap = {
77 {
"CPU", InferenceEngine::TargetDevice::eCPU },
78 {
"GPU", InferenceEngine::TargetDevice::eGPU },
79 {
"FPGA", InferenceEngine::TargetDevice::eFPGA },
80 {
"MYRIAD", InferenceEngine::TargetDevice::eMYRIAD },
81 {
"HDDL", InferenceEngine::TargetDevice::eHDDL },
82 {
"GNA", InferenceEngine::TargetDevice::eGNA },
83 {
"BALANCED", InferenceEngine::TargetDevice::eBalanced },
84 {
"HETERO", InferenceEngine::TargetDevice::eHETERO },
85 {
"MULTI", InferenceEngine::TargetDevice::eMULTI}
87 auto val = deviceFromNameMap.find(deviceName);
88 return val != deviceFromNameMap.end() ? val->second : InferenceEngine::TargetDevice::eDefault;
97 INFERENCE_ENGINE_DEPRECATED
99 IE_SUPPRESS_DEPRECATED_START
100 auto res = std::find_if(getAll().cbegin(), getAll().cend(), [&](
const Info & info){
101 return device == info.device;
103 if (res == getAll().cend()) {
104 return "Unknown device";
106 IE_SUPPRESS_DEPRECATED_END
107 return res->name.c_str();
117 INFERENCE_ENGINE_DEPRECATED
119 IE_SUPPRESS_DEPRECATED_START
121 IE_SUPPRESS_DEPRECATED_END
148 IE_SUPPRESS_DEPRECATED_START
169 IE_SUPPRESS_DEPRECATED_END
TargetDevice
Describes known device types.
Definition: ie_device.hpp:24
Defines a message that contains a list of appropriate plugin names.
Definition: ie_device.hpp:141
Inference Engine API.
Definition: ie_argmax_layer.hpp:11
FindPluginResponse findPlugin(const FindPluginRequest &req)
Finds an appropriate plugin for requested target device.
Defines a message that contains the InferenceEngine::TargetDevice object to find a plugin for...
Definition: ie_device.hpp:129
TargetDevice device
object of InferenceEngine::TargetDevice to find a plugin for
Definition: ie_device.hpp:133
const char * getDeviceName(TargetDevice device)
Returns the device name.
Definition: ie_device.hpp:118
Represents detailed information for an error.
Definition: ie_common.h:230
StatusCode
This enum contains codes for all possible return values of the interface functions.
Definition: ie_common.h:207
The macro defines a symbol import/export mechanism essential for Microsoft Windows(R) OS...
Describes the relationship between the enumerator type and the actual device's name.
Definition: ie_device.hpp:41
static TargetDevice fromStr(const std::string &deviceName)
Converts string representation of device to InferenceEngine::TargetDevice enum value.
Definition: ie_device.hpp:75
static const char * name(TargetDevice device)
Converts an instance of InferenceEngine::TargetDevice to string representation.
Definition: ie_device.hpp:98
std::vector< std::string > names
A list of appropriate plugin names.
Definition: ie_device.hpp:145
This is a header file with common inference engine definitions.