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 7 forks source link

Modifications to `OpenMP.Parallel.For` #4

Closed computablee closed 2 years ago

computablee commented 2 years ago

This is a pretty big change, and wouldn't recommend it as a first commit. The changes requested are threefold:

  1. Add OpenMP.Parallel.Parallel to create a parallel region containing code that can be executed by a team of threads. This should be roughly the same as #pragma omp parallel
  2. Change OpenMP.Parallel.For to act like #pragma omp for, not #pragma omp parallel for
  3. Add OpenMP.Parallel.ParallelFor. This should be a wrapper around the previous two methods mentioned in 1 and 2.

Once we get a PR with this going through, we'll look at incorporating stuff like #pragma omp single and #pragma omp master.

jotasprout commented 2 years ago

Yeah, I am definitely eager to use this to sharpen my new C# (no pun intended) and .NET skills so I'm going to start looking at it but if anyone who can do it faster should be chosen before me.

computablee commented 2 years ago

@jotasprout I won't assign you to this quite yet, but if you want to make some incremental PRs we can see how things are looking. I might have some time to work on this myself this weekend.

computablee commented 2 years ago

Okay, fall break has come and I'm getting a break from grad school. Assigning myself to this issue, hopefully have something today.

computablee commented 2 years ago

Done. Not as well-tested as I'd like, but the few unit tests I have seem to indicate things are working properly.