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

ParallelUnbalancedWork for efficient unbalanced parallel loops #7787

Merged
merged 14 commits into from
Dec 2, 2024

Commits on Nov 28, 2024

  1. Create method for processing efficient unbalanced parallel loops

    - Introduced the `ParallelUnbalancedWork` class to efficiently execute parallel loops over a range of integers, handling unbalanced workloads.
    - Added static `For` methods to support parallel execution with and without thread-local data, including initialization and finalization functions.
    - Utilized thread pooling and a shared counter (`SharedCounter`) to distribute iterations among threads dynamically.
    - Implemented internal classes (`BaseData`, `Data`, and `InitProcessor<TLocal>`) to manage shared state and thread synchronization.
    - Aimed to optimize performance in scenarios where the workload per iteration is uneven, ensuring better resource utilization and reduced execution time.
    benaadams committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    03ddd2b View commit details
    Browse the repository at this point in the history
  2. Add doc comments

    benaadams committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    2b691f1 View commit details
    Browse the repository at this point in the history
  3. Comments

    benaadams committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    942a2a5 View commit details
    Browse the repository at this point in the history
  4. Use ManualResetEventSlim

    benaadams committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    c7f169a View commit details
    Browse the repository at this point in the history
  5. Add padding

    benaadams committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    58fbcf6 View commit details
    Browse the repository at this point in the history
  6. Less allocations

    benaadams committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    6224dc9 View commit details
    Browse the repository at this point in the history
  7. Less allocations

    benaadams committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    8f5f328 View commit details
    Browse the repository at this point in the history
  8. Less allocations

    benaadams committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    061956a View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2024

  1. Configuration menu
    Copy the full SHA
    842a82b View commit details
    Browse the repository at this point in the history
  2. Use pooledlist

    benaadams committed Dec 2, 2024
    Configuration menu
    Copy the full SHA
    0a3b349 View commit details
    Browse the repository at this point in the history
  3. Introduce struct for state

    benaadams committed Dec 2, 2024
    Configuration menu
    Copy the full SHA
    84aec6b View commit details
    Browse the repository at this point in the history
  4. Capture threads

    benaadams committed Dec 2, 2024
    Configuration menu
    Copy the full SHA
    f18e10b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7bff372 View commit details
    Browse the repository at this point in the history
  6. Add benchmark

    benaadams committed Dec 2, 2024
    Configuration menu
    Copy the full SHA
    b84d6e7 View commit details
    Browse the repository at this point in the history