Enum tc_tensor::DenseAccessor [−][src]
pub enum DenseAccessor<FD, FS, D, T> {
Broadcast(Box<BlockListBroadcast<FD, FS, D, T, Self>>),
Cast(Box<BlockListCast<FD, FS, D, T, Self>>),
Combine(Box<BlockListCombine<FD, FS, D, T, Self, Self>>),
Const(Box<BlockListConst<FD, FS, D, T, Self>>),
Expand(Box<BlockListExpand<FD, FS, D, T, Self>>),
File(BlockListFile<FD, FS, D, T>),
Reduce(Box<BlockListReduce<FD, FS, D, T, Self>>),
Slice(BlockListFileSlice<FD, FS, D, T>),
Sparse(BlockListSparse<FD, FS, D, T, SparseAccessor<FD, FS, D, T>>),
Transpose(Box<BlockListTranspose<FD, FS, D, T, Self>>),
Unary(Box<BlockListUnary<FD, FS, D, T, Self>>),
}
Expand description
A generic enum which can contain any DenseAccess
impl
Variants
Broadcast(Box<BlockListBroadcast<FD, FS, D, T, Self>>)
Tuple Fields of Broadcast
0: Box<BlockListBroadcast<FD, FS, D, T, Self>>
Cast(Box<BlockListCast<FD, FS, D, T, Self>>)
Tuple Fields of Cast
0: Box<BlockListCast<FD, FS, D, T, Self>>
Combine(Box<BlockListCombine<FD, FS, D, T, Self, Self>>)
Tuple Fields of Combine
0: Box<BlockListCombine<FD, FS, D, T, Self, Self>>
Const(Box<BlockListConst<FD, FS, D, T, Self>>)
Tuple Fields of Const
0: Box<BlockListConst<FD, FS, D, T, Self>>
Expand(Box<BlockListExpand<FD, FS, D, T, Self>>)
Tuple Fields of Expand
0: Box<BlockListExpand<FD, FS, D, T, Self>>
File(BlockListFile<FD, FS, D, T>)
Tuple Fields of File
0: BlockListFile<FD, FS, D, T>
Reduce(Box<BlockListReduce<FD, FS, D, T, Self>>)
Tuple Fields of Reduce
0: Box<BlockListReduce<FD, FS, D, T, Self>>
Sparse(BlockListSparse<FD, FS, D, T, SparseAccessor<FD, FS, D, T>>)
Tuple Fields of Sparse
0: BlockListSparse<FD, FS, D, T, SparseAccessor<FD, FS, D, T>>
Transpose(Box<BlockListTranspose<FD, FS, D, T, Self>>)
Tuple Fields of Transpose
0: Box<BlockListTranspose<FD, FS, D, T, Self>>
Unary(Box<BlockListUnary<FD, FS, D, T, Self>>)
Tuple Fields of Unary
0: Box<BlockListUnary<FD, FS, D, T, Self>>
Trait Implementations
impl<FD, FS, D, T> DenseAccess<FD, FS, D, T> for DenseAccessor<FD, FS, D, T> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T> DenseAccess<FD, FS, D, T> for DenseAccessor<FD, FS, D, T> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<TensorType>,
type Slice = Self
type Slice = Self
The type returned by slice
type Transpose = Self
type Transpose = Self
The type returned by transpose
Return a DenseAccessor
enum which contains this accessor.
Return a stream of the Array
s which this DenseTensor
comprises.
Return a stream of the elements of this DenseTensor
.
Return a slice of this DenseTensor
.
Return a transpose of this DenseTensor
.
impl<FD, FS, D, T> DenseWrite<FD, FS, D, T> for DenseAccessor<FD, FS, D, T> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T> DenseWrite<FD, FS, D, T> for DenseAccessor<FD, FS, D, T> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<TensorType>,
Overwrite this accessor’s contents with those of the given accessor.
impl<FD, FS, D, T> From<BlockListFile<FD, FS, D, T>> for DenseAccessor<FD, FS, D, T> where
FD: File<Array>,
FS: File<Node>,
D: Dir,
T: Transaction<D>,
impl<FD, FS, D, T> From<BlockListFile<FD, FS, D, T>> for DenseAccessor<FD, FS, D, T> where
FD: File<Array>,
FS: File<Node>,
D: Dir,
T: Transaction<D>,
Performs the conversion.
impl<FD, FS, D, T> TensorAccess for DenseAccessor<FD, FS, D, T> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<TensorType>,
impl<FD, FS, D, T> TensorAccess for DenseAccessor<FD, FS, D, T> where
D: Dir,
T: Transaction<D>,
FD: File<Array>,
FS: File<Node>,
D::File: AsType<FD> + AsType<FS>,
D::FileClass: From<TensorType>,
Auto Trait Implementations
impl<FD, FS, D, T> RefUnwindSafe for DenseAccessor<FD, FS, D, T> where
D: RefUnwindSafe,
FD: RefUnwindSafe,
FS: RefUnwindSafe,
T: RefUnwindSafe,
impl<FD, FS, D, T> Send for DenseAccessor<FD, FS, D, T> where
D: Send + Sync,
FD: Send,
FS: Send + Sync,
T: Send + Sync,
impl<FD, FS, D, T> Sync for DenseAccessor<FD, FS, D, T> where
D: Send + Sync,
FD: Sync,
FS: Send + Sync,
T: Send + Sync,
impl<FD, FS, D, T> Unpin for DenseAccessor<FD, FS, D, T> where
D: Unpin,
FD: Unpin,
FS: Unpin,
T: Unpin,
impl<FD, FS, D, T> UnwindSafe for DenseAccessor<FD, FS, D, T> where
D: UnwindSafe + RefUnwindSafe,
FD: UnwindSafe,
FS: UnwindSafe + RefUnwindSafe,
T: UnwindSafe + RefUnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Returns true
if self
can be cast into the target type T
.
Test if value
can be cast into Self
.
Returns Some(Self)
if the source value can be cast into Self
, otherwise None
.
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
Test if self
can be cast into T
.
Returns Some(T)
if self
can be cast into T
, otherwise None
.
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
Returns Ok(T)
if self
can be cast into T
, otherwise calls on_err
.