Trait Batcher

pub trait Batcher<B, I, O>: Send + Sync
where B: Backend,
{ // Required method fn batch(&self, items: Vec<I>, device: &<B as Backend>::Device) -> O; }
Expand description

A trait for batching items of type I into items of type O.

Required Methods§

fn batch(&self, items: Vec<I>, device: &<B as Backend>::Device) -> O

Batches the given items on the specified device.

§Arguments
  • items - The items to batch.
  • device - The backend device to use.
§Returns

The batched items.

Implementors§