Struct tc_tensor::DenseTensor
source · pub struct DenseTensor<FD, FS, D, T, B> { /* private fields */ }
Implementations§
source§impl<FD, FS, D, T, B> DenseTensor<FD, FS, D, T, B>
impl<FD, FS, D, T, B> DenseTensor<FD, FS, D, T, B>
sourcepub fn into_inner(self) -> B
pub fn into_inner(self) -> B
Consume this DenseTensor
handle and return its underlying DenseAccessor
source§impl<FD, FS, D, T, B> DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
impl<FD, FS, D, T, B> DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
sourcepub fn schema(&self) -> Schema
pub fn schema(&self) -> Schema
Access the schema of this DenseTensor
source§impl<FD, FS, D, T> DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
impl<FD, FS, D, T> DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
source§impl<FD, FS, D, T> DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>where
FD: File<Key = u64, Block = Array, Inner = D::Inner> + TryFrom<D::Store, Error = TCError>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
D::Write: DirCreateFile<FD>,
D::Store: From<FD>,
impl<FD, FS, D, T> DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>where
FD: File<Key = u64, Block = Array, Inner = D::Inner> + TryFrom<D::Store, Error = TCError>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
D::Write: DirCreateFile<FD>,
D::Store: From<FD>,
sourcepub async fn tile(
txn: T,
tensor: DenseTensor<FD, FS, D, T, DenseAccessor<FD, FS, D, T>>,
multiples: Vec<u64>
) -> TCResult<Self>
pub async fn tile(
txn: T,
tensor: DenseTensor<FD, FS, D, T, DenseAccessor<FD, FS, D, T>>,
multiples: Vec<u64>
) -> TCResult<Self>
Create a new DenseTensor
by tiling this one according to the given multiples
.
Trait Implementations§
source§impl<FD: Clone, FS: Clone, D: Clone, T: Clone, B: Clone> Clone for DenseTensor<FD, FS, D, T, B>
impl<FD: Clone, FS: Clone, D: Clone, T: Clone, B: Clone> Clone for DenseTensor<FD, FS, D, T, B>
source§fn clone(&self) -> DenseTensor<FD, FS, D, T, B>
fn clone(&self) -> DenseTensor<FD, FS, D, T, B>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<FD, FS, D, T, B> CopyFrom<D, DenseTensor<FD, FS, D, T, B>> for DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>where
FD: File<Key = u64, Block = Array, Inner = D::Inner> + TryFrom<D::Store, Error = TCError>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Store: From<FD>,
impl<FD, FS, D, T, B> CopyFrom<D, DenseTensor<FD, FS, D, T, B>> for DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>where
FD: File<Key = u64, Block = Array, Inner = D::Inner> + TryFrom<D::Store, Error = TCError>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Store: From<FD>,
source§impl<FD, FS, D, T, B> Display for DenseTensor<FD, FS, D, T, B>where
B: TensorAccess,
impl<FD, FS, D, T, B> Display for DenseTensor<FD, FS, D, T, B>where
B: TensorAccess,
source§impl<FD, FS, D, T, B> From<B> for DenseTensor<FD, FS, D, T, B>
impl<FD, FS, D, T, B> From<B> for DenseTensor<FD, FS, D, T, B>
source§impl<FD, FS, D, T, B> From<DenseTensor<FD, FS, D, T, B>> for Tensor<FD, FS, D, T>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
impl<FD, FS, D, T, B> From<DenseTensor<FD, FS, D, T, B>> for Tensor<FD, FS, D, T>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
source§fn from(dense: DenseTensor<FD, FS, D, T, B>) -> Self
fn from(dense: DenseTensor<FD, FS, D, T, B>) -> Self
Converts to this type from the input type.
source§impl<FD, FS, D, T> FromStream for DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>where
FD: File<Key = u64, Block = Array, Inner = D::Inner> + TryFrom<D::Store, Error = TCError>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
D::Write: DirCreateFile<FD>,
impl<FD, FS, D, T> FromStream for DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>where
FD: File<Key = u64, Block = Array, Inner = D::Inner> + TryFrom<D::Store, Error = TCError>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
D::Write: DirCreateFile<FD>,
source§impl<'en, FD, FS, D, T, B> IntoView<'en, D> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
impl<'en, FD, FS, D, T, B> IntoView<'en, D> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
§type Txn = T
type Txn = T
The type of
Transaction
which this state supportssource§impl<FD, FS, D, T> Persist<D> for DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>where
FD: File<Key = u64, Block = Array, Inner = D::Inner> + TryFrom<D::Store, Error = TCError>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
D::Store: From<FD>,
impl<FD, FS, D, T> Persist<D> for DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>where
FD: File<Key = u64, Block = Array, Inner = D::Inner> + TryFrom<D::Store, Error = TCError>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
D::Store: From<FD>,
type Txn = T
type Schema = Schema
source§fn create(txn_id: TxnId, schema: Self::Schema, store: D::Store) -> TCResult<Self>
fn create(txn_id: TxnId, schema: Self::Schema, store: D::Store) -> TCResult<Self>
Create a new instance of
Self
from an empty Store
.source§fn load(txn_id: TxnId, schema: Self::Schema, store: D::Store) -> TCResult<Self>
fn load(txn_id: TxnId, schema: Self::Schema, store: D::Store) -> TCResult<Self>
Load a saved instance of
Self
from persistent storage.
Should only be invoked at startup time.source§impl<FD, FS, D, T> Restore<D> for DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>where
FD: File<Key = u64, Block = Array, Inner = D::Inner> + TryFrom<D::Store, Error = TCError>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
D::Store: From<FD>,
impl<FD, FS, D, T> Restore<D> for DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>where
FD: File<Key = u64, Block = Array, Inner = D::Inner> + TryFrom<D::Store, Error = TCError>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
D::Store: From<FD>,
source§impl<FD, FS, D, T, B> TensorAccess for DenseTensor<FD, FS, D, T, B>where
B: TensorAccess,
impl<FD, FS, D, T, B> TensorAccess for DenseTensor<FD, FS, D, T, B>where
B: TensorAccess,
source§impl<FD, FS, D, T, B, O> TensorBoolean<DenseTensor<FD, FS, D, T, O>> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
O: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
impl<FD, FS, D, T, B, O> TensorBoolean<DenseTensor<FD, FS, D, T, O>> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
O: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
§type Combine = DenseTensor<FD, FS, D, T, BlockListCombine<FD, FS, D, T, B, O>>
type Combine = DenseTensor<FD, FS, D, T, BlockListCombine<FD, FS, D, T, B, O>>
The result type of a boolean operation.
§type LeftCombine = DenseTensor<FD, FS, D, T, BlockListCombine<FD, FS, D, T, B, O>>
type LeftCombine = DenseTensor<FD, FS, D, T, BlockListCombine<FD, FS, D, T, B, O>>
The result type of a boolean operation which may ignore right-hand values.
source§impl<FD, FS, D, T, B> TensorBoolean<Tensor<FD, FS, D, T>> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
impl<FD, FS, D, T, B> TensorBoolean<Tensor<FD, FS, D, T>> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
§type LeftCombine = Tensor<FD, FS, D, T>
type LeftCombine = Tensor<FD, FS, D, T>
The result type of a boolean operation which may ignore right-hand values.
source§impl<FD, FS, D, T, B> TensorBooleanConst for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
impl<FD, FS, D, T, B> TensorBooleanConst for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
§type Combine = DenseTensor<FD, FS, D, T, BlockListConst<FD, FS, D, T, B>>
type Combine = DenseTensor<FD, FS, D, T, BlockListConst<FD, FS, D, T, B>>
The return type of a boolean operation.
§type DenseCombine = DenseTensor<FD, FS, D, T, BlockListConst<FD, FS, D, T, B>>
type DenseCombine = DenseTensor<FD, FS, D, T, BlockListConst<FD, FS, D, T, B>>
The return type of a boolean operation with a result expected to be dense.
source§impl<FD, FS, D, T, B, O> TensorCompare<DenseTensor<FD, FS, D, T, O>> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
O: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
impl<FD, FS, D, T, B, O> TensorCompare<DenseTensor<FD, FS, D, T, O>> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
O: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
§type Compare = DenseTensor<FD, FS, D, T, BlockListCombine<FD, FS, D, T, B, O>>
type Compare = DenseTensor<FD, FS, D, T, BlockListCombine<FD, FS, D, T, B, O>>
The result of a comparison operation
§type Dense = DenseTensor<FD, FS, D, T, BlockListCombine<FD, FS, D, T, B, O>>
type Dense = DenseTensor<FD, FS, D, T, BlockListCombine<FD, FS, D, T, B, O>>
The result of a comparison operation which can only return a dense
Tensor
source§fn eq(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Dense>
fn eq(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Dense>
Element-wise equality
source§fn gt(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Compare>
fn gt(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Compare>
Element-wise greater-than
source§fn gte(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Dense>
fn gte(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Dense>
Element-wise greater-or-equal
source§fn lt(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Compare>
fn lt(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Compare>
Element-wise less-than
source§impl<FD, FS, D, T, B> TensorCompare<Tensor<FD, FS, D, T>> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
impl<FD, FS, D, T, B> TensorCompare<Tensor<FD, FS, D, T>> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
source§impl<FD, FS, D, T, B> TensorCompareConst for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
impl<FD, FS, D, T, B> TensorCompareConst for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
§type Compare = DenseTensor<FD, FS, D, T, BlockListConst<FD, FS, D, T, B>>
type Compare = DenseTensor<FD, FS, D, T, BlockListConst<FD, FS, D, T, B>>
The result of a comparison operation
source§impl<FD, FS, D, T, B> TensorDiagonal<D> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseWrite<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
impl<FD, FS, D, T, B> TensorDiagonal<D> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseWrite<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
§type Txn = T
type Txn = T
The type of
Transaction
to expect§type Diagonal = DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>
type Diagonal = DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>
The type of
Tensor
returned by diagonal
fn diagonal<'async_trait>(
self,
txn: Self::Txn
) -> Pin<Box<dyn Future<Output = TCResult<Self::Diagonal>> + Send + 'async_trait>>where
Self: 'async_trait,
source§impl<FD, FS, D, T, B> TensorDualIO<D, DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseWrite<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
impl<FD, FS, D, T, B> TensorDualIO<D, DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseWrite<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
§type Txn = T
type Txn = T
The type of
Transaction
to expectsource§impl<FD, FS, D, T, B> TensorDualIO<D, Tensor<FD, FS, D, T>> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner> + TryFrom<D::Store, Error = TCError>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseWrite<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
D::Store: From<FD>,
impl<FD, FS, D, T, B> TensorDualIO<D, Tensor<FD, FS, D, T>> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner> + TryFrom<D::Store, Error = TCError>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseWrite<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
D::Store: From<FD>,
§type Txn = T
type Txn = T
The type of
Transaction
to expectsource§impl<FD, FS, D, T, B> TensorIO<D> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseWrite<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
impl<FD, FS, D, T, B> TensorIO<D> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseWrite<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
§type Txn = T
type Txn = T
The type of
Transaction
to expectsource§fn read_value<'async_trait>(
self,
txn: Self::Txn,
coord: Coord
) -> Pin<Box<dyn Future<Output = TCResult<Number>> + Send + 'async_trait>>where
Self: 'async_trait,
fn read_value<'async_trait>(
self,
txn: Self::Txn,
coord: Coord
) -> Pin<Box<dyn Future<Output = TCResult<Number>> + Send + 'async_trait>>where
Self: 'async_trait,
Read a single value from this
Tensor
.source§impl<FD, FS, D, T, B> TensorIndex<D> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseWrite<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
impl<FD, FS, D, T, B> TensorIndex<D> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseWrite<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
§type Txn = T
type Txn = T
The type of
Transaction
to expect§type Index = DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>
type Index = DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>
The type of
Tensor
returned by argmax
.source§impl<FD, FS, D, T, B> TensorInstance for DenseTensor<FD, FS, D, T, B>
impl<FD, FS, D, T, B> TensorInstance for DenseTensor<FD, FS, D, T, B>
§type Dense = DenseTensor<FD, FS, D, T, B>
type Dense = DenseTensor<FD, FS, D, T, B>
A dense representation of this
Tensor
§type Sparse = SparseTensor<FD, FS, D, T, DenseToSparse<FD, FS, D, T, B>>
type Sparse = SparseTensor<FD, FS, D, T, DenseToSparse<FD, FS, D, T, B>>
A sparse representation of this
Tensor
source§fn into_dense(self) -> Self::Dense
fn into_dense(self) -> Self::Dense
Return a dense representation of this
Tensor
.source§fn into_sparse(self) -> Self::Sparse
fn into_sparse(self) -> Self::Sparse
Return a sparse representation of this
Tensor
.source§impl<FD, FS, D, T, B, O> TensorMath<DenseTensor<FD, FS, D, T, O>> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
O: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
impl<FD, FS, D, T, B, O> TensorMath<DenseTensor<FD, FS, D, T, O>> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
O: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
§type Combine = DenseTensor<FD, FS, D, T, BlockListCombine<FD, FS, D, T, B, O>>
type Combine = DenseTensor<FD, FS, D, T, BlockListCombine<FD, FS, D, T, B, O>>
The result type of a math operation
§type LeftCombine = DenseTensor<FD, FS, D, T, BlockListCombine<FD, FS, D, T, B, O>>
type LeftCombine = DenseTensor<FD, FS, D, T, BlockListCombine<FD, FS, D, T, B, O>>
The result type of a math operation which may ignore right-hand-side values
source§fn add(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Combine>
fn add(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Combine>
Add two tensors together.
source§fn div(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Combine>
fn div(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Combine>
Divide
self
by other
.source§fn log(self, base: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::LeftCombine>
fn log(self, base: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::LeftCombine>
Element-wise logarithm of
self
with respect to the given base
.source§fn mul(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Combine>
fn mul(self, other: DenseTensor<FD, FS, D, T, O>) -> TCResult<Self::Combine>
Multiply two tensors together.
source§impl<FD, FS, D, T, B> TensorMath<Tensor<FD, FS, D, T>> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node, Inner = D::Inner>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
impl<FD, FS, D, T, B> TensorMath<Tensor<FD, FS, D, T>> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node, Inner = D::Inner>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
§type LeftCombine = Tensor<FD, FS, D, T>
type LeftCombine = Tensor<FD, FS, D, T>
The result type of a math operation which may ignore right-hand-side values
source§fn add(self, other: Tensor<FD, FS, D, T>) -> TCResult<Self::Combine>
fn add(self, other: Tensor<FD, FS, D, T>) -> TCResult<Self::Combine>
Add two tensors together.
source§fn log(self, base: Tensor<FD, FS, D, T>) -> TCResult<Self::LeftCombine>
fn log(self, base: Tensor<FD, FS, D, T>) -> TCResult<Self::LeftCombine>
Element-wise logarithm of
self
with respect to the given base
.source§fn mul(self, other: Tensor<FD, FS, D, T>) -> TCResult<Self::Combine>
fn mul(self, other: Tensor<FD, FS, D, T>) -> TCResult<Self::Combine>
Multiply two tensors together.
source§impl<FD, FS, D, T, B> TensorMathConst for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
impl<FD, FS, D, T, B> TensorMathConst for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
§type Combine = DenseTensor<FD, FS, D, T, BlockListConst<FD, FS, D, T, B>>
type Combine = DenseTensor<FD, FS, D, T, BlockListConst<FD, FS, D, T, B>>
The return type of a math operation
§type DenseCombine = DenseTensor<FD, FS, D, T, BlockListConst<FD, FS, D, T, B>>
type DenseCombine = DenseTensor<FD, FS, D, T, BlockListConst<FD, FS, D, T, B>>
The return type of a math operation with a result expected to be dense
source§impl<FD, FS, D, T> TensorPersist for DenseTensor<FD, FS, D, T, DenseAccessor<FD, FS, D, T>>
impl<FD, FS, D, T> TensorPersist for DenseTensor<FD, FS, D, T, DenseAccessor<FD, FS, D, T>>
type Persistent = DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>
fn as_persistent(self) -> Option<Self::Persistent>
fn is_persistent(&self) -> bool
source§impl<FD, FS, D, T, B> TensorReduce<D> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
impl<FD, FS, D, T, B> TensorReduce<D> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
§type Txn = T
type Txn = T
The type of
Transaction
to expect§type Reduce = DenseTensor<FD, FS, D, T, BlockListReduce<FD, FS, D, T, B>>
type Reduce = DenseTensor<FD, FS, D, T, BlockListReduce<FD, FS, D, T, B>>
The result type of a reduce operation
source§fn max(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>
fn max(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>
Return the maximum of this
Tensor
along the given axis
.source§fn max_all(&self, txn: Self::Txn) -> TCBoxTryFuture<'_, Number>
fn max_all(&self, txn: Self::Txn) -> TCBoxTryFuture<'_, Number>
Return the maximum element in this
Tensor
.source§fn min(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>
fn min(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>
Return the minimum of this
Tensor
along the given axis
.source§fn min_all(&self, txn: Self::Txn) -> TCBoxTryFuture<'_, Number>
fn min_all(&self, txn: Self::Txn) -> TCBoxTryFuture<'_, Number>
Return the minimum element in this
Tensor
.source§fn product(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>
fn product(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>
Return the product of this
Tensor
along the given axis
.source§fn product_all(&self, txn: T) -> TCBoxTryFuture<'_, Number>
fn product_all(&self, txn: T) -> TCBoxTryFuture<'_, Number>
Return the product of all elements in this
Tensor
.source§fn sum(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>
fn sum(self, axis: usize, keepdims: bool) -> TCResult<Self::Reduce>
Return the sum of this
Tensor
along the given axis
.source§fn sum_all(&self, txn: T) -> TCBoxTryFuture<'_, Number>
fn sum_all(&self, txn: T) -> TCBoxTryFuture<'_, Number>
Return the sum of all elements in this
Tensor
.source§impl<FD, FS, D, T, B> TensorTransform for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
impl<FD, FS, D, T, B> TensorTransform for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
§type Broadcast = DenseTensor<FD, FS, D, T, DenseAccessor<FD, FS, D, T>>
type Broadcast = DenseTensor<FD, FS, D, T, DenseAccessor<FD, FS, D, T>>
A broadcast
Tensor
§type Cast = DenseTensor<FD, FS, D, T, BlockListCast<FD, FS, D, T, B>>
type Cast = DenseTensor<FD, FS, D, T, BlockListCast<FD, FS, D, T, B>>
A type-cast
Tensor
§type Expand = DenseTensor<FD, FS, D, T, BlockListExpand<FD, FS, D, T, B>>
type Expand = DenseTensor<FD, FS, D, T, BlockListExpand<FD, FS, D, T, B>>
A
Tensor
with an expanded dimension§type Flip = DenseTensor<FD, FS, D, T, BlockListFlip<FD, FS, D, T, B>>
type Flip = DenseTensor<FD, FS, D, T, BlockListFlip<FD, FS, D, T, B>>
A
Tensor
flipped around one axis§type Reshape = DenseTensor<FD, FS, D, T, BlockListReshape<FD, FS, D, T, B>>
type Reshape = DenseTensor<FD, FS, D, T, BlockListReshape<FD, FS, D, T, B>>
A reshaped
Tensor
§type Slice = DenseTensor<FD, FS, D, T, <B as DenseAccess<FD, FS, D, T>>::Slice>
type Slice = DenseTensor<FD, FS, D, T, <B as DenseAccess<FD, FS, D, T>>::Slice>
A
Tensor
slice§type Transpose = DenseTensor<FD, FS, D, T, <B as DenseAccess<FD, FS, D, T>>::Transpose>
type Transpose = DenseTensor<FD, FS, D, T, <B as DenseAccess<FD, FS, D, T>>::Transpose>
A transposed
Tensor
source§fn broadcast(self, shape: Shape) -> TCResult<Self::Broadcast>
fn broadcast(self, shape: Shape) -> TCResult<Self::Broadcast>
Broadcast this
Tensor
to the given shape
.source§fn cast_into(self, dtype: NumberType) -> TCResult<Self::Cast>
fn cast_into(self, dtype: NumberType) -> TCResult<Self::Cast>
Cast this
Tensor
to the given dtype
.source§fn expand_dims(self, axis: usize) -> TCResult<Self::Expand>
fn expand_dims(self, axis: usize) -> TCResult<Self::Expand>
Insert a new dimension of size 1 at the given
axis
.source§impl<FD, FS, D, T, B> TensorTrig for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
impl<FD, FS, D, T, B> TensorTrig for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
§type Unary = DenseTensor<FD, FS, D, T, BlockListUnary<FD, FS, D, T, B>>
type Unary = DenseTensor<FD, FS, D, T, BlockListUnary<FD, FS, D, T, B>>
The return type of a unary operation
source§impl<FD, FS, D, T, B> TensorUnary<D> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
impl<FD, FS, D, T, B> TensorUnary<D> for DenseTensor<FD, FS, D, T, B>where
FD: File<Key = u64, Block = Array, Inner = D::Inner>,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
B: DenseAccess<FD, FS, D, T>,
D::Write: DirCreateFile<FD>,
§type Txn = T
type Txn = T
The type of
Transaction
to expect§type Unary = DenseTensor<FD, FS, D, T, BlockListUnary<FD, FS, D, T, B>>
type Unary = DenseTensor<FD, FS, D, T, BlockListUnary<FD, FS, D, T, B>>
The return type of a unary operation
source§fn all<'async_trait>(
self,
txn: T
) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
fn all<'async_trait>(
self,
txn: T
) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
Return
true
if all elements in this Tensor
are nonzero.source§impl<FD, FS, D, T> Transact for DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>where
FD: File<Key = u64, Block = Array> + Transact,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
impl<FD, FS, D, T> Transact for DenseTensor<FD, FS, D, T, BlockListFile<FD, FS, D, T>>where
FD: File<Key = u64, Block = Array> + Transact,
FS: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
§type Commit = <BlockListFile<FD, FS, D, T> as Transact>::Commit
type Commit = <BlockListFile<FD, FS, D, T> as Transact>::Commit
A guard which blocks concurrent commits
source§fn commit<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = Self::Commit> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn commit<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = Self::Commit> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Commit this transaction.
Auto Trait Implementations§
impl<FD, FS, D, T, B> RefUnwindSafe for DenseTensor<FD, FS, D, T, B>where
B: RefUnwindSafe,
D: RefUnwindSafe,
FD: RefUnwindSafe,
FS: RefUnwindSafe,
T: RefUnwindSafe,
impl<FD, FS, D, T, B> Send for DenseTensor<FD, FS, D, T, B>where
B: Send,
D: Send,
FD: Send,
FS: Send,
T: Send,
impl<FD, FS, D, T, B> Sync for DenseTensor<FD, FS, D, T, B>where
B: Sync,
D: Sync,
FD: Sync,
FS: Sync,
T: Sync,
impl<FD, FS, D, T, B> Unpin for DenseTensor<FD, FS, D, T, B>where
B: Unpin,
D: Unpin,
FD: Unpin,
FS: Unpin,
T: Unpin,
impl<FD, FS, D, T, B> UnwindSafe for DenseTensor<FD, FS, D, T, B>where
B: UnwindSafe,
D: UnwindSafe,
FD: UnwindSafe,
FS: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
source§impl<F> Match for F
impl<F> Match for F
source§fn matches<T>(&self) -> boolwhere
T: TryCastFrom<Self>,
fn matches<T>(&self) -> boolwhere
T: TryCastFrom<Self>,
Returns
true
if self
can be cast into the target type T
.source§impl<F, T> TryCastFrom<F> for Twhere
T: CastFrom<F>,
impl<F, T> TryCastFrom<F> for Twhere
T: CastFrom<F>,
source§fn can_cast_from(_: &F) -> bool
fn can_cast_from(_: &F) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(f: F) -> Option<T>
fn opt_cast_from(f: F) -> Option<T>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl<F, T> TryCastInto<T> for Fwhere
T: TryCastFrom<F>,
impl<F, T> TryCastInto<T> for Fwhere
T: TryCastFrom<F>,
source§fn can_cast_into(&self) -> bool
fn can_cast_into(&self) -> bool
Test if
self
can be cast into T
.source§fn opt_cast_into(self) -> Option<T>
fn opt_cast_into(self) -> Option<T>
Returns
Some(T)
if self
can be cast into T
, otherwise None
.