#alignment #box #vec #allocation #slice

no-std aligned-vec

Aligned vector and box containers

8 releases (4 breaking)

0.5.0 Aug 21, 2022
0.4.2 Jul 29, 2022
0.3.2 Jul 25, 2022
0.2.0 Jul 24, 2022
0.1.0 Jul 24, 2022

#1026 in Parser implementations

Download history 1089/week @ 2023-12-04 1004/week @ 2023-12-11 887/week @ 2023-12-18 682/week @ 2023-12-25 1011/week @ 2024-01-01 1644/week @ 2024-01-08 1734/week @ 2024-01-15 1486/week @ 2024-01-22 1894/week @ 2024-01-29 1342/week @ 2024-02-05 1455/week @ 2024-02-12 1750/week @ 2024-02-19 1985/week @ 2024-02-26 2165/week @ 2024-03-04 16677/week @ 2024-03-11 25803/week @ 2024-03-18

46,754 downloads per month
Used in 71 crates (15 directly)

MIT license

40KB
1K SLoC

aligned-vec

This crate provides the AVec<T> and ABox<T> types, which are intended to have a similar API to Vec<T> and Box<T>, but align the data they contain to a runtime alignment value.

This is useful for situations where the alignment of the data matters, such as when working with numerical data that can get performance benefits from being aligned to a SIMD-compatible memory address.

Features

  • std (default feature): Links this crate to the std-crate instead of the core-crate.
  • serde: Implements serialization and deserialization features for ABox and AVec.

lib.rs:

aligned-vec

This crate provides the AVec<T> and ABox<T> types, which are intended to have a similar API to Vec<T> and Box<T>, but align the data they contain to a runtime alignment value.

This is useful for situations where the alignment of the data matters, such as when working with numerical data that can get performance benefits from being aligned to a SIMD-compatible memory address.

Features

  • std (default feature): Links this crate to the std-crate instead of the core-crate.
  • serde: Implements serialization and deserialization features for ABox and AVec.

Dependencies

~175KB