MCPcopy Create free account
hub / github.com/OAID/Tengine / GetDevice

Method GetDevice

core/lib/exec_context.cpp:96–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96const char* ExecContext::GetDevice(int idx)
97{
98 const char* dev_name = nullptr;
99
100 lock_.lock();
101
102 int num = dev_list_.size();
103
104 if(idx < 0 || idx >= num)
105 {
106 set_tengine_errno(EINVAL);
107 }
108 else
109 {
110 DevExecutor* dev = dev_list_.at(idx);
111 dev_name = dev->GetName().c_str();
112 }
113
114 lock_.unlock();
115 return dev_name;
116}
117
118void ExecContext::InitContext(int empty_context)
119{

Callers 3

create_deviceFunction · 0.45
destroy_deviceFunction · 0.45
get_context_deviceFunction · 0.45

Calls 4

set_tengine_errnoFunction · 0.85
GetNameMethod · 0.80
sizeMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected