ruxla-kernels 0.1.0

Internal crate of ruxla (use the `ruxla` crate): semantics of ruxla's operations, shared by the native backend and the IR interpreter
Documentation
//! The semantics of ruxla's operations: elementwise and array computations
//! on typed slices, following XLA's CPU behavior where StableHLO leaves it to
//! the implementation.
//!
//! The native backend and the IR interpreter both call these functions, so
//! they agree by construction; XLA is the independent reference.
//!
//! # Examples
//!
//! ```
//! use ruxla_kernels::{BinaryOp, Ops, cast};
//!
//! // Integer division by zero gives -1, as in XLA, instead of panicking.
//! assert_eq!(i32::binary(BinaryOp::Div, 7, 0), -1);
//! // Float to integer conversions saturate, and NaN becomes 0.
//! assert_eq!(cast::<f32, i32>(f32::NAN), 0);
//! ```

pub mod array;
mod buffer;
mod complex;
mod dtype;
pub mod elementwise;
pub mod fft;
pub mod linalg;
mod ops;
pub mod random;
pub mod special;
pub mod window;

pub use buffer::{Buffer, BufferElement};
pub use complex::{Complex, c64, c128};
pub use dtype::{DType, DTypeKind, Element, Value, cast};
pub use half::{bf16, f16};
pub use ops::{BinaryOp, CompareOp, Ops, TernaryOp, UnaryOp, compare, integer_pow};