// Copyright Epic Games, Inc. All Rights Reserved. #include #include namespace mu::ParallelExecutionUtils { void InvokeBatchParallelFor(int32 Num, TFunctionRef Body) { if (Num == 1) { Body(0); } else if (Num > 1) { ParallelFor(Num, Body); } } void InvokeBatchParallelForSingleThread(int32 Num, TFunctionRef Body) { for (int32 BatchId = 0; BatchId < Num; ++BatchId) { Body(BatchId); } } }