MCPcopy Create free account
hub / github.com/PaddlePaddle/Serving / thrd_initialize

Method thrd_initialize

core/sdk-cpp/src/variant.cpp:73–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73int Variant::thrd_initialize() {
74 if (_stub_map.size() <= 0) {
75 return _default_stub->thrd_initialize();
76 }
77
78 std::map<std::string, Stub*>::iterator iter;
79 for (iter = _stub_map.begin(); iter != _stub_map.end(); ++iter) {
80 Stub* stub = iter->second;
81 if (!stub || stub->thrd_initialize() != 0) {
82 LOG(ERROR) << "Failed thrd initialize stub: " << iter->first;
83 return -1;
84 }
85 VLOG(2) << "Succ thrd initialize stub:" << iter->first;
86 }
87
88 VLOG(2) << "Succ thrd initialize all stubs";
89 return 0;
90}
91
92int Variant::thrd_clear() {
93 if (_stub_map.size() <= 0) {

Callers 2

numpy_predictMethod · 0.45
predictMethod · 0.45

Calls 3

beginMethod · 0.80
sizeMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected