pub struct Float;Expand description
The three tensor kinds, used only as zero-sized compile-time markers on
Tensor<D, K>. They never hold data; behaviour lives in the device ops traits.
Trait Implementations§
Source§impl<D: Device> BytesDTypeKind<D> for Float
impl<D: Device> BytesDTypeKind<D> for Float
Source§impl<D: Device> ConstructDTypeKind<D> for Float
impl<D: Device> ConstructDTypeKind<D> for Float
fn zeros_dispatch( shape: &Shape, device: &D, dtype: FloatDType, ) -> Result<Self::Storage>
fn ones_dispatch( shape: &Shape, device: &D, dtype: FloatDType, ) -> Result<Self::Storage>
fn full_dispatch( shape: &Shape, value: f64, device: &D, dtype: FloatDType, ) -> Result<Self::Storage>
Source§impl<D: Device> IndexingDTypeKind<D> for Float
impl<D: Device> IndexingDTypeKind<D> for Float
fn index_select_dispatch( x: &Self::Storage, x_l: &Layout, idx: &D::IntStorage, idx_l: &Layout, dim: usize, ) -> Result<(Self::Storage, Shape)>
fn gather_dispatch( x: &Self::Storage, x_l: &Layout, idx: &D::IntStorage, idx_l: &Layout, dim: usize, ) -> Result<(Self::Storage, Shape)>
fn index_add_dispatch( init: &Self::Storage, init_l: &Layout, idx: &D::IntStorage, idx_l: &Layout, src: &Self::Storage, src_l: &Layout, dim: usize, ) -> Result<Self::Storage>
fn scatter_add_dispatch( init: &Self::Storage, init_l: &Layout, idx: &D::IntStorage, idx_l: &Layout, src: &Self::Storage, src_l: &Layout, dim: usize, ) -> Result<Self::Storage>
Source§impl<D: Device, T: FloatFrom, const R: usize, const C: usize> IntoTensor<D, Float> for &[[T; C]; R]
impl<D: Device, T: FloatFrom, const R: usize, const C: usize> IntoTensor<D, Float> for &[[T; C]; R]
Source§impl<D: Device, T: FloatFrom, const D1: usize, const D2: usize, const D3: usize> IntoTensor<D, Float> for &[[[T; D3]; D2]; D1]
impl<D: Device, T: FloatFrom, const D1: usize, const D2: usize, const D3: usize> IntoTensor<D, Float> for &[[[T; D3]; D2]; D1]
Source§impl<D: Device, T: FloatFrom, const D1: usize, const D2: usize, const D3: usize, const D4: usize> IntoTensor<D, Float> for &[[[[T; D4]; D3]; D2]; D1]
impl<D: Device, T: FloatFrom, const D1: usize, const D2: usize, const D3: usize, const D4: usize> IntoTensor<D, Float> for &[[[[T; D4]; D3]; D2]; D1]
Source§impl<D: Device> NumericDTypeKind<D> for Float
impl<D: Device> NumericDTypeKind<D> for Float
fn binary_dispatch( lhs: &Self::Storage, lhs_l: &Layout, rhs: &Self::Storage, rhs_l: &Layout, op: BinaryOp, ) -> Result<Self::Storage>
fn binary_inplace_dispatch( dst: &mut Self::Storage, dst_l: &Layout, src: &Self::Storage, src_l: &Layout, op: BinaryOp, ) -> Result<()>
fn binary_scalar_dispatch( lhs: &Self::Storage, lhs_l: &Layout, rhs: Self::Scalar, op: BinaryOp, ) -> Result<Self::Storage>
fn binary_scalar_inplace_dispatch( dst: &mut Self::Storage, dst_l: &Layout, rhs: Self::Scalar, op: BinaryOp, ) -> Result<()>
fn binary_scalar_lhs_dispatch( scalar: Self::Scalar, rhs: &Self::Storage, rhs_l: &Layout, op: BinaryOp, ) -> Result<Self::Storage>
fn cmp_dispatch( lhs: &Self::Storage, lhs_l: &Layout, rhs: &Self::Storage, rhs_l: &Layout, op: CmpOp, ) -> Result<D::BoolStorage>
fn cmp_scalar_dispatch( lhs: &Self::Storage, lhs_l: &Layout, rhs: Self::Scalar, op: CmpOp, ) -> Result<D::BoolStorage>
fn unary_dispatch( x: &Self::Storage, l: &Layout, op: UnaryOp<Self::Scalar>, ) -> Result<Self::Storage>
fn unary_inplace_dispatch( dst: &mut Self::Storage, dst_l: &Layout, op: UnaryOp<Self::Scalar>, ) -> Result<()>
Source§impl<D: Device> ReduceDTypeKind<D> for Float
impl<D: Device> ReduceDTypeKind<D> for Float
Source§impl<D: Device> ShapeDTypeKind<D> for Float
impl<D: Device> ShapeDTypeKind<D> for Float
fn contiguous_dispatch(s: &Self::Storage, l: &Layout) -> Result<Self::Storage>
fn cat_dispatch( srcs: &[(&Self::Storage, &Layout)], dim: usize, ) -> Result<(Self::Storage, Shape)>
fn view_dispatch( src: &Self::Storage, src_l: &Layout, dst_l: &Layout, view: ViewOp, ) -> Result<Option<Self::Storage>>
Source§impl<D: Device> TensorMeta<D, Float> for FloatMeta<D>
impl<D: Device> TensorMeta<D, Float> for FloatMeta<D>
fn on_binary( lhs: &Tensor<D, Float>, rhs: &Tensor<D, Float>, op: BinaryOp, ) -> Self
fn on_binary_scalar(lhs: &Tensor<D, Float>, rhs: f64, op: BinaryOp) -> Self
fn on_unary(t: &Tensor<D, Float>, op: UnaryOp<f64>) -> Self
fn on_float_unary(t: &Tensor<D, Float>, op: FloatUnaryOp) -> Self
fn on_reduce(t: &Tensor<D, Float>, dims: &[usize], op: ReduceOp) -> Self
fn on_matmul(lhs: &Tensor<D, Float>, rhs: &Tensor<D, Float>) -> Self
fn on_broadcast(t: &Tensor<D, Float>) -> Self
fn on_narrow(t: &Tensor<D, Float>, dim: usize, start: usize, len: usize) -> Self
fn on_slice( t: &Tensor<D, Float>, dim: usize, start: usize, end: usize, step: usize, ) -> Self
fn on_reshape(t: &Tensor<D, Float>) -> Self
fn on_transpose(t: &Tensor<D, Float>, dim1: usize, dim2: usize) -> Self
fn on_permute(t: &Tensor<D, Float>, dims: Vec<usize>) -> Self
fn on_cat<A: AsRef<Tensor<D, Float>>>(args: &[A], dim: usize) -> Self
fn on_copy(t: &Tensor<D, Float>) -> Self
fn on_cast(t: &Tensor<D, Float>) -> Self
fn on_index_select( t: &Tensor<D, Float>, idx: &Tensor<D, Int>, dim: usize, ) -> Self
fn on_gather(src: &Tensor<D, Float>, idx: &Tensor<D, Int>, dim: usize) -> Self
fn on_index_add( init: &Tensor<D, Float>, idx: &Tensor<D, Int>, src: &Tensor<D, Float>, dim: usize, ) -> Self
fn on_scatter_add( init: &Tensor<D, Float>, idx: &Tensor<D, Int>, src: &Tensor<D, Float>, dim: usize, ) -> Self
fn on_pick( mask: &Tensor<D, Bool>, tv: Option<&Tensor<D, Float>>, fv: Option<&Tensor<D, Float>>, ) -> Self
fn on_rms_norm( input: &Tensor<D, Float>, weight: &Tensor<D, Float>, eps: f64, ) -> Self
fn on_softmax(input: &Tensor<D, Float>, dim: usize) -> Self
Auto Trait Implementations§
impl Freeze for Float
impl RefUnwindSafe for Float
impl Send for Float
impl Sync for Float
impl Unpin for Float
impl UnsafeUnpin for Float
impl UnwindSafe for Float
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