Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
397 changes: 313 additions & 84 deletions Cargo.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ crossbeam-channel = "0.5.15"
dary_heap.workspace = true
humansize = "2.1.3"
paste.workspace = true
pgrx = { version = "=0.16.1", default-features = false, features = ["cshim"] }
pgrx-catalog = "0.3.1"
pgrx = { version = "=0.17.0", default-features = false, features = ["cshim"] }
pgrx-catalog = "0.3.2"
rand.workspace = true
rayon.workspace = true
rusqlite = { version = "0.38.0", features = ["bundled"] }
seq-macro.workspace = true
serde.workspace = true
toml = "0.9.11"
toml = "1.0.0"
validator.workspace = true
wyhash.workspace = true
zerocopy.workspace = true
Expand All @@ -69,14 +69,14 @@ edition = "2024"
bumpalo = "3.19.1"
dary_heap = "0.3.8"
paste = "1.0.15"
rand = "0.9.2"
rand_chacha = "0.9.0"
rand = "0.10.0"
rand_chacha = "0.10.0"
rayon = "1.11.0"
seq-macro = "0.3.6"
serde = { version = "1.0.228", features = ["derive"] }
validator = { version = "0.20.0", features = ["derive"] }
wyhash = "0.6.0"
zerocopy = { version = "0.8.33", features = ["derive"] }
zerocopy = { version = "0.8.39", features = ["derive"] }

[workspace.lints]
# complexity
Expand Down
4 changes: 2 additions & 2 deletions crates/feistel/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ fn is_a_permutation() {
fn sample() {
let n = if cfg!(not(miri)) { 6370_u32 } else { 637_u32 };
let width = (n.ilog2() + 1).next_multiple_of(2);
let key_0 = rand::Rng::random(&mut rand::rng());
let key_1 = rand::Rng::random(&mut rand::rng());
let key_0 = rand::RngExt::random(&mut rand::rng());
let key_1 = rand::RngExt::random(&mut rand::rng());
let secret = move |round: u32, x: u32| {
let buffer = [round.to_le_bytes(), x.to_le_bytes(), key_0, key_1];
wyhash::wyhash(buffer.as_flattened(), 0) as u32
Expand Down
2 changes: 1 addition & 1 deletion crates/k_means/src/flat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::index::{flat_index as prefect_index, flat_index as index};
use crate::square::{Square, SquareMut};
use crate::{KMeans, This};
use rand::rngs::StdRng;
use rand::{Rng, SeedableRng};
use rand::{RngExt, SeedableRng};
use rayon::prelude::*;

struct Flat<'a> {
Expand Down
2 changes: 1 addition & 1 deletion crates/k_means/src/hierarchical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ fn test_modified_webster_method() {

#[test]
fn test_partition() {
fn gen_random_alloc(rows: usize, groups: usize, rng: &mut impl Rng) -> Vec<Vec<usize>> {
fn gen_random_alloc(rows: usize, groups: usize, rng: &mut impl RngExt) -> Vec<Vec<usize>> {
let mut idx: Vec<usize> = (0..rows).collect();
idx.shuffle(rng);
let mut alloc = Vec::with_capacity(groups);
Expand Down
2 changes: 1 addition & 1 deletion crates/k_means/src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

use crate::This;
use crate::square::{Square, SquareMut};
use rand::Rng;
use rand::RngExt;
use rayon::prelude::*;
use simd::Floating;

Expand Down
2 changes: 1 addition & 1 deletion crates/k_means/src/quick.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::KMeans;
use crate::index::flat_index as prefect_index;
use crate::square::{Square, SquareMut};
use rand::rngs::StdRng;
use rand::{Rng, SeedableRng};
use rand::{RngExt, SeedableRng};
use rayon::iter::{IntoParallelIterator, ParallelIterator};

struct Quick {
Expand Down
2 changes: 1 addition & 1 deletion crates/k_means/src/rabitq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::index::{flat_index as prefect_index, rabitq_index as index};
use crate::square::{Square, SquareMut};
use crate::{KMeans, This};
use rand::rngs::StdRng;
use rand::{Rng, SeedableRng};
use rand::{RngExt, SeedableRng};
use rayon::prelude::*;

struct RaBitQ<'a> {
Expand Down
2 changes: 1 addition & 1 deletion crates/rabitq/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use std::error::Error;
use std::path::PathBuf;

fn main() -> Result<(), Box<dyn Error>> {
use rand::{Rng, SeedableRng};
use rand::{RngExt, SeedableRng};
use rand_chacha::ChaCha12Rng;
let mut rng = ChaCha12Rng::from_seed([7; 32]);
let mut bits = (0..262144).map(|_| rng.random::<u8>()).collect::<Vec<_>>();
Expand Down
4 changes: 2 additions & 2 deletions crates/simd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ seq-macro.workspace = true
zerocopy.workspace = true

[dev-dependencies]
criterion = "0.8.1"
criterion = "0.8.2"
rand.workspace = true

[build-dependencies]
cc = "1.2.53"
cc = "1.2.55"
which = "8.0.0"

[lints]
Expand Down
14 changes: 7 additions & 7 deletions crates/simd/benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use criterion::{Criterion, criterion_group, criterion_main};

fn floating_f32_reduce_sum_of_xy(c: &mut Criterion) {
use rand::Rng;
use rand::RngExt;
let mut rng = rand::rng();
let x = (0..4095)
.map(|_| rng.random_range(-1.0..=1.0f32))
Expand Down Expand Up @@ -62,7 +62,7 @@ fn floating_f32_reduce_sum_of_xy(c: &mut Criterion) {
}

fn floating_f32_reduce_sum_of_d2(c: &mut Criterion) {
use rand::Rng;
use rand::RngExt;
let mut rng = rand::rng();
let x = (0..4095)
.map(|_| rng.random_range(-1.0..=1.0f32))
Expand Down Expand Up @@ -107,7 +107,7 @@ fn floating_f32_reduce_sum_of_d2(c: &mut Criterion) {
}

fn floating_f16_reduce_sum_of_xy(c: &mut Criterion) {
use rand::Rng;
use rand::RngExt;
use simd::{F16, f16};
let mut rng = rand::rng();
let x = (0..4095)
Expand Down Expand Up @@ -155,7 +155,7 @@ fn floating_f16_reduce_sum_of_xy(c: &mut Criterion) {
}

fn floating_f16_reduce_sum_of_d2(c: &mut Criterion) {
use rand::Rng;
use rand::RngExt;
use simd::{F16, f16};
let mut rng = rand::rng();
let x = (0..4095)
Expand Down Expand Up @@ -203,7 +203,7 @@ fn floating_f16_reduce_sum_of_d2(c: &mut Criterion) {
}

fn byte_reduce_sum_of_xy(c: &mut Criterion) {
use rand::Rng;
use rand::RngExt;
let mut rng = rand::rng();
let x = (0..4095).map(|_| rng.random::<u8>()).collect::<Vec<_>>();
let y = (0..4095).map(|_| rng.random::<u8>()).collect::<Vec<_>>();
Expand Down Expand Up @@ -248,7 +248,7 @@ fn byte_reduce_sum_of_xy(c: &mut Criterion) {
}

fn byte_reduce_sum_of_x(c: &mut Criterion) {
use rand::Rng;
use rand::RngExt;
let mut rng = rand::rng();
let this = (0..4095).map(|_| rng.random::<u8>()).collect::<Vec<_>>();
#[cfg(target_arch = "x86_64")]
Expand Down Expand Up @@ -278,7 +278,7 @@ fn byte_reduce_sum_of_x(c: &mut Criterion) {
}

fn halfbyte_reduce_sum_of_xy(c: &mut Criterion) {
use rand::Rng;
use rand::RngExt;
let mut rng = rand::rng();
let x = (0..2047).map(|_| rng.random::<u8>()).collect::<Vec<_>>();
let y = (0..2047).map(|_| rng.random::<u8>()).collect::<Vec<_>>();
Expand Down
20 changes: 10 additions & 10 deletions crates/simd/src/byte.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ mod reduce_sum_of_xy {
#[test]
#[cfg_attr(miri, ignore)]
fn reduce_sum_of_xy_v4_avx512vnni_test() {
use rand::Rng;
use rand::RngExt;
if !crate::is_cpu_detected!("v4") || !crate::is_feature_detected!("avx512vnni") {
println!("test {} ... skipped (v4:avx512vnni)", module_path!());
return;
Expand Down Expand Up @@ -120,7 +120,7 @@ mod reduce_sum_of_xy {
#[test]
#[cfg_attr(miri, ignore)]
fn reduce_sum_of_xy_v4_test() {
use rand::Rng;
use rand::RngExt;
if !crate::is_cpu_detected!("v4") {
println!("test {} ... skipped (v4)", module_path!());
return;
Expand Down Expand Up @@ -190,7 +190,7 @@ mod reduce_sum_of_xy {
#[cfg(all(target_arch = "x86_64", test))]
#[test]
fn reduce_sum_of_xy_v3_test() {
use rand::Rng;
use rand::RngExt;
if !crate::is_cpu_detected!("v3") {
println!("test {} ... skipped (v3)", module_path!());
return;
Expand Down Expand Up @@ -260,7 +260,7 @@ mod reduce_sum_of_xy {
#[cfg(all(target_arch = "x86_64", test))]
#[test]
fn reduce_sum_of_xy_v2_test() {
use rand::Rng;
use rand::RngExt;
if !crate::is_cpu_detected!("v2") {
println!("test {} ... skipped (v2)", module_path!());
return;
Expand Down Expand Up @@ -304,7 +304,7 @@ mod reduce_sum_of_xy {
#[test]
#[cfg_attr(miri, ignore)]
fn reduce_sum_of_xy_a2_dotprod_test() {
use rand::Rng;
use rand::RngExt;
if !crate::is_cpu_detected!("a2") || !crate::is_feature_detected!("dotprod") {
println!("test {} ... skipped (a2:dotprod)", module_path!());
return;
Expand Down Expand Up @@ -366,7 +366,7 @@ mod reduce_sum_of_xy {
#[test]
#[cfg_attr(miri, ignore)]
fn reduce_sum_of_xy_a2_test() {
use rand::Rng;
use rand::RngExt;
if !crate::is_cpu_detected!("a2") {
println!("test {} ... skipped (a2)", module_path!());
return;
Expand Down Expand Up @@ -436,7 +436,7 @@ mod reduce_sum_of_x {
#[test]
#[cfg_attr(miri, ignore)]
fn reduce_sum_of_x_v4_test() {
use rand::Rng;
use rand::RngExt;
if !crate::is_cpu_detected!("v4") {
println!("test {} ... skipped (v4)", module_path!());
return;
Expand Down Expand Up @@ -483,7 +483,7 @@ mod reduce_sum_of_x {
#[cfg(all(target_arch = "x86_64", test))]
#[test]
fn reduce_sum_of_x_v3_test() {
use rand::Rng;
use rand::RngExt;
if !crate::is_cpu_detected!("v3") {
println!("test {} ... skipped (v3)", module_path!());
return;
Expand Down Expand Up @@ -530,7 +530,7 @@ mod reduce_sum_of_x {
#[cfg(all(target_arch = "x86_64", test))]
#[test]
fn reduce_sum_of_x_v2_test() {
use rand::Rng;
use rand::RngExt;
if !crate::is_cpu_detected!("v2") {
println!("test {} ... skipped (v2)", module_path!());
return;
Expand Down Expand Up @@ -576,7 +576,7 @@ mod reduce_sum_of_x {
#[test]
#[cfg_attr(miri, ignore)]
fn reduce_sum_of_x_a2_test() {
use rand::Rng;
use rand::RngExt;
if !crate::is_cpu_detected!("a2") {
println!("test {} ... skipped (a2)", module_path!());
return;
Expand Down
2 changes: 1 addition & 1 deletion crates/simd/src/fht.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ mod tests {

#[test]
fn fht() {
use rand::Rng;
use rand::RngExt;
use std::iter::zip;
const EPSILON: f32 = 1e-6;
let mut rng = rand::rng();
Expand Down
Loading
Loading