pub struct TransactionPrimitive<B>where
B: Backend,{
pub read_floats: Vec<<B as BackendTypes>::FloatTensorPrimitive>,
pub read_qfloats: Vec<<B as BackendTypes>::QuantizedTensorPrimitive>,
pub read_ints: Vec<<B as BackendTypes>::IntTensorPrimitive>,
pub read_bools: Vec<<B as BackendTypes>::BoolTensorPrimitive>,
/* private fields */
}Expand description
Contains all tensor primitives that are going to be read.
Fields§
§read_floats: Vec<<B as BackendTypes>::FloatTensorPrimitive>Float tensors.
read_qfloats: Vec<<B as BackendTypes>::QuantizedTensorPrimitive>Quantized tensors.
read_ints: Vec<<B as BackendTypes>::IntTensorPrimitive>Int tensors.
read_bools: Vec<<B as BackendTypes>::BoolTensorPrimitive>Bool tensors.
Implementations§
Source§impl<B> TransactionPrimitive<B>where
B: Backend,
impl<B> TransactionPrimitive<B>where
B: Backend,
Sourcepub fn new(
read_floats: Vec<<B as BackendTypes>::FloatTensorPrimitive>,
read_qfloats: Vec<<B as BackendTypes>::QuantizedTensorPrimitive>,
read_ints: Vec<<B as BackendTypes>::IntTensorPrimitive>,
read_bools: Vec<<B as BackendTypes>::BoolTensorPrimitive>,
) -> TransactionPrimitive<B>
pub fn new( read_floats: Vec<<B as BackendTypes>::FloatTensorPrimitive>, read_qfloats: Vec<<B as BackendTypes>::QuantizedTensorPrimitive>, read_ints: Vec<<B as BackendTypes>::IntTensorPrimitive>, read_bools: Vec<<B as BackendTypes>::BoolTensorPrimitive>, ) -> TransactionPrimitive<B>
Creates a new transaction.
Sourcepub async fn execute_async(self) -> Result<Vec<TensorData>, ExecutionError>
pub async fn execute_async(self) -> Result<Vec<TensorData>, ExecutionError>
Executes the transaction asynchronously and returns the data in the same order in which they were registered.
Trait Implementations§
Auto Trait Implementations§
impl<B> Freeze for TransactionPrimitive<B>where
Vec<<B as BackendTypes>::FloatTensorPrimitive>: Freeze,
Vec<<B as BackendTypes>::QuantizedTensorPrimitive>: Freeze,
Vec<<B as BackendTypes>::IntTensorPrimitive>: Freeze,
Vec<<B as BackendTypes>::BoolTensorPrimitive>: Freeze,
impl<B> RefUnwindSafe for TransactionPrimitive<B>where
Vec<<B as BackendTypes>::FloatTensorPrimitive>: RefUnwindSafe,
Vec<<B as BackendTypes>::QuantizedTensorPrimitive>: RefUnwindSafe,
Vec<<B as BackendTypes>::IntTensorPrimitive>: RefUnwindSafe,
Vec<<B as BackendTypes>::BoolTensorPrimitive>: RefUnwindSafe,
impl<B> Send for TransactionPrimitive<B>where
Vec<<B as BackendTypes>::FloatTensorPrimitive>: Send,
Vec<<B as BackendTypes>::QuantizedTensorPrimitive>: Send,
Vec<<B as BackendTypes>::IntTensorPrimitive>: Send,
Vec<<B as BackendTypes>::BoolTensorPrimitive>: Send,
impl<B> Sync for TransactionPrimitive<B>where
Vec<<B as BackendTypes>::FloatTensorPrimitive>: Sync,
Vec<<B as BackendTypes>::QuantizedTensorPrimitive>: Sync,
Vec<<B as BackendTypes>::IntTensorPrimitive>: Sync,
Vec<<B as BackendTypes>::BoolTensorPrimitive>: Sync,
impl<B> Unpin for TransactionPrimitive<B>where
Vec<<B as BackendTypes>::FloatTensorPrimitive>: Unpin,
Vec<<B as BackendTypes>::QuantizedTensorPrimitive>: Unpin,
Vec<<B as BackendTypes>::IntTensorPrimitive>: Unpin,
Vec<<B as BackendTypes>::BoolTensorPrimitive>: Unpin,
impl<B> UnsafeUnpin for TransactionPrimitive<B>where
Vec<<B as BackendTypes>::FloatTensorPrimitive>: UnsafeUnpin,
Vec<<B as BackendTypes>::QuantizedTensorPrimitive>: UnsafeUnpin,
Vec<<B as BackendTypes>::IntTensorPrimitive>: UnsafeUnpin,
Vec<<B as BackendTypes>::BoolTensorPrimitive>: UnsafeUnpin,
impl<B> UnwindSafe for TransactionPrimitive<B>where
Vec<<B as BackendTypes>::FloatTensorPrimitive>: UnwindSafe,
Vec<<B as BackendTypes>::QuantizedTensorPrimitive>: UnwindSafe,
Vec<<B as BackendTypes>::IntTensorPrimitive>: UnwindSafe,
Vec<<B as BackendTypes>::BoolTensorPrimitive>: UnwindSafe,
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