computablee / DotMP

A collection of powerful abstractions for parallel programming in .NET with an OpenMP-like API.
https://computablee.github.io/DotMP/
GNU Lesser General Public License v2.1
29 stars 8 forks source link

Validate DotMP input parameters #98

Closed computablee closed 11 months ago

computablee commented 11 months ago

Which issue are you addressing?

Closes #51

How have you addressed the issue?

A new method has been added to validate parameters. It is called

  1. Within the internal For handler to ensure that all worksharing-for loops have valid parameters.
  2. Within a ParallelRegion to ensure all parallel regions have valid parameters.
  3. Within a Taskloop to ensure all taskloops have valid parameters.

How have you tested your patch?

Two new tests have been added:

  1. Absent_params_shouldnt_except, which uses all default parameters with affected methods to ensure that the checks do not affect a lack of parameters.
  2. Invalid_params_should_except, which has 100% coverage of the ValidateParams method to ensure that all paths are valid.
codecov[bot] commented 11 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (6461494) 99.44% compared to head (9cf9f31) 99.54%. Report is 5 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #98 +/- ## ========================================== + Coverage 99.44% 99.54% +0.09% ========================================== Files 12 12 Lines 1080 1096 +16 Branches 103 108 +5 ========================================== + Hits 1074 1091 +17 + Partials 6 5 -1 ``` | [Files](https://app.codecov.io/gh/computablee/DotMP/pull/98?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Phillip+Allen+Lane) | Coverage Δ | | |---|---|---| | [DotMP/Exceptions.cs](https://app.codecov.io/gh/computablee/DotMP/pull/98?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Phillip+Allen+Lane#diff-RG90TVAvRXhjZXB0aW9ucy5jcw==) | `100.00% <100.00%> (ø)` | | | [DotMP/Parallel.cs](https://app.codecov.io/gh/computablee/DotMP/pull/98?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Phillip+Allen+Lane#diff-RG90TVAvUGFyYWxsZWwuY3M=) | `98.96% <100.00%> (+0.24%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.