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

Method getNextRangeMorsel

src/function/gds/frontier_morsel.cpp:24–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24bool FrontierMorselDispatcher::getNextRangeMorsel(FrontierMorsel& frontierMorsel) {
25 auto beginOffset = nextOffset.fetch_add(morselSize, std::memory_order_acq_rel);
26 if (beginOffset >= maxOffset) {
27 return false;
28 }
29 auto endOffset = beginOffset + morselSize > maxOffset ? maxOffset : beginOffset + morselSize;
30 frontierMorsel.init(beginOffset, endOffset);
31 return true;
32}
33
34} // namespace function
35} // namespace lbug

Callers 1

runMethod · 0.80

Calls 1

initMethod · 0.45

Tested by

no test coverage detected