MCPcopy Create free account
hub / github.com/dmlc/parameter_server / addSubNode

Method addSubNode

src/system/executor.cc:279–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277}
278
279void Executor::NodeInfo::addSubNode(RNode* s) {
280 CHECK_NOTNULL(s);
281 // insert s into sub_nodes such as sub_nodes is still ordered
282 int pos = 0;
283 while (pos < sub_nodes.size() &&
284 CHECK_NOTNULL(sub_nodes[pos])->keyRange().inLeft(s->keyRange())) {
285 ++ pos;
286 }
287 sub_nodes.insert(sub_nodes.begin()+pos, s);
288 // update the key range
289 key_ranges.insert(key_ranges.begin() + pos, s->keyRange());
290}
291
292void Executor::NodeInfo::removeSubNode(RNode* s) {
293 size_t n = sub_nodes.size();

Callers 1

addMethod · 0.80

Calls 5

inLeftMethod · 0.80
sizeMethod · 0.45
keyRangeMethod · 0.45
insertMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected