MCPcopy Create free account
hub / github.com/Tencent/embedx / BuildContext

Method BuildContext

src/graph/graph_builder.cc:27–44  ·  view source on GitHub ↗

/ Build graph */ /

Source from the content-addressed store, hash-verified

25/* Build graph */
26/************************************************************************/
27bool GraphBuilder::BuildContext(const std::string& context, int thread_num) {
28 DXINFO("Building graph context...");
29
30 if (context.empty()) {
31 DXERROR("Context files are empty.");
32 return false;
33 }
34
35 context_loader_->Clear();
36 context_loader_->Reserve(estimated_size_);
37 if (!context_loader_->Load(context, thread_num)) {
38 DXERROR("Failed to load context files.");
39 return false;
40 }
41
42 DXINFO("Done.");
43 return true;
44}
45
46bool GraphBuilder::BuildNodeFeature(const std::string& node_feature,
47 int thread_num) {

Callers 1

CreateMethod · 0.80

Calls 3

ClearMethod · 0.45
ReserveMethod · 0.45
LoadMethod · 0.45

Tested by

no test coverage detected