[][src]Type Definition autograph::RwTensor

type RwTensor<T, D> = TensorBase<RwRepr<T>, D>;

Tensor which allows for either shared immutable access or exclusive mutable access

Implementations

impl<T: Num, D: Dimension> RwTensor<T, D>[src]

pub fn read(&self) -> LockResult<RwReadTensor<T, D>>[src]

Similar to RwLock::read(), blocks the current thread until any write access is released, ensures that no writes occur as long as the RwReadTensor is held Ok: If the lock can be acquired Err: Returns the PoisonError if the RwLock is poisoned

pub fn write(&self) -> LockResult<RwWriteTensor<T, D>>[src]

Similar to RwLock::write(), blocks until exclusive mutable access can be acquired Ok: If the lock can be acquired Err: Returns the PoisonError if the RwLock is poisoned

Trait Implementations

impl<T: Num, D: Dimension> From<TensorBase<OwnedRepr<T>, D>> for RwTensor<T, D>[src]