pub trait GpuIntegrator: Send {
// Required methods
fn integrate_simpsons_gpu(
&mut self,
file_path: &Path,
offset: u64,
size: u64,
step_size: f32,
) -> Result<f64, GpuError>;
fn integrate_simpson_38_gpu(
&mut self,
file_path: &Path,
offset: u64,
size: u64,
step_size: f32,
) -> Result<f64, GpuError>;
fn available_vram(&self) -> u64;
}Expand description
Platform-agnostic GPU integration interface.
Abstracts over DirectStorage, GPUDirect, and WebGPU to provide a unified API for GPU-accelerated calculus operations.
Required Methods§
Sourcefn integrate_simpsons_gpu(
&mut self,
file_path: &Path,
offset: u64,
size: u64,
step_size: f32,
) -> Result<f64, GpuError>
fn integrate_simpsons_gpu( &mut self, file_path: &Path, offset: u64, size: u64, step_size: f32, ) -> Result<f64, GpuError>
Executes Simpson’s rule integration on the GPU.
§Arguments
file_path- Path to the data file (NVMe storage)offset- Byte offset in file (must be 4096-byte aligned)size- Number of bytes to process (must be 4096-byte aligned)step_size- Integration step size (f32 for Quin packing)
§Returns
The integrated value as f64, ready to pack into Quin metadata.
Sourcefn integrate_simpson_38_gpu(
&mut self,
file_path: &Path,
offset: u64,
size: u64,
step_size: f32,
) -> Result<f64, GpuError>
fn integrate_simpson_38_gpu( &mut self, file_path: &Path, offset: u64, size: u64, step_size: f32, ) -> Result<f64, GpuError>
Executes composite Simpson 3/8 quadrature on the GPU.
Sourcefn available_vram(&self) -> u64
fn available_vram(&self) -> u64
Returns available VRAM in bytes.