pub struct BatchProcessor { /* private fields */ }
Expand description
Batch processor for efficient bulk operations
Implementations§
Source§impl BatchProcessor
impl BatchProcessor
pub fn new( gpu_backend: Option<Arc<dyn GpuBackendTrait>>, memory_manager: Arc<dyn MemoryManagerTrait>, batch_size: usize, ) -> Self
Sourcepub fn process_batch<T>(
&self,
operations: Vec<NeuralOperation<T>>,
inputs: Vec<Vec<T>>,
) -> NeuralResult<Vec<Vec<T>>>
pub fn process_batch<T>( &self, operations: Vec<NeuralOperation<T>>, inputs: Vec<Vec<T>>, ) -> NeuralResult<Vec<Vec<T>>>
Process a batch of operations efficiently
Auto Trait Implementations§
impl Freeze for BatchProcessor
impl !RefUnwindSafe for BatchProcessor
impl Send for BatchProcessor
impl Sync for BatchProcessor
impl Unpin for BatchProcessor
impl !UnwindSafe for BatchProcessor
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