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

Method init

tools/cpp_examples/elastic-ctr/client/api/elastic_ctr_api.cpp:120–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120int ElasticCTRPredictorApi::init(const char *path,
121 const char *slot_conf_file,
122 const char *serving_conf_file) {
123 int ret = api_.create(path, serving_conf_file);
124 if (ret != 0) {
125 return ret;
126 }
127
128 ret = read_slot_conf(path, slot_conf_file);
129 if (ret != 0) {
130 return ret;
131 }
132
133 // Thread-local storage
134 if (pthread_key_create(&tls_bspec_key_, thread_resource_delete) != 0) {
135 LOG(ERROR) << "unable to create tls_bthread_key of thrd_data";
136 return -1;
137 }
138
139 return 0;
140}
141
142int ElasticCTRPredictorApi::thrd_initialize() {
143 api_.thrd_initialize();

Callers 1

mainFunction · 0.45

Calls 1

createMethod · 0.45

Tested by

no test coverage detected