MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / addParent

Method addParent

src/function/gds/bfs_graph.cpp:66–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66void DenseBFSGraph::addParent(uint16_t iter, nodeID_t boundNodeID, relID_t edgeID,
67 nodeID_t nbrNodeID, bool fwdEdge, ObjectBlock<ParentList>* block) {
68 auto parent = reserveParent(boundNodeID, edgeID, fwdEdge, block);
69 parent->setIter(iter);
70 // Since by default the parentPtr of each node is nullptr, that's what we start with.
71 ParentList* expected = nullptr;
72 while (!curData[nbrNodeID.offset].compare_exchange_strong(expected, parent)) {}
73 parent->setNextPtr(expected);
74}
75
76void DenseBFSGraph::addSingleParent(uint16_t iter, nodeID_t boundNodeID, relID_t edgeID,
77 nodeID_t nbrNodeID, bool fwdEdge, ObjectBlock<ParentList>* block) {

Callers 2

edgeComputeMethod · 0.80
edgeComputeMethod · 0.80

Calls 5

reserveParentFunction · 0.85
setIterMethod · 0.80
setNextPtrMethod · 0.80
containsMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected