Parallelization features for ndarray.
This crate is deprecated and was replaced by equivalent rayon support
directly integrated to ndarray.
The array views and references to owned arrays all implement
NdarrayIntoParallelIterator (*); the default parallel iterators (each element
by reference or mutable reference) have no ordering guarantee in their
parallel implementations.
.axis_iter() and .axis_iter_mut() also have parallel counterparts,
and their parallel iterators are indexed (and thus ordered) and exact length.
Zip also implements NdarrayIntoParallelIterator, and there is an
extension trait so that it can use a method .par_apply directly.
(*) This regime of a custom trait instead of rayon’s own is since we use this intermediate ndarray-parallel crate.
Examples
Arrays and array views
Compute the exponential of each element in an array, parallelized.
extern crate ndarray;
extern crate ndarray_parallel;
use Array2;
use *;
Axis iterators
Use the parallel .axis_iter() to compute the sum of each row.
extern crate ndarray;
extern crate ndarray_parallel;
use Array;
use Axis;
use *;
Zip
Use zip for lock step function application across several arrays
extern crate ndarray;
extern crate ndarray_parallel;
use Array3;
use Zip;
use *;
type Array3f64 = ;