pub struct TensorBatchProcessor { /* private fields */ }Expand description
Batch processor for tensor blocks
Implementations§
Source§impl TensorBatchProcessor
impl TensorBatchProcessor
Sourcepub fn new(hash_algo: Code) -> Self
pub fn new(hash_algo: Code) -> Self
Create a new batch processor with the specified hash algorithm
Sourcepub fn process_batch(&self, tensors: &[TensorBlock]) -> Result<Vec<String>>
pub fn process_batch(&self, tensors: &[TensorBlock]) -> Result<Vec<String>>
Process multiple tensors and generate CIDs with hardware acceleration
Sourcepub fn to_arrow_batch(
&self,
tensors: Vec<(&str, &TensorBlock)>,
) -> Result<RecordBatch>
pub fn to_arrow_batch( &self, tensors: Vec<(&str, &TensorBlock)>, ) -> Result<RecordBatch>
Convert multiple tensors to an Arrow RecordBatch
Sourcepub fn from_arrow_batch(
&self,
batch: &RecordBatch,
shapes: Vec<TensorShape>,
) -> Result<Vec<TensorBlock>>
pub fn from_arrow_batch( &self, batch: &RecordBatch, shapes: Vec<TensorShape>, ) -> Result<Vec<TensorBlock>>
Process Arrow RecordBatch and convert to tensor blocks
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TensorBatchProcessor
impl RefUnwindSafe for TensorBatchProcessor
impl Send for TensorBatchProcessor
impl Sync for TensorBatchProcessor
impl Unpin for TensorBatchProcessor
impl UnwindSafe for TensorBatchProcessor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more