Add synchronous parallel unit tests for ComputeContext

このコミットが含まれているのは:
Sergio Pedri committed 2021-12-31 13:13:04 +01:00
1 親 2f1d572413
コミット f4459ed7eb
1ファイル変更
+30
+30
ファイルの表示
@@ -434,6 +434,36 @@ public partial class ComputeContextTests
}
}
[CombinatorialTestMethod]
[AllDevices]
public void ForAndForEach_Batched_Parallel_WithParallelFor(Device device)
{
void Test(Device device)
{
for (int i = 0; i < 20; i++)
{
ForAndForEach_Batched(device);
}
}
Parallel.For(0, 64, _ => Test(device));
}
[CombinatorialTestMethod]
[AllDevices]
public async Task ForAndForEach_Batched_Parallel_WithTaskRun(Device device)
{
void Test(Device device)
{
for (int i = 0; i < 20; i++)
{
ForAndForEach_Batched(device);
}
}
await Task.Run(() => Test(device));
}
[CombinatorialTestMethod]
[AllDevices]
public async Task ForAndForEach_Async_Batched(Device device)