Module fork_parallel
Source - CacheAligned
- Cache-aligned wrapper to prevent false sharing
Use this when accumulating results across threads
- pfor_dynamic_map
- Parallel map using dynamic work-stealing
Best for variable-cost workloads (e.g., feature binning with variable data sizes)
- pfor_indexed
- Parallel for-each using ForkUnion with index
Used when we need to mutate external state via index
- pfor_map
- Parallel map over a slice using ForkUnion’s static scheduling
Best for uniform-cost workloads (e.g., histogram building, predictions)
- pfor_range_map
- Parallel map over a range using ForkUnion
Best for index-based workloads where you need the index
- pfor_zip_map
- Parallel zip-map over two slices using ForkUnion
Best for operations like histogram subtraction