Module parallel

Module parallel 

Source
Expand description

Advanced parallel processing and scheduling

This module provides comprehensive parallel processing capabilities including:

  • Work-stealing scheduler for efficient thread utilization
  • Custom partitioning strategies for different data distributions
  • Nested parallelism with controlled resource usage
  • Load balancing and adaptive scheduling

Structs§

CloneableTask
CloneableTask for simple function-based tasks
DataPartitioner
Partitioner for dividing data based on distribution characteristics
LoadBalancer
Load balancer for runtime adjustment of partitions
NestedConfig
Configuration for nested parallel execution
NestedContext
Context for nested parallel execution
NestedScope
Nested parallel execution scope
ParallelTask
ParallelTask for executing tasks in parallel with work stealing
PartitionerConfig
Configuration for the partitioner
ResourceLimits
Resource limits for nested parallelism
ResourceManager
Global resource manager for tracking system-wide resource usage
ResourceUsageStats
Resource usage statistics
SchedulerConfig
Work-stealing scheduler configuration
SchedulerConfigBuilder
Builder for scheduler configuration
SchedulerStats
Work-stealing scheduler statistics
TaskHandle
Task handle for tracking task status
WorkStealingScheduler
Work-stealing scheduler

Enums§

DataDistribution
Data distribution types that affect partitioning strategy
NestedPolicy
Policy for handling nested parallelism
PartitionStrategy
Partitioning strategy for dividing work among threads
SchedulingPolicy
Task scheduling policy
TaskPriority
Task priority levels
TaskStatus
Task status

Traits§

WorkStealingArray

Functions§

adaptive_par_for_each
Adaptive parallel execution based on nesting level
adaptive_par_map
Adaptive parallel map based on nesting level
create_work_stealing_scheduler
Create a new work-stealing scheduler with default configuration
create_work_stealing_scheduler_with_workers
Create a new work-stealing scheduler with the specified number of workers
current_nesting_level
Get the current nesting level
get_workerid
Get the worker ID for the current thread
is_nested_parallelism_allowed
Check if nested parallelism is allowed at the current level
nested_scope
Execute a function with nested parallelism support
nested_scope_with_limits
Execute a function with nested parallelism support and custom limits
with_nested_policy
Execute with specific nested parallelism policy