par package:massiv

Parallel computation using all available cores. Same as ParOn []
Parallel computation using all available cores. Same as ParN 0
Specify the number of workers that will be handling all the jobs. Difference from ParOn is that workers can jump between cores. Using ParN 0 will result in using all available capabilities.
Schedule workers to run on specific capabilities. Specifying an empty list ParOn [] or using Par will result in utilization of all available capabilities.
Compute array ordering by applying a comparing function to each element. The exact ordering is unspecified so this is only intended for use in maps and the like where you need an ordering but do not care about which one is used.
O(1) - Unwrap boxed array. This will discard any possible slicing that has been applied to the array.
Partition elements of the supplied mutable vector according to the predicate.

Example

>>> import Data.Massiv.Array as A

>>> import Data.Massiv.Array.Mutable.Algorithms

>>> :set -XOverloadedLists

>>> m <- thaw ([2,1,50,10,20,8] :: Array P Ix1 Int)

>>> unstablePartitionM m (pure . (<= 10))
4

>>> freeze Seq m
Array P Seq (Sz1 6)
[ 2, 1, 8, 10, 20, 50 ]
Partition a segment of a vector. Starting and ending indices are unchecked.