Skip to content

Commit 5698311

Browse files
committed
ALP pipeline kernel
Signed-off-by: Nicholas Gates <[email protected]>
1 parent afc449a commit 5698311

File tree

6 files changed

+14
-13
lines changed

6 files changed

+14
-13
lines changed

encodings/alp/src/alp/operator.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
// SPDX-License-Identifier: Apache-2.0
22
// SPDX-FileCopyrightText: Copyright the Vortex contributors
33

4-
use crate::{match_each_alp_float_ptype, ALPArray, ALPFloat, ALPVTable, Exponents};
54
use std::marker::PhantomData;
5+
66
use vortex_array::pipeline::bit_view::BitView;
77
use vortex_array::pipeline::{
8-
BindContext, Kernel, KernelCtx, PipelineInputs, PipelinedNode, VectorId, N,
8+
BindContext, Kernel, KernelCtx, N, PipelineInputs, PipelinedNode, VectorId,
99
};
1010
use vortex_array::vtable::OperatorVTable;
1111
use vortex_dtype::PTypeDowncastExt;
12-
use vortex_error::{vortex_bail, VortexResult};
12+
use vortex_error::{VortexResult, vortex_bail};
1313
use vortex_vector::{VectorMut, VectorMutOps};
1414

15+
use crate::{ALPArray, ALPFloat, ALPVTable, Exponents, match_each_alp_float_ptype};
16+
1517
impl OperatorVTable<ALPVTable> for ALPVTable {
1618
fn pipeline_node(array: &ALPArray) -> Option<&dyn PipelinedNode> {
1719
Some(array)
@@ -37,7 +39,7 @@ impl PipelinedNode for ALPArray {
3739
Ok(Box::new(UnpatchedALPKernel {
3840
encoded_vector_id,
3941
exponents: self.exponents(),
40-
_phantom: PhantomData::<A>::default(),
42+
_phantom: PhantomData::<A>,
4143
}))
4244
})
4345
}

vortex-array/src/pipeline/driver/allocation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
use vortex_error::{VortexExpect, VortexResult};
77
use vortex_vector::VectorMut;
88

9-
use crate::pipeline::driver::{Node, NodeId};
10-
use crate::pipeline::{VectorId, N};
119
use crate::Array;
10+
use crate::pipeline::driver::{Node, NodeId};
11+
use crate::pipeline::{N, VectorId};
1212

1313
#[derive(Debug)]
1414
pub struct VectorAllocation {

vortex-array/src/pipeline/driver/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ use std::hash::{BuildHasher, Hash, Hasher};
1010

1111
use itertools::Itertools;
1212
use vortex_dtype::DType;
13-
use vortex_error::{vortex_bail, VortexResult};
13+
use vortex_error::{VortexResult, vortex_bail};
1414
use vortex_mask::Mask;
1515
use vortex_utils::aliases::hash_map::{HashMap, RandomState};
1616
use vortex_vector::{Vector, VectorMut, VectorMutOps};
1717

1818
use crate::pipeline::bit_view::{BitView, BitViewExt};
19-
use crate::pipeline::driver::allocation::{allocate_vectors, OutputTarget};
19+
use crate::pipeline::driver::allocation::{OutputTarget, allocate_vectors};
2020
use crate::pipeline::driver::bind::bind_kernels;
2121
use crate::pipeline::driver::toposort::topological_sort;
22-
use crate::pipeline::{Kernel, KernelCtx, PipelineInputs, N};
22+
use crate::pipeline::{Kernel, KernelCtx, N, PipelineInputs};
2323
use crate::{Array, ArrayEq, ArrayHash, ArrayOperator, ArrayRef, ArrayVisitor, Precision};
2424

2525
/// A pipeline driver takes a Vortex array and executes it into a canonical vector.

vortex-array/src/pipeline/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
pub mod bit_view;
55
pub mod driver;
66

7-
use std::ops::Deref;
87
use vortex_error::{VortexExpect, VortexResult};
98
use vortex_vector::{Vector, VectorMut};
109

vortex-vector/src/primitive/vector_mut.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use vortex_error::vortex_panic;
99
use vortex_mask::MaskMut;
1010

1111
use crate::primitive::{PVectorMut, PrimitiveVector};
12-
use crate::{match_each_pvector_mut, VectorMutOps};
12+
use crate::{VectorMutOps, match_each_pvector_mut};
1313

1414
/// A mutable vector of primitive values.
1515
///

vortex-vector/src/vector_mut.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use crate::listview::ListViewVectorMut;
1818
use crate::null::NullVectorMut;
1919
use crate::primitive::PrimitiveVectorMut;
2020
use crate::struct_::StructVectorMut;
21-
use crate::{match_each_vector_mut, match_vector_pair, Vector, VectorMutOps};
21+
use crate::{Vector, VectorMutOps, match_each_vector_mut, match_vector_pair};
2222

2323
/// An enum over all kinds of mutable vectors, which represent fully decompressed (canonical) array
2424
/// data.
@@ -339,9 +339,9 @@ mod tests {
339339
use vortex_dtype::{DecimalDType, Nullability, PType};
340340

341341
use super::*;
342+
use crate::VectorOps;
342343
use crate::decimal::DecimalVectorMut;
343344
use crate::primitive::PVectorMut;
344-
use crate::VectorOps;
345345

346346
#[test]
347347
fn test_with_capacity() {

0 commit comments

Comments
 (0)