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§
Sourcefn num_columns() -> usize
fn num_columns() -> usize
Number of f64 columns to extract.
Sourcefn column_names() -> Vec<&'static str>
fn column_names() -> Vec<&'static str>
Human-readable names for each column.
Sourcefn extract_row(&self, columns: &mut [Vec<f64>])
fn extract_row(&self, columns: &mut [Vec<f64>])
Push this agent’s values into the column vectors.
Sourcefn write_back_row(&mut self, columns: &[&[f64]], row: usize)
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.