Skip to content

Releases: orxfun/orx-split-vec

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.

slices iterators require Default

28 Jun 20:02
1694406
Compare
Choose a tag to compare
Merge pull request #41 from orxfun/slices-iterators-require-Default

slices iterators require Default

slices and initialized grow

01 Jun 18:16
f00cff2
Compare
Choose a tag to compare

Two slice returning methods are introduced. These methods are important in performant critical applications which allows to directly benefit from slice optimizations.

  • fn slices(&self, range: R) returns an iterator of slices representing a given range of the vector.
  • fn slices_mut(&mut self, range: R) returns a mutable iterator of slices representing a given range of the vector.

A concurrently safe growth method method grow_and_initialize is introduced. This methods performs capacity growth and length growth at the same time making sure that all elements are initialized with valid values.

Also unsafe get_ptr_mut_and_indices method is implemented.

Test methods are extended accordingly.

`binary_search_by` is implemented

12 May 18:55
c814235
Compare
Choose a tag to compare
  • Default implementations of binary_search and binary_search_by_key are provided.
  • Extended pinned vector tests are used, including binary search test methods.
  • Additional fragment specific binary search tests are added.

IntoIterator is required for PinnedVec

09 May 19:23
76c35ef
Compare
Choose a tag to compare
  • Upgraded the orx-pinned-vec dependency to version 2.9 which requires all pinned vectors to implement IntoIterator.
  • IntoIter is introduced and IntoIterator is implemented for SplitVec.
  • Further, bug in any reduction is fixed.

Efficient Reductions

07 May 15:33
2cca2f7
Compare
Choose a tag to compare

More efficient versions of the following reduction methods are implemented for the iterator.

  • all
  • any
  • fold

`try_reserve_maximum_concurrent_capacity` method

12 Apr 02:55
d245390
Compare
Choose a tag to compare

try_reserve_maximum_concurrent_capacity method is defined which is essential for concurrent wrappers such as PinnedConcurrentCol.