|
DotMP
|
CPU tests for the DotMP library. More...
Public Member Functions | |
| CPUTests (ITestOutputHelper output) | |
| Constructor to write output. More... | |
| void | Parallel_performance_should_be_higher () |
| Tests to make sure that parallel performance is higher than sequential performance. More... | |
| void | Parallel_should_work () |
| Tests to make sure that DotMP.Parallel.ParallelRegion()'s are actually created. More... | |
| void | Parallelfor_should_work () |
| Tests the functionality of DotMP.Parallel.For(). More... | |
| void | Guided_should_produce_correct_results () |
| Tests to make sure that DotMP.Schedule.Guided produces correct results. More... | |
| void | Workstealing_should_produce_correct_results () |
| Tests to make sure that DotMP.Schedule.Guided produces correct results. More... | |
| void | Workstealing_load_balances () |
| Tests to ensure that workstealing adequately load balances. More... | |
| void | Static_should_produce_correct_results () |
| Tests to make sure that DotMP.Schedule.Static produces correct results. More... | |
| void | Dynamic_should_produce_correct_results () |
| Tests to make sure that DotMP.Schedule.Dynamic produces correct results. More... | |
| void | Collapse_works () |
| Tests to make sure that DotMP.Parallel.ForCollapse produces correct results. More... | |
| void | Reduction_collapse_works () |
| Tests to make sure that DotMP.Parallel.ForReductionCollapse produces correct results. More... | |
| void | Taskloop_should_produce_correct_results () |
| Tests to make sure that taskloops produce correct results. More... | |
| void | Taskloop_dependencies_work () |
| Tests taskloop dependencies, and in turn, more complex dependency chaining. More... | |
| void | Nested_task_dependencies_work () |
| Ensures that nested task dependencies work. More... | |
| void | Schedule_runtime_works () |
| Tests to make sure that DotMP.Parallel.Schedule.Runtime properly reads values from the environment variable. More... | |
| void | Critical_works () |
| Tests to make sure that DotMP.Parallel.Critical() works. More... | |
| void | Master_works () |
| Tests to make sure that DotMP.Parallel.Master() works. More... | |
| void | Single_works () |
| Tests to make sure that DotMP.Parallel.Single() works. More... | |
| void | Atomic_works () |
| Tests to make sure that the DotMP.Atomic class works. More... | |
| void | Ordered_works () |
| Tests to make sure that DotMP.Parallel.Ordered() works. More... | |
| void | Reduction_works () |
| Tests to make sure that DotMP.Parallel.ForReduction<T>() works. More... | |
| void | Get_and_Set_NumThreads_work () |
| Tests to make sure that DotMP.Parallel.SetNumThreads() works. More... | |
| void | InParallel_works () |
| Tests to make sure that DotMP.Parallel.InParallel() works. More... | |
| void | SetDynamic_works () |
| Tests to make sure that DotMP.Parallel.SetDynamic() works. More... | |
| void | GetWTime_works () |
| Tests to make sure that DotMP.Parallel.GetWTime() works. More... | |
| void | GetNested_works () |
| Tests to make sure that DotMP.Parallel.GetNested() and DotMP.Parallel.SetNested() work. More... | |
| void | Locks_work () |
| Tests to make sure that the DotMP.Locking and DotMP.Lock classes work. More... | |
| void | Shared_works () |
| Tests to make sure the DotMP.Shared class works. More... | |
| void | SharedEnumerable_works () |
| Tests to make sure the DotMP.SharedEnumerable class works. More... | |
| void | Sections_works () |
| Tests to make sure that DotMP.Parallel.Sections() and DotMP.Parallel.Section() work. More... | |
| void | Tasking_works () |
| Tests to see if the basics of tasking work. More... | |
| void | Taskloop_only_if_works () |
| Test if the only_if clause works on taskloops. More... | |
| void | Nested_tasks_work () |
| Checks to see if nested tasks work. More... | |
| void | Task_dependencies_work () |
| Test if taskloop dependencies work. More... | |
| void | Non_parallel_for_should_except () |
| Verifies that a Parallel.For used outside of a parallel region throws an exception. More... | |
| void | Nested_parallelism_should_except () |
| Verifies that nested parallelism throws an exception. More... | |
| void | Non_parallel_sections_should_except () |
| Verifies that a sections region used outside of a parallel region throws an exception. More... | |
| void | Non_parallel_barrier_should_except () |
| Verifies that a barrier used outside of a parallel region throws an exception. More... | |
| void | Non_parallel_master_should_except () |
| Verifies that a master region used outside of a parallel region throws an exception. More... | |
| void | Non_parallel_single_should_except () |
| Verifies that a single region used outside of a parallel region throws an exception. More... | |
| void | Non_parallel_critical_should_except () |
| Verifies that a critical region used outside of a parallel region throws an exception. More... | |
| void | Nested_worksharing_should_except () |
| Verifies that nested worksharing throws an exception. More... | |
| void | Non_for_ordered_should_except () |
| Verifies that an ordered region used outside of a for region throws an exception. More... | |
| void | Non_parallel_GetThreadNum_should_except () |
| Verifies that GetThreadNum used outside of a parallel region throws an exception. More... | |
| void | Absent_params_shouldnt_except () |
| Verifies that absent parameters shouldn't throw exceptions. More... | |
| void | Overflow_for_should_except () |
| Verifies that for loops which overflow internal indices should throw an exception. More... | |
| void | Invalid_params_should_except () |
| Verifies that invalid parameters throw exceptions. More... | |
| void | Custom_scheduler_works () |
| Verifies that custom schedulers work. More... | |
| void | Nested_taskwait_works () |
| Checks that nested taskwait works. More... | |
| void | Improper_taskwait_should_except () |
| Ensures that improper usage of taskwait that risks deadlock should throw an exception. More... | |
| void | Boundary_parallelfor_should_except () |
| Ensures that overflows in the schedulers properly throw exceptions. More... | |
Private Member Functions | |
| float[] | saxpy_parallelregion_for (float a, float[] x, float[] y, Schedule schedule, uint? chunk_size) |
| A sample workload for saxpy. More... | |
| float[] | saxpy_parallelregion_for_taskloop (float a, float[] x, float[] y, uint? grainsize) |
| A sample workload for saxpy, using taskloops. More... | |
| float[] | saxpy_parallelfor (float a, float[] x, float[] y) |
| Same as saxpy_parallelregion_for, but uses DotMP.Parallel.ParallelFor() instead of DotMP.Parallel.ParallelRegion() and DotMP.Parallel.For(). More... | |
Static Private Member Functions | |
| static long | Workload (bool inParallel) |
| A sample workload for DotMP.Parallel.ParallelFor(). More... | |
| static void | InnerWorkload (int j, float[] a, float[] b, float[] c) |
| A heavy workload for tests. More... | |
| static uint | CreateRegion () |
| Creates a parallel region and returns the number of threads spawned. More... | |
Private Attributes | |
| readonly ITestOutputHelper | output |
CPU tests for the DotMP library.
|
inline |
Constructor to write output.
| output | Output object. |
|
inline |
Verifies that absent parameters shouldn't throw exceptions.
|
inline |
Tests to make sure that the DotMP.Atomic class works.
|
inline |
Ensures that overflows in the schedulers properly throw exceptions.
|
inline |
Tests to make sure that DotMP.Parallel.ForCollapse produces correct results.
|
inlinestaticprivate |
Creates a parallel region and returns the number of threads spawned.
|
inline |
Tests to make sure that DotMP.Parallel.Critical() works.
|
inline |
Verifies that custom schedulers work.
|
inline |
Tests to make sure that DotMP.Schedule.Dynamic produces correct results.
|
inline |
Tests to make sure that DotMP.Parallel.SetNumThreads() works.
|
inline |
Tests to make sure that DotMP.Parallel.GetNested() and DotMP.Parallel.SetNested() work.
|
inline |
Tests to make sure that DotMP.Parallel.GetWTime() works.
|
inline |
Tests to make sure that DotMP.Schedule.Guided produces correct results.
|
inline |
Ensures that improper usage of taskwait that risks deadlock should throw an exception.
|
inlinestaticprivate |
A heavy workload for tests.
| j | Index to use into a, b, and c. |
| a | Float array 1 (destination). |
| b | Float array 2 (source). |
| c | Float array 3 (source). |
|
inline |
Tests to make sure that DotMP.Parallel.InParallel() works.
|
inline |
Verifies that invalid parameters throw exceptions.
|
inline |
Tests to make sure that the DotMP.Locking and DotMP.Lock classes work.
|
inline |
Tests to make sure that DotMP.Parallel.Master() works.
|
inline |
Verifies that nested parallelism throws an exception.
|
inline |
Ensures that nested task dependencies work.
|
inline |
Checks to see if nested tasks work.
|
inline |
Checks that nested taskwait works.
|
inline |
Verifies that nested worksharing throws an exception.
|
inline |
Verifies that an ordered region used outside of a for region throws an exception.
|
inline |
Verifies that a barrier used outside of a parallel region throws an exception.
|
inline |
Verifies that a critical region used outside of a parallel region throws an exception.
|
inline |
Verifies that a Parallel.For used outside of a parallel region throws an exception.
|
inline |
Verifies that GetThreadNum used outside of a parallel region throws an exception.
|
inline |
Verifies that a master region used outside of a parallel region throws an exception.
|
inline |
Verifies that a sections region used outside of a parallel region throws an exception.
|
inline |
Verifies that a single region used outside of a parallel region throws an exception.
|
inline |
Tests to make sure that DotMP.Parallel.Ordered() works.
|
inline |
Verifies that for loops which overflow internal indices should throw an exception.
|
inline |
Tests to make sure that parallel performance is higher than sequential performance.
|
inline |
Tests to make sure that DotMP.Parallel.ParallelRegion()'s are actually created.
|
inline |
Tests the functionality of DotMP.Parallel.For().
|
inline |
Tests to make sure that DotMP.Parallel.ForReductionCollapse produces correct results.
|
inline |
Tests to make sure that DotMP.Parallel.ForReduction<T>() works.
|
inlineprivate |
Same as saxpy_parallelregion_for, but uses DotMP.Parallel.ParallelFor() instead of DotMP.Parallel.ParallelRegion() and DotMP.Parallel.For().
| a | Scalar for saxpy. |
| x | Vector to multiply by the scalar. |
| y | Vector to add. |
|
inlineprivate |
A sample workload for saxpy.
| a | Scalar for saxpy. |
| x | Vector to multiply by the scalar. |
| y | Vector to add. |
| schedule | Schedule to use. |
| chunk_size | Chunk size to use. |
|
inlineprivate |
A sample workload for saxpy, using taskloops.
| a | Scalar for saxpy. |
| x | Vector to multiply by the scalar. |
| y | Vector to add. |
| grainsize | Grainsize to use |
|
inline |
Tests to make sure that DotMP.Parallel.Schedule.Runtime properly reads values from the environment variable.
|
inline |
Tests to make sure that DotMP.Parallel.Sections() and DotMP.Parallel.Section() work.
|
inline |
Tests to make sure that DotMP.Parallel.SetDynamic() works.
|
inline |
Tests to make sure the DotMP.Shared class works.
|
inline |
Tests to make sure the DotMP.SharedEnumerable class works.
|
inline |
Tests to make sure that DotMP.Parallel.Single() works.
|
inline |
Tests to make sure that DotMP.Schedule.Static produces correct results.
|
inline |
Test if taskloop dependencies work.
|
inline |
Tests to see if the basics of tasking work.
|
inline |
Tests taskloop dependencies, and in turn, more complex dependency chaining.
|
inline |
Test if the only_if clause works on taskloops.
|
inline |
Tests to make sure that taskloops produce correct results.
|
inlinestaticprivate |
A sample workload for DotMP.Parallel.ParallelFor().
| inParallel | Whether or not to enable parallelism. |
|
inline |
Tests to ensure that workstealing adequately load balances.
|
inline |
Tests to make sure that DotMP.Schedule.Guided produces correct results.
|
private |