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

Function getFrontierTask

src/function/gds/gds_utils.cpp:22–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20namespace function {
21
22static std::shared_ptr<FrontierTask> getFrontierTask(const main::ClientContext* context,
23 const GraphRelInfo& relInfo, Graph* graph, ExtendDirection extendDirection,
24 const GDSComputeState& computeState, std::vector<std::string> propertiesToScan) {
25 auto info = FrontierTaskInfo(relInfo.srcTableID, relInfo.dstTableID, relInfo.relGroupEntry,
26 graph, extendDirection, *computeState.edgeCompute, std::move(propertiesToScan));
27 computeState.beginFrontierCompute(info.getBoundTableID(), info.getNbrTableID());
28 auto numThreads = context->getMaxNumThreadForExec();
29 auto sharedState =
30 std::make_shared<FrontierTaskSharedState>(numThreads, *computeState.frontierPair);
31 auto maxOffset =
32 graph->getMaxOffset(transaction::Transaction::Get(*context), info.getBoundTableID());
33 sharedState->morselDispatcher.init(maxOffset);
34 return std::make_shared<FrontierTask>(numThreads, info, sharedState);
35}
36
37static void scheduleFrontierTask(ExecutionContext* context, const GraphRelInfo& relInfo,
38 Graph* graph, ExtendDirection extendDirection, const GDSComputeState& computeState,

Callers 1

scheduleFrontierTaskFunction · 0.85

Calls 7

FrontierTaskInfoClass · 0.85
getBoundTableIDMethod · 0.80
beginFrontierComputeMethod · 0.45
getNbrTableIDMethod · 0.45
getMaxOffsetMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected