Skip to content

Releases: orxfun/orx-split-vec

Parallelization

17 May 21:27
6c0d040
Compare
Choose a tag to compare

Support for Parallelization

Concurrent iterator optimized for the split vector is implemented. This enables parallel computation over split vector elements.

Concurrent Iterator

Concurrent iterator over references of split vector is implemented. Furthermore, a consuming concurrent iterator yielding owned elements is implemented.

impl<'a, T, G> IntoConcurrentIter<Item = &'a T> for &'a SplitVec<T, G>
impl<'a, T, G> IntoConcurrentIter<Item = T> for SplitVec<T, G>

They together imply that the split vectors for all growth strategies defined in this crate implement ConcurrentCollection.

This allows for creating concurrent iterators over references of items of the split vector that can be shared among threads.

Parallelization

This applies that the following is automatically implemented:

impl<'a, T, G> IntoParIter<Item = &'a T> for &'a SplitVec<T, G>
impl<'a, T, G> IntoParIter<Item = T> for SplitVec<T, G>

Or in brief, SplitVec<T, G>: ParallelizableCollection<Item = T>.

This means that the split vector can be used as the input source for all parallel computations defined by the ParIter. The benchmarks show that parallelization over the defined concurrent iterators is very efficient.

  • split_vec.par() returns a parallel iterator over references to its elements, and
  • split_vec.into_par() consumes the vector and returns a parallel iterator of the owned elements.

You may find demonstrations in demo_parallelization and bench_parallelization examples.

2024edition

08 Apr 04:58
acf31d7
Compare
Choose a tag to compare

Changes

Migrated to 2024edition.

32bit support is provided fixing the bugs in boundary checks.

iter_over and iter_over_mut are implemented as a generalization of slicing a vector. Slices and SlicesMut iterators are improved. Test over iterators are extended.

CI action is added.

SplitVec::iter() Revision

Necessary Iterator methods are overwritten in order to improve performance:

  • nth is implemented. This also improves the performance of skip. Fixes #75
  • last method is implemented to avoid iterating the entire range.
  • max and min are implemented to reduce over the fragments' default reductions.
  • Similarly, reduction methods fold, reduce, all, any, count are implemented.

In addition, Clone is implemented for the split vector iterator.

Finally, ExactSizeIterator is implemented.

Upgrade PseudoDefault dependency

11 Feb 11:27
face2ca
Compare
Choose a tag to compare
Merge pull request #72 from orxfun/Upgrade-PseudoDefault-dependency

Upgrade PseudoDefault dependency

Dual license

06 Feb 10:20
68a6106
Compare
Choose a tag to compare
Merge pull request #70 from orxfun/dual-license

dual-license

SplitVec implements Collection and CollectionMut

29 Jan 17:44
b529bc3
Compare
Choose a tag to compare
3.12.0

Merge pull request #69 from orxfun/SplitVec-implements-Collection-and…

Documentation and benchmark revision

12 Dec 15:43
cc0a191
Compare
Choose a tag to compare

Documentation had been outdated and it has gone through a major revision. Further, the benchmarks are revised and repeated. Finally, upgraded the dependency to new pinned vec version.

Iterator over range

20 Sep 12:53
6bf57d2
Compare
Choose a tag to compare

iter_over_range method is provided.

At one hand, vec.iter_over_range(a..b) is equivalent to vec.iter().skip(a).take(b - a). However, the latter requires a unnecessary next calls. Since all pinned vectors provide random access to elements, the objective of iter_over_range is to directly jump to a and create an iterator from this point on, and hence, avoiding the unnecessary iterations at the beginning.

Support for Self Referential Collections

16 Sep 13:03
ad9a098
Compare
Choose a tag to compare

The following methods are implemented:

  • index_of_ptr
  • push_get_ptr
  • iter_ptr
  • iter_ptr_rev
  • contains_ptr
  • get_ptr

Crate is converted to no_std

06 Sep 07:30
353794f
Compare
Choose a tag to compare
Merge pull request #57 from orxfun/crate-converted-into-no_std

crate converted into no_std

Reserve initiated capacity

28 Aug 09:19
afb81c9
Compare
Choose a tag to compare
  • ConcurrentSplitVec is simplified by removing the requirement for the atomic number of fragments. This number can be computed by the growth with constant time random access implementations.
  • reserve_maximum_concurrent_capacity_fill_with is implemented.
  • Tests related to reserving maximum capacity are extended.