pub struct TensorCreationOptions<D: Device, K: DTypeKind<D>> {
pub device: D,
pub dtype: K::DType,
}Fields§
§device: D§dtype: K::DTypeTrait Implementations§
Source§impl<D: Device, K: DTypeKind<D>> From<(&D, <K as DTypeKind<D>>::DType)> for TensorCreationOptions<D, K>
impl<D: Device, K: DTypeKind<D>> From<(&D, <K as DTypeKind<D>>::DType)> for TensorCreationOptions<D, K>
Source§impl<D: Device, K: DTypeKind<D>> From<(D, <K as DTypeKind<D>>::DType)> for TensorCreationOptions<D, K>
impl<D: Device, K: DTypeKind<D>> From<(D, <K as DTypeKind<D>>::DType)> for TensorCreationOptions<D, K>
Source§impl<D: Device> From<FloatDType> for TensorCreationOptions<D, Float>
impl<D: Device> From<FloatDType> for TensorCreationOptions<D, Float>
Source§fn from(dtype: FloatDType) -> Self
fn from(dtype: FloatDType) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<D, K> Freeze for TensorCreationOptions<D, K>
impl<D, K> RefUnwindSafe for TensorCreationOptions<D, K>
impl<D, K> Send for TensorCreationOptions<D, K>
impl<D, K> Sync for TensorCreationOptions<D, K>
impl<D, K> Unpin for TensorCreationOptions<D, K>
impl<D, K> UnsafeUnpin for TensorCreationOptions<D, K>
impl<D, K> UnwindSafe for TensorCreationOptions<D, K>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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