/ Build graph */ /
| 25 | /* Build graph */ |
| 26 | /************************************************************************/ |
| 27 | bool 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 | |
| 46 | bool GraphBuilder::BuildNodeFeature(const std::string& node_feature, |
| 47 | int thread_num) { |