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

Optimize #118 #123

Closed computablee closed 10 months ago

computablee commented 10 months ago

Which issue are you addressing?

Optimizes the PR #118

How have you addressed the issue?

Instead of weird casting and Unsafe.As, we simply invert the bits, add 1, then atomically add. This is in-line with 2's compliment arithmetic.

How have you tested your patch?

This is the first PR whose changes have been formally verified with a proof assistant. Of course, the unit tests still pass :)

codecov[bot] commented 10 months ago

Codecov Report

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

Comparison is base (33a8e90) 99.22% compared to head (708a1ff) 99.22%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #123 +/- ## ======================================= Coverage 99.22% 99.22% ======================================= Files 12 12 Lines 1291 1291 Branches 137 137 ======================================= Hits 1281 1281 Misses 5 5 Partials 5 5 ```

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