Skip to content

Commit 02308ae

Browse files
committed
Remove operators
Signed-off-by: Nicholas Gates <[email protected]>
1 parent 1667614 commit 02308ae

File tree

30 files changed

+62
-654
lines changed

30 files changed

+62
-654
lines changed

encodings/alp/benches/alp_compress.rs

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -100,36 +100,6 @@ fn decompress_alp<T: ALPFloat + NativePType>(bencher: Bencher, args: (usize, f64
100100
.bench_values(decompress_into_array);
101101
}
102102

103-
#[divan::bench(types = [f32, f64], args = BENCH_ARGS)]
104-
fn decompress_alp_vector<T: ALPFloat + NativePType>(bencher: Bencher, args: (usize, f64, f64)) {
105-
let (n, fraction_patch, fraction_valid) = args;
106-
let mut rng = StdRng::seed_from_u64(0);
107-
let mut values = buffer![T::from(1.234).unwrap(); n].into_mut();
108-
if fraction_patch > 0.0 {
109-
for index in 0..values.len() {
110-
if rng.random_bool(fraction_patch) {
111-
values[index] = T::from(1000.0).unwrap()
112-
}
113-
}
114-
}
115-
let validity = if fraction_valid < 1.0 {
116-
Validity::from_iter((0..values.len()).map(|_| rng.random_bool(fraction_valid)))
117-
} else {
118-
Validity::NonNullable
119-
};
120-
let values = values.freeze();
121-
bencher
122-
.with_inputs(|| {
123-
let alp_array = alp_encode(
124-
&PrimitiveArray::new(Buffer::copy_from(&values), validity.clone()),
125-
None,
126-
)
127-
.unwrap();
128-
alp_array.to_array()
129-
})
130-
.bench_refs(|array| array.execute().unwrap());
131-
}
132-
133103
#[divan::bench(types = [f32, f64], args = [10_000, 100_000])]
134104
fn compress_rd<T: ALPRDFloat>(bencher: Bencher, n: usize) {
135105
let primitive = PrimitiveArray::new(buffer![T::from(1.23).unwrap(); n], Validity::NonNullable);

encodings/alp/src/alp/array.rs

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -140,17 +140,17 @@ impl VTable for ALPVTable {
140140
)
141141
}
142142

143-
fn execute(array: &ALPArray, ctx: &mut ExecutionCtx) -> VortexResult<Vector> {
144-
let encoded_vector = array.encoded().execute(ctx)?;
143+
fn batch_execute(array: &ALPArray, ctx: &mut ExecutionCtx) -> VortexResult<Vector> {
144+
let encoded_vector = array.encoded().batch_execute(ctx)?;
145145

146146
let patches_vectors = if let Some(patches) = array.patches() {
147147
Some((
148-
patches.indices().execute(ctx)?,
149-
patches.values().execute(ctx)?,
148+
patches.indices().batch_execute(ctx)?,
149+
patches.values().batch_execute(ctx)?,
150150
patches
151151
.chunk_offsets()
152152
.as_ref()
153-
.map(|co| co.execute(ctx))
153+
.map(|co| co.batch_execute(ctx))
154154
.transpose()?,
155155
))
156156
} else {
@@ -464,7 +464,7 @@ mod tests {
464464

465465
use super::*;
466466

467-
static SESSION: LazyLock<VortexSession> = LazyLock::new(|| VortexSession::empty());
467+
static SESSION: LazyLock<VortexSession> = LazyLock::new(VortexSession::empty);
468468

469469
#[rstest]
470470
#[case(0)]
@@ -480,10 +480,7 @@ mod tests {
480480
let values = PrimitiveArray::from_iter((0..size).map(|i| i as f32));
481481
let encoded = alp_encode(&values, None).unwrap();
482482

483-
let result_vector = encoded
484-
.to_array()
485-
.execute(&mut ExecutionCtx::new(SESSION.clone()))
486-
.unwrap();
483+
let result_vector = encoded.to_array().execute(&SESSION).unwrap();
487484
// Compare against the traditional array-based decompress path
488485
let expected = decompress_into_array(encoded);
489486

@@ -507,10 +504,7 @@ mod tests {
507504
let values = PrimitiveArray::from_iter((0..size).map(|i| i as f64));
508505
let encoded = alp_encode(&values, None).unwrap();
509506

510-
let result_vector = encoded
511-
.to_array()
512-
.execute(&mut ExecutionCtx::new(SESSION.clone()))
513-
.unwrap();
507+
let result_vector = encoded.to_array().execute(&SESSION).unwrap();
514508
// Compare against the traditional array-based decompress path
515509
let expected = decompress_into_array(encoded);
516510

@@ -540,10 +534,7 @@ mod tests {
540534
let encoded = alp_encode(&array, None).unwrap();
541535
assert!(encoded.patches().unwrap().array_len() > 0);
542536

543-
let result_vector = encoded
544-
.to_array()
545-
.execute(&mut ExecutionCtx::new(SESSION.clone()))
546-
.unwrap();
537+
let result_vector = encoded.to_array().execute(&SESSION).unwrap();
547538
// Compare against the traditional array-based decompress path
548539
let expected = decompress_into_array(encoded);
549540

@@ -571,10 +562,7 @@ mod tests {
571562
let array = PrimitiveArray::from_option_iter(values);
572563
let encoded = alp_encode(&array, None).unwrap();
573564

574-
let result_vector = encoded
575-
.to_array()
576-
.execute(&mut ExecutionCtx::new(SESSION.clone()))
577-
.unwrap();
565+
let result_vector = encoded.to_array().execute(&SESSION).unwrap();
578566
// Compare against the traditional array-based decompress path
579567
let expected = decompress_into_array(encoded);
580568

@@ -613,10 +601,7 @@ mod tests {
613601
let encoded = alp_encode(&array, None).unwrap();
614602
assert!(encoded.patches().unwrap().array_len() > 0);
615603

616-
let result_vector = encoded
617-
.to_array()
618-
.execute(&mut ExecutionCtx::new(SESSION.clone()))
619-
.unwrap();
604+
let result_vector = encoded.to_array().execute(&SESSION).unwrap();
620605
// Compare against the traditional array-based decompress path
621606
let expected = decompress_into_array(encoded);
622607

@@ -658,9 +643,7 @@ mod tests {
658643
let slice_len = slice_end - slice_start;
659644
let sliced_encoded = encoded.slice(slice_start..slice_end);
660645

661-
let result_vector = sliced_encoded
662-
.execute(&mut ExecutionCtx::new(SESSION.clone()))
663-
.unwrap();
646+
let result_vector = sliced_encoded.execute(&SESSION).unwrap();
664647
let result_primitive = result_vector.into_primitive().into_f64();
665648

666649
for idx in 0..slice_len {

encodings/fastlanes/Cargo.toml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -68,28 +68,3 @@ required-features = ["test-harness"]
6868
name = "compute_between"
6969
harness = false
7070
required-features = ["test-harness"]
71-
72-
[[bench]]
73-
name = "pipeline_bitpacking"
74-
harness = false
75-
test = false
76-
77-
[[bench]]
78-
name = "pipeline_for"
79-
harness = false
80-
test = false
81-
82-
[[bench]]
83-
name = "pipeline_bitpacking_compare_scalar"
84-
harness = false
85-
test = false
86-
87-
[[bench]]
88-
name = "pipeline_rle"
89-
harness = false
90-
test = false
91-
92-
[[bench]]
93-
name = "pipeline_v2_bitpacking_basic"
94-
harness = false
95-
test = false

encodings/fastlanes/benches/pipeline_bitpacking.rs

Lines changed: 0 additions & 92 deletions
This file was deleted.

0 commit comments

Comments
 (0)