sparsemat / sprs

sparse linear algebra library for rust
Apache License 2.0
386 stars 45 forks source link

Optional rayon #212

Closed mulimoen closed 4 years ago

mulimoen commented 4 years ago

As mentioned in #208 rayon will panic when creating a threadpool on targets which do not have threads. This PR puts rayon and num_cpus behind the feature flag multi_thread (suggestions for name?), but otherwise follows exactly the same code path as the Fixed(1) case.

Fixes #208

vbarrielle commented 4 years ago

That's very nice, thanks! The feature name multi_thread is good in my opinion.

mulimoen commented 4 years ago

This is a breaking change btw, as someone could have default-features = False in their Cargo.toml

vbarrielle commented 4 years ago

I had not realized that. Thanks for pointing it out. Guess I'll try to syncrhonize the version bump with another breaking change I'm thinking of. I should probably maintain a file of planned breaking changes.

vbarrielle commented 4 years ago

And eventually find ways to commit to a more stable API of course...