MCPcopy Create free account
hub / github.com/PCGEx/PCGExtendedToolkit / StartIterations

Method StartIterations

Source/PCGExtendedToolkit/Private/PCGExMT.cpp:474–497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472 }
473
474 void FTaskGroup::StartIterations(const int32 MaxItems, const int32 ChunkSize, const bool bDaisyChain)
475 {
476 if (!IsAvailable() || !OnIterationCallback) { return; }
477
478 check(MaxItems > 0);
479
480 const int32 SanitizedChunkSize = FMath::Max(1, ChunkSize);
481
482 if (bDaisyChain)
483 {
484 bDaisyChained = true;
485
486 SetExpectedTaskCount(SubLoopScopes(Loops, MaxItems, SanitizedChunkSize));
487
488 if (OnPrepareSubLoopsCallback) { OnPrepareSubLoopsCallback(Loops); }
489
490 PCGEX_MAKE_SHARED(Task, FDaisyChainScopeIterationTask, 0)
491 LaunchWithPreparation(Task, false);
492 }
493 else
494 {
495 StartRanges<FScopeIterationTask>(MaxItems, SanitizedChunkSize, false);
496 }
497 }
498
499 void FTaskGroup::StartSubLoops(const int32 MaxItems, const int32 ChunkSize, const bool bDaisyChain)
500 {

Callers 11

DispatchTasksMethod · 0.80
ProcessMethod · 0.80
SearchMethod · 0.80
CompileMethod · 0.80
WriteMethod · 0.80
CompleteWorkMethod · 0.80
OutputMethod · 0.80
ProcessMethod · 0.80
ProcessMethod · 0.80
WriteMethod · 0.80
CompleteWorkMethod · 0.80

Calls 5

checkFunction · 0.85
MaxFunction · 0.85
SetExpectedTaskCountFunction · 0.85
SubLoopScopesFunction · 0.85
LaunchWithPreparationFunction · 0.85

Tested by

no test coverage detected