Skip to main content

Analyzer

Trait Analyzer 

Source
pub trait Analyzer {
    // Required methods
    fn target_name(&self) -> &str;
    fn analyze(&self, code: &str) -> Result<AnalysisReport>;
    fn detect_muda(&self, code: &str) -> Vec<MudaWarning>;
    fn estimate_roofline(&self, analysis: &AnalysisReport) -> RooflineMetric;
}
Expand description

Core trait for all analyzers (PTX, SIMD, WGSL)

Required Methods§

Source

fn target_name(&self) -> &str

The type of IR being analyzed (e.g., “PTX”, “x86 ASM”, “WGSL”)

Source

fn analyze(&self, code: &str) -> Result<AnalysisReport>

Analyze the provided code and return a structured report

§Errors

Returns ExplainError::PtxParseError if the code cannot be parsed.

Source

fn detect_muda(&self, code: &str) -> Vec<MudaWarning>

Identify specific performance bottlenecks (Muda)

Source

fn estimate_roofline(&self, analysis: &AnalysisReport) -> RooflineMetric

Estimate theoretical peak performance

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§