Skip to content

Releases: orxfun/orx-split-vec

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.

Concurrent Clone and Fill methods are implemented

27 Aug 02:57
963f38b
Compare
Choose a tag to compare
  • clone_with_len is required for thread safe cloning of data.
  • fill_with, on the other hand, is required for data structures that needs to be gap-free all the time.
  • ConcurrentSplitVec is revised, refactored and simplified.
  • Clone method is updated to make sure that the clone has the same capacity structure fulfilling the growth's requirements.
  • Constant time fragment_capacity_of method is required and implemented for constant time growth strategies.
  • Tests on drop of the concurrent vector are extended.

Index and IndexMut traits are required by PinnedVec

22 Aug 19:52
49a0335
Compare
Choose a tag to compare
3.5.0

Merge pull request #53 from orxfun/Index-and-IndexMut-traits-are-requ…

prevent overflow on 32_bit platforms & sort methods

22 Aug 04:58
048ae69
Compare
Choose a tag to compare
  • Issue leading to overflow in 32-bit platforms is fixed, thanks to @CjiW
  • sort, sort_by, sort_by_key methods are implemented as required PinnedVec methods.

Fill-with initialization on concurrent growth

12 Aug 06:27
5d0b013
Compare
Choose a tag to compare

into_concurrent_filled_with and grow_to_and_fill_with methods are implemented to enable data structures which always have an initialized and valid state.

Support for Concurrency

23 Jul 21:41
0b0359a
Compare
Choose a tag to compare

Support for Concurrency

In version 2, PinnedVec grew with new methods to support concurrent data structures. However, this caused problems since these exposed methods were often unsafe, and further, they were not directly useful for the pinned vector consumers except for concurrent data structures wrapping a pinned vector. Furthermore, they are alien to a regular vector interface that we are used to using.

In version 3, a second trait called ConcurrentPinnedVec is defined. All useful methods related with concurrent programming are moved to this trait. This trait has an associated type defining the underlying pinned vector type. It can be turned into the pinned vector.

Finally, IntoConcurrentPinnedVec trait is defined. A pinned vector implementing this trait can be turned into a ConcurrentPinnedVec. As explained above, it can be converted back to the pinned vector.

This bi-directional transformation allows to wrap pinned vector to have concurrent support, and unwrap whenever concurrency is not required anymore.

An important advantage of this approach is that it allowed to clean up the PinnedVec api from unsafe and alien concurrency related methods.

Also

Tests using clock are revised so that currently pinned vector tests are miri safe.

PseudoDefault is required for all pinned vectors. Note that a FixedVec cannot implement a Default, but as any type, it can implement a pseudo-default, which is also required for concurrent wrappers.