pub struct JitCompiler { /* private fields */ }Expand description
JIT WGSL compiler for kernel fusion
Phase 1 MVP: Template-based code generation for common patterns. Future: Full SQL AST → WGSL compilation in Phase 2.
Implementations§
Source§impl JitCompiler
impl JitCompiler
Sourcepub fn generate_fused_filter_sum(
&self,
filter_threshold: i32,
filter_op: &str,
) -> String
pub fn generate_fused_filter_sum( &self, filter_threshold: i32, filter_op: &str, ) -> String
Generate fused filter+sum kernel
Fuses WHERE clause with SUM aggregation in single GPU pass.
§Arguments
filter_threshold- Threshold value for filter (e.g., WHERE value > 1000)filter_op- Filter operator (“gt”, “lt”, “eq”, “gte”, “lte”)
§Returns
WGSL shader source code for fused kernel
§Example
ⓘ
let shader = compiler.generate_fused_filter_sum(1000, "gt");
// Generates: WHERE value > 1000, SUM(value) in single passSourcepub fn compile_fused_filter_sum(
&self,
device: &Device,
filter_threshold: i32,
filter_op: &str,
) -> Arc<ShaderModule>
pub fn compile_fused_filter_sum( &self, device: &Device, filter_threshold: i32, filter_op: &str, ) -> Arc<ShaderModule>
Sourcepub fn cache_stats(&self) -> (usize, usize)
pub fn cache_stats(&self) -> (usize, usize)
Get cache statistics (size, capacity)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for JitCompiler
impl RefUnwindSafe for JitCompiler
impl Send for JitCompiler
impl Sync for JitCompiler
impl Unpin for JitCompiler
impl UnsafeUnpin for JitCompiler
impl UnwindSafe for JitCompiler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more