Skip to content

Commit 6912f0f

Browse files
committed
rebase
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
1 parent 68c1008 commit 6912f0f

File tree

2 files changed

+122
-4
lines changed

2 files changed

+122
-4
lines changed

vortex-tensor/public-api.lock

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,119 @@
11
pub mod vortex_tensor
22

3+
pub mod vortex_tensor::encodings
4+
5+
pub mod vortex_tensor::encodings::norm
6+
7+
pub struct vortex_tensor::encodings::norm::NormVector
8+
9+
impl core::clone::Clone for vortex_tensor::encodings::norm::NormVector
10+
11+
pub fn vortex_tensor::encodings::norm::NormVector::clone(&self) -> vortex_tensor::encodings::norm::NormVector
12+
13+
impl core::fmt::Debug for vortex_tensor::encodings::norm::NormVector
14+
15+
pub fn vortex_tensor::encodings::norm::NormVector::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
16+
17+
impl vortex_array::vtable::VTable for vortex_tensor::encodings::norm::NormVector
18+
19+
pub type vortex_tensor::encodings::norm::NormVector::Array = vortex_tensor::encodings::norm::NormVectorArray
20+
21+
pub type vortex_tensor::encodings::norm::NormVector::Metadata = vortex_array::metadata::EmptyMetadata
22+
23+
pub type vortex_tensor::encodings::norm::NormVector::OperationsVTable = vortex_tensor::encodings::norm::NormVector
24+
25+
pub type vortex_tensor::encodings::norm::NormVector::ValidityVTable = vortex_array::vtable::validity::ValidityVTableFromChild
26+
27+
pub fn vortex_tensor::encodings::norm::NormVector::array_eq(array: &vortex_tensor::encodings::norm::NormVectorArray, other: &vortex_tensor::encodings::norm::NormVectorArray, precision: vortex_array::hash::Precision) -> bool
28+
29+
pub fn vortex_tensor::encodings::norm::NormVector::array_hash<H: core::hash::Hasher>(array: &vortex_tensor::encodings::norm::NormVectorArray, state: &mut H, precision: vortex_array::hash::Precision)
30+
31+
pub fn vortex_tensor::encodings::norm::NormVector::buffer(_array: &vortex_tensor::encodings::norm::NormVectorArray, idx: usize) -> vortex_array::buffer::BufferHandle
32+
33+
pub fn vortex_tensor::encodings::norm::NormVector::buffer_name(_array: &vortex_tensor::encodings::norm::NormVectorArray, idx: usize) -> core::option::Option<alloc::string::String>
34+
35+
pub fn vortex_tensor::encodings::norm::NormVector::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult<vortex_tensor::encodings::norm::NormVectorArray>
36+
37+
pub fn vortex_tensor::encodings::norm::NormVector::child(array: &vortex_tensor::encodings::norm::NormVectorArray, idx: usize) -> vortex_array::array::ArrayRef
38+
39+
pub fn vortex_tensor::encodings::norm::NormVector::child_name(_array: &vortex_tensor::encodings::norm::NormVectorArray, idx: usize) -> alloc::string::String
40+
41+
pub fn vortex_tensor::encodings::norm::NormVector::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult<Self::Metadata>
42+
43+
pub fn vortex_tensor::encodings::norm::NormVector::dtype(array: &vortex_tensor::encodings::norm::NormVectorArray) -> &vortex_array::dtype::DType
44+
45+
pub fn vortex_tensor::encodings::norm::NormVector::execute(array: alloc::sync::Arc<vortex_tensor::encodings::norm::NormVectorArray>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::executor::ExecutionResult>
46+
47+
pub fn vortex_tensor::encodings::norm::NormVector::id(&self) -> vortex_array::vtable::dyn_::ArrayId
48+
49+
pub fn vortex_tensor::encodings::norm::NormVector::len(array: &vortex_tensor::encodings::norm::NormVectorArray) -> usize
50+
51+
pub fn vortex_tensor::encodings::norm::NormVector::metadata(_array: &vortex_tensor::encodings::norm::NormVectorArray) -> vortex_error::VortexResult<Self::Metadata>
52+
53+
pub fn vortex_tensor::encodings::norm::NormVector::nbuffers(_array: &vortex_tensor::encodings::norm::NormVectorArray) -> usize
54+
55+
pub fn vortex_tensor::encodings::norm::NormVector::nchildren(_array: &vortex_tensor::encodings::norm::NormVectorArray) -> usize
56+
57+
pub fn vortex_tensor::encodings::norm::NormVector::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult<core::option::Option<alloc::vec::Vec<u8>>>
58+
59+
pub fn vortex_tensor::encodings::norm::NormVector::stats(array: &vortex_tensor::encodings::norm::NormVectorArray) -> vortex_array::stats::array::StatsSetRef<'_>
60+
61+
pub fn vortex_tensor::encodings::norm::NormVector::vtable(_array: &Self::Array) -> &Self
62+
63+
pub fn vortex_tensor::encodings::norm::NormVector::with_children(array: &mut vortex_tensor::encodings::norm::NormVectorArray, children: alloc::vec::Vec<vortex_array::array::ArrayRef>) -> vortex_error::VortexResult<()>
64+
65+
impl vortex_array::vtable::operations::OperationsVTable<vortex_tensor::encodings::norm::NormVector> for vortex_tensor::encodings::norm::NormVector
66+
67+
pub fn vortex_tensor::encodings::norm::NormVector::scalar_at(array: &vortex_tensor::encodings::norm::NormVectorArray, index: usize) -> vortex_error::VortexResult<vortex_array::scalar::Scalar>
68+
69+
impl vortex_array::vtable::validity::ValidityChild<vortex_tensor::encodings::norm::NormVector> for vortex_tensor::encodings::norm::NormVector
70+
71+
pub fn vortex_tensor::encodings::norm::NormVector::validity_child(array: &vortex_tensor::encodings::norm::NormVectorArray) -> &vortex_array::array::ArrayRef
72+
73+
pub struct vortex_tensor::encodings::norm::NormVectorArray
74+
75+
impl vortex_tensor::encodings::norm::NormVectorArray
76+
77+
pub fn vortex_tensor::encodings::norm::NormVectorArray::compress(vector_array: vortex_array::array::ArrayRef) -> vortex_error::VortexResult<Self>
78+
79+
pub fn vortex_tensor::encodings::norm::NormVectorArray::decompress(&self, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::array::ArrayRef>
80+
81+
pub fn vortex_tensor::encodings::norm::NormVectorArray::norms(&self) -> &vortex_array::array::ArrayRef
82+
83+
pub fn vortex_tensor::encodings::norm::NormVectorArray::try_new(vector_array: vortex_array::array::ArrayRef, norms: vortex_array::array::ArrayRef) -> vortex_error::VortexResult<Self>
84+
85+
pub fn vortex_tensor::encodings::norm::NormVectorArray::vector_array(&self) -> &vortex_array::array::ArrayRef
86+
87+
impl vortex_tensor::encodings::norm::NormVectorArray
88+
89+
pub fn vortex_tensor::encodings::norm::NormVectorArray::to_array(&self) -> vortex_array::array::ArrayRef
90+
91+
impl core::clone::Clone for vortex_tensor::encodings::norm::NormVectorArray
92+
93+
pub fn vortex_tensor::encodings::norm::NormVectorArray::clone(&self) -> vortex_tensor::encodings::norm::NormVectorArray
94+
95+
impl core::convert::AsRef<dyn vortex_array::array::DynArray> for vortex_tensor::encodings::norm::NormVectorArray
96+
97+
pub fn vortex_tensor::encodings::norm::NormVectorArray::as_ref(&self) -> &dyn vortex_array::array::DynArray
98+
99+
impl core::convert::From<vortex_tensor::encodings::norm::NormVectorArray> for vortex_array::array::ArrayRef
100+
101+
pub fn vortex_array::array::ArrayRef::from(value: vortex_tensor::encodings::norm::NormVectorArray) -> vortex_array::array::ArrayRef
102+
103+
impl core::fmt::Debug for vortex_tensor::encodings::norm::NormVectorArray
104+
105+
pub fn vortex_tensor::encodings::norm::NormVectorArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
106+
107+
impl core::ops::deref::Deref for vortex_tensor::encodings::norm::NormVectorArray
108+
109+
pub type vortex_tensor::encodings::norm::NormVectorArray::Target = dyn vortex_array::array::DynArray
110+
111+
pub fn vortex_tensor::encodings::norm::NormVectorArray::deref(&self) -> &Self::Target
112+
113+
impl vortex_array::array::IntoArray for vortex_tensor::encodings::norm::NormVectorArray
114+
115+
pub fn vortex_tensor::encodings::norm::NormVectorArray::into_array(self) -> vortex_array::array::ArrayRef
116+
3117
pub mod vortex_tensor::fixed_shape
4118

5119
pub struct vortex_tensor::fixed_shape::FixedShapeTensor

vortex-tensor/src/encodings/norm/vtable/mod.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
// SPDX-FileCopyrightText: Copyright the Vortex contributors
33

44
use std::hash::Hasher;
5+
use std::sync::Arc;
56

67
use vortex::array::ArrayEq;
78
use vortex::array::ArrayHash;
89
use vortex::array::ArrayRef;
910
use vortex::array::EmptyMetadata;
1011
use vortex::array::ExecutionCtx;
11-
use vortex::array::ExecutionStep;
12+
use vortex::array::ExecutionResult;
1213
use vortex::array::Precision;
1314
use vortex::array::buffer::BufferHandle;
1415
use vortex::array::serde::ArrayChildren;
@@ -33,7 +34,7 @@ mod validity;
3334

3435
vtable!(NormVector);
3536

36-
#[derive(Debug)]
37+
#[derive(Debug, Clone)]
3738
pub struct NormVector;
3839

3940
impl VTable for NormVector {
@@ -165,7 +166,10 @@ impl VTable for NormVector {
165166
Ok(())
166167
}
167168

168-
fn execute(array: &NormVectorArray, ctx: &mut ExecutionCtx) -> VortexResult<ExecutionStep> {
169-
Ok(ExecutionStep::Done(array.decompress(ctx)?))
169+
fn execute(
170+
array: Arc<NormVectorArray>,
171+
ctx: &mut ExecutionCtx,
172+
) -> VortexResult<ExecutionResult> {
173+
Ok(ExecutionResult::done(array.decompress(ctx)?))
170174
}
171175
}

0 commit comments

Comments
 (0)