pub struct Tensor {
pub type_: Type,
pub shape: Vec<TensorDim>,
pub strides: Option<Vec<i64>>,
pub data: Buffer,
}Expand description
The table Tensor in the namespace org.apache.arrow.flatbuf
Generated from these locations:
- Table
Tensorin the fileTensor.fbs:38
Fields§
§type_: TypeThe type of data contained in a value cell. Currently only fixed-width value types are supported, no strings or nested types
shape: Vec<TensorDim>The dimensions of the tensor, optionally named
strides: Option<Vec<i64>>Non-negative byte offsets to advance one value cell along each dimension If omitted, default to row-major order (C-like).
data: BufferThe location and size of the tensor’s data
Implementations§
Source§impl Tensor
impl Tensor
Sourcepub fn builder() -> TensorBuilder<()>
pub fn builder() -> TensorBuilder<()>
Creates a TensorBuilder for serializing an instance of this table.
pub fn create( builder: &mut Builder, field_type_: impl WriteAsUnion<Type>, field_shape: impl WriteAs<Offset<[Offset<TensorDim>]>>, field_strides: impl WriteAsOptional<Offset<[i64]>>, field_data: impl WriteAs<Buffer>, ) -> Offset<Self>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Tensor
impl<'de> Deserialize<'de> for Tensor
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Tensor
impl Ord for Tensor
Source§impl PartialOrd for Tensor
impl PartialOrd for Tensor
impl Eq for Tensor
impl StructuralPartialEq for Tensor
impl VectorWrite<Offset<Tensor>> for Tensor
§Safety
The planus compiler generates implementations that initialize
the bytes in write_values.
impl WriteAs<Offset<Tensor>> for Tensor
impl WriteAsOffset<Tensor> for Tensor
impl<T0: WriteAsUnion<Type>, T1: WriteAs<Offset<[Offset<TensorDim>]>>, T2: WriteAsOptional<Offset<[i64]>>, T3: WriteAs<Buffer>> WriteAsOffset<Tensor> for TensorBuilder<(T0, T1, T2, T3)>
impl WriteAsOptional<Offset<Tensor>> for Tensor
Auto Trait Implementations§
impl Freeze for Tensor
impl RefUnwindSafe for Tensor
impl Send for Tensor
impl Sync for Tensor
impl Unpin for Tensor
impl UnwindSafe for Tensor
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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