Skip to main content

SoaExtractableF64

Trait SoaExtractableF64 

Source
pub trait SoaExtractableF64: Agent {
    // Required methods
    fn num_columns() -> usize;
    fn column_names() -> Vec<&'static str>;
    fn extract_row(&self, columns: &mut [Vec<f64>]);
    fn write_back_row(&mut self, columns: &[&[f64]], row: usize);
}
Expand description

Like SoaExtractable but using f64 columns.

Implement this trait when your kernel needs double precision — e.g. scientific workloads, long-horizon integrators, or ill-conditioned dynamics. f32 remains the default for parity with the CUDA batch path and most ABM workloads.

An agent type may implement both SoaExtractable and SoaExtractableF64 independently; the two extraction paths do not interact. Use cast_columns_f64_to_f32 as a convenience when you want to downcast an f64 extraction result to f32 for an existing f32 kernel.

Required Methods§

Source

fn num_columns() -> usize

Number of f64 columns to extract.

Source

fn column_names() -> Vec<&'static str>

Human-readable names for each column.

Source

fn extract_row(&self, columns: &mut [Vec<f64>])

Push this agent’s values into the column vectors.

Source

fn write_back_row(&mut self, columns: &[&[f64]], row: usize)

Read this agent’s values back from the column slices at row.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§