native_neural_network_std 0.2.1

Ergonomic std wrapper for the `native_neural_network` crate (no_std) — std-friendly re-exports and utilities.
Documentation
pub struct ScratchStd {
    buf: Vec<f32>,
}

impl ScratchStd {
    pub fn new(len: usize) -> Self {
        Self {
            buf: vec![0f32; len],
        }
    }

    pub fn len(&self) -> usize {
        self.buf.len()
    }

    pub fn is_empty(&self) -> bool {
        self.buf.is_empty()
    }

    pub fn as_slice(&self) -> &[f32] {
        &self.buf
    }

    pub fn as_mut_slice(&mut self) -> &mut [f32] {
        &mut self.buf
    }

    pub fn resize(&mut self, new_len: usize) {
        self.buf.resize(new_len, 0f32);
    }

    pub fn clear(&mut self) {
        self.buf.clear();
    }
}