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;
72 INFERENCE_ENGINE_DEPRECATED
74 static std::map<std::string, InferenceEngine::TargetDevice> deviceFromNameMap = {
75 {
"CPU", InferenceEngine::TargetDevice::eCPU },
76 {
"GPU", InferenceEngine::TargetDevice::eGPU },
77 {
"FPGA", InferenceEngine::TargetDevice::eFPGA },
78 {
"MYRIAD", InferenceEngine::TargetDevice::eMYRIAD },
79 {
"HDDL", InferenceEngine::TargetDevice::eHDDL },
80 {
"GNA", InferenceEngine::TargetDevice::eGNA },
81 {
"BALANCED", InferenceEngine::TargetDevice::eBalanced },
82 {
"HETERO", InferenceEngine::TargetDevice::eHETERO },
83 {
"MULTI", InferenceEngine::TargetDevice::eMULTI}
85 auto val = deviceFromNameMap.find(deviceName);
86 return val != deviceFromNameMap.end() ? val->second : InferenceEngine::TargetDevice::eDefault;
93 INFERENCE_ENGINE_DEPRECATED
95 IE_SUPPRESS_DEPRECATED_START
96 auto res = std::find_if(getAll().cbegin(), getAll().cend(), [&](
const Info & info){
97 return device == info.device;
99 if (res == getAll().cend()) {
100 return "Unknown device";
102 IE_SUPPRESS_DEPRECATED_END
103 return res->name.c_str();
113 INFERENCE_ENGINE_DEPRECATED
115 IE_SUPPRESS_DEPRECATED_START
117 IE_SUPPRESS_DEPRECATED_END
144 IE_SUPPRESS_DEPRECATED_START
165 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:137
Definition: ie_argmax_layer.hpp:11
StatusCode
This enum contains codes for all possible return values of the interface functions.
Definition: ie_common.h:205
Defines a message that contains the InferenceEngine::TargetDevice object to find a plugin for...
Definition: ie_device.hpp:125
TargetDevice device
object of InferenceEngine::TargetDevice to find a plugin for
Definition: ie_device.hpp:129
Represents detailed information for an error.
Definition: ie_common.h:228
FindPluginResponse findPlugin(const FindPluginRequest &req)
Finds an appropriate plugin for requested target device.
The macro defines a symbol import/export mechanism essential for Microsoft Windows(R) OS...
const char * getDeviceName(TargetDevice device)
Returns the device name.
Definition: ie_device.hpp:114
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:73
static const char * name(TargetDevice device)
Converts InferenceEngine::TargetDevice enum value to string representation.
Definition: ie_device.hpp:94
std::vector< std::string > names
A list of appropriate plugin names.
Definition: ie_device.hpp:141
This is a header file with common inference engine definitions.