pub struct TransactionPrimitive<B: Backend> {
pub read_floats: Vec<FloatTensor<B>>,
pub read_qfloats: Vec<QuantizedTensor<B>>,
pub read_ints: Vec<IntTensor<B>>,
pub read_bools: Vec<BoolTensor<B>>,
/* private fields */
}Expand description
Contains all tensor primitives that are going to be read.
Fields§
§read_floats: Vec<FloatTensor<B>>Float tensors.
read_qfloats: Vec<QuantizedTensor<B>>Quantized tensors.
read_ints: Vec<IntTensor<B>>Int tensors.
read_bools: Vec<BoolTensor<B>>Bool tensors.
Implementations§
Source§impl<B: Backend> TransactionPrimitive<B>
impl<B: Backend> TransactionPrimitive<B>
Sourcepub fn new(
read_floats: Vec<FloatTensor<B>>,
read_qfloats: Vec<QuantizedTensor<B>>,
read_ints: Vec<IntTensor<B>>,
read_bools: Vec<BoolTensor<B>>,
) -> Self
pub fn new( read_floats: Vec<FloatTensor<B>>, read_qfloats: Vec<QuantizedTensor<B>>, read_ints: Vec<IntTensor<B>>, read_bools: Vec<BoolTensor<B>>, ) -> Self
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>
impl<B> RefUnwindSafe for TransactionPrimitive<B>where
<B as Backend>::FloatTensorPrimitive: RefUnwindSafe,
<B as Backend>::QuantizedTensorPrimitive: RefUnwindSafe,
<B as Backend>::IntTensorPrimitive: RefUnwindSafe,
<B as Backend>::BoolTensorPrimitive: RefUnwindSafe,
impl<B> Send for TransactionPrimitive<B>
impl<B> Sync for TransactionPrimitive<B>
impl<B> Unpin for TransactionPrimitive<B>where
<B as Backend>::FloatTensorPrimitive: Unpin,
<B as Backend>::QuantizedTensorPrimitive: Unpin,
<B as Backend>::IntTensorPrimitive: Unpin,
<B as Backend>::BoolTensorPrimitive: Unpin,
impl<B> UnwindSafe for TransactionPrimitive<B>where
<B as Backend>::FloatTensorPrimitive: UnwindSafe,
<B as Backend>::QuantizedTensorPrimitive: UnwindSafe,
<B as Backend>::IntTensorPrimitive: UnwindSafe,
<B as Backend>::BoolTensorPrimitive: UnwindSafe,
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more