Skip to main content

CpuTensor

Type Alias CpuTensor 

Source
pub type CpuTensor<T> = Tensor<T, CpuDevice>;

Aliased Type§

pub struct CpuTensor<T> { /* private fields */ }

Trait Implementations§

Source§

impl<T: WithDType> TryFrom<&[T]> for CpuTensor<T>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(v: &[T]) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<T: WithDType> TryFrom<Vec<T>> for CpuTensor<T>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(v: Vec<T>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<bf16> for CpuTensor<bf16>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(v: bf16) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<f16> for CpuTensor<f16>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(v: f16) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<f32> for CpuTensor<f32>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(v: f32) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<i64> for CpuTensor<i64>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(v: i64) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u8> for CpuTensor<u8>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(v: u8) -> Result<Self, Self::Error>

Performs the conversion.