Skip to main content

Crate tenferro_tensor

Crate tenferro_tensor 

Source
Expand description

Core tensor types plus execution backends and kernels.

§Examples

use tenferro_tensor::{cpu::CpuBackend, Tensor, TypedTensor};

let mut backend = CpuBackend::new();
let a = Tensor::F64(TypedTensor::from_vec(vec![2], vec![1.0, 2.0]));
let b = Tensor::F64(TypedTensor::from_vec(vec![2], vec![3.0, 4.0]));
let c = tenferro_tensor::cpu::add(&a, &b);
assert_eq!(c.shape(), &[2]);

Re-exports§

pub use backend::default_exec_session;
pub use backend::SemiringBackend;
pub use backend::TensorBackend;
pub use backend::TensorExec;
pub use config::*;
pub use error::*;
pub use types::*;

Modules§

backend
buffer_pool
Typed host buffer pooling for reusable tensor allocations.
config
cpu
error
Runtime error types for tensor execution.
types
validate
Singular-matrix validation helpers shared across backends and exec layers.