docsapi referencedarkforest-core-tensor-element
API Referencecrate: darkforest-coresince v0.1.0-alpha

Element

Trait implemented for all supported numeric primitive types (f32, f64, i32, i64, u8).

Element

darkforest-core module: tensor since v0.1.0-alpha

Signature

rust
pub trait Element: Copy + Send + Sync + 'static { fn zero() -> Self; fn one() -> Self; }

Overview

Trait implemented for all supported numeric primitive types (f32, f64, i32, i64, u8).

Invariants & Design Principles

  • Invariant: Requires Send + Sync for lock-free parallel Rayon evaluation.

Usage Example

rust
impl Element for f32 { ... }

Related Components