Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array.Parallel.forall , Array.Parallel.exists #14910

Merged
merged 8 commits into from
Mar 21, 2023

Conversation

T-Gro
Copy link
Member

@T-Gro T-Gro commented Mar 15, 2023

This is another part of the RFC to expand the Array.Parallel module, based on fsharp/fslang-suggestions#187 .

There are two functions for logical tests, forall and exists.

  • They can fully step if a matching (resp. not matching for exists) element is found
  • They do not need to return the first index (unlike tryFind etc.), therefore ParallelLoopState.Stop() can be used instead of .Break()
  • No synchronization across worker threads is needed in this case

@T-Gro T-Gro marked this pull request as ready for review March 16, 2023 09:43
@T-Gro T-Gro requested a review from a team as a code owner March 16, 2023 09:43
src/FSharp.Core/array.fsi Outdated Show resolved Hide resolved
src/FSharp.Core/array.fsi Outdated Show resolved Hide resolved
@psfinaki
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@T-Gro T-Gro merged commit d1316d3 into dotnet:main Mar 21, 2023
@T-Gro T-Gro deleted the array-parallel-logicalTests branch March 21, 2023 17:09
kant2002 pushed a commit to kant2002/fsharp that referenced this pull request Apr 1, 2023
* Array.Parallel.forall  , Array.Parallel.exists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants