| 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 | { |
no test coverage detected