Skip to content

Commit

Permalink
Merge pull request #6 from LunaticWyrm467/main
Browse files Browse the repository at this point in the history
Update to latest version of Rust Nightly + Dependency Updates
  • Loading branch information
velvia committed Dec 13, 2023
2 parents 215cb16 + 05228d3 commit 81f6f7a
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 18 deletions.
18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "compressed_vec"
version = "0.1.0"
version = "0.1.1"
authors = ["Evan Chan <velvia@gmail.com>"]
edition = "2018"
edition = "2021"
description = "Floating point and integer compressed vector library, SIMD-enabled for fast processing/iteration over compressed representations."
license = "Apache-2.0"
readme = "README.md"
Expand All @@ -13,15 +13,15 @@ keywords = ["compression", "data-structures", "simd", "columnar", "float"]
[dependencies]
memoffset = "0.6.3"
plain = "0.2.3"
scroll = { version = "0.10", features = ["derive"] }
arrayref = "0.3"
enum_dispatch = "0.3.5"
num = "0.3"
smallvec = "1.4"
num_enum = "0.5"
scroll = { version = "0.11", features = ["derive"] }
arrayref = "0.3.7"
enum_dispatch = "0.3.12"
num = "0.4.1"
smallvec = "1.11.2"
num_enum = "0.7.1"

# TODO: put this behind a feature flag
packed_simd_2 = { version = "0.3.4", features = ["into_bits"] }
packed_simd = { version = "0.3.9", features = ["into_bits"] }

[dev-dependencies]
criterion = "0.3"
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2021-04-25
nightly-2023-12-06
2 changes: 1 addition & 1 deletion src/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
///
use core::marker::PhantomData;

use packed_simd_2::u32x8;
use packed_simd::u32x8;
use smallvec::SmallVec;

use crate::section::*;
Expand Down
2 changes: 1 addition & 1 deletion src/histogram.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use packed_simd_2::u64x8;
use packed_simd::u64x8;
use plain::Plain;
use crate::nibblepacking::*;
use crate::sink::Sink;
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ pub mod sink;
// Public crate-level exports for convenience
pub use vector::{VectorU64Appender, VectorU32Appender, VectorF32XorAppender,
VectorReader};
pub use sink::{VecSink, Section256Sink, AddConstSink};
pub use sink::{VecSink, Section256Sink, AddConstSink};
2 changes: 1 addition & 1 deletion src/nibblepack_simd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::error::CodingError;
use crate::nibblepacking::*;
use crate::sink::*;

use packed_simd_2::{shuffle, u64x8, u32x8, m32x8, isizex8, cptrx8};
use packed_simd::{shuffle, u64x8, u32x8, m32x8, isizex8, cptrx8};


const ZEROES_U64X8: u64x8 = u64x8::splat(0);
Expand Down
2 changes: 1 addition & 1 deletion src/nibblepacking.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use packed_simd_2::{u32x8, u64x8, FromCast};
use packed_simd::{u32x8, u64x8, FromCast};

use crate::error::CodingError;
use crate::byteutils::*;
Expand Down
3 changes: 2 additions & 1 deletion src/section.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use std::convert::TryFrom;
use enum_dispatch::enum_dispatch;
use num::{PrimInt, Unsigned, Num, Bounded, Float};
use num_enum::{TryFromPrimitive, TryFromPrimitiveError};
use packed_simd_2::{u32x8, u64x8, f32x8};
use packed_simd::{u32x8, u64x8, f32x8};
use scroll::{ctx, Endian, Pread, Pwrite, LE};


Expand Down Expand Up @@ -815,6 +815,7 @@ impl<'buf, T: VectBase> FixedSection for ConstFixedSect<'buf, T> {
/// 1. If min==max, use a Constant or Null section
/// 2. If min-max range uses less nibbles than otherwise for max, then Delta is a win.
/// 3. Otherwise use standard NibblePackMedFixedSect
#[derive(Clone)]
pub struct AutoEncoder {}

impl<'buf, T> FixedSectionWriter<T> for AutoEncoder
Expand Down
2 changes: 1 addition & 1 deletion src/sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::ops::{Add, BitXor};
use crate::section::VectBase;

use num::{Zero, Unsigned, Float};
use packed_simd_2::{u32x8, u64x8, f32x8, FromCast, FromBits, IntoBits};
use packed_simd::{u32x8, u64x8, f32x8, FromCast, FromBits, IntoBits};

/// An input to a sink. Sinks take a type which represents 8 values of an int, such as [u64; 8].
/// Item type represents the underlying type of each individual item in the 8 item SinkInput.
Expand Down
3 changes: 2 additions & 1 deletion src/vector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ use crate::sink::*;
/// defined here.
/// The major and minor types and the header bytes are compatible with FiloDB BinaryVectors.
#[repr(C)]
#[derive(Debug, PartialEq, Pwrite)]
#[derive(Debug, Clone, PartialEq, Pwrite)]
pub struct BinaryVector {
num_bytes: u32, // Number of bytes in vector following this length
major_type: VectorType, // These should probably be enums no?
Expand Down Expand Up @@ -203,6 +203,7 @@ const GROW_BYTES: usize = 4096;
/// let mut appender = VectorF32XorAppender::try_new(2048).unwrap();
/// let bytes = appender.encode_all(my_vec).unwrap();
/// ```
#[derive(Clone)]
pub struct VectorAppender<T, W>
where T: VectBase + Clone + PartialOrd,
W: FixedSectionWriter<T> {
Expand Down

0 comments on commit 81f6f7a

Please sign in to comment.