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§
Sourcefn target_name(&self) -> &str
fn target_name(&self) -> &str
The type of IR being analyzed (e.g., “PTX”, “x86 ASM”, “WGSL”)
Sourcefn analyze(&self, code: &str) -> Result<AnalysisReport>
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.
Sourcefn detect_muda(&self, code: &str) -> Vec<MudaWarning>
fn detect_muda(&self, code: &str) -> Vec<MudaWarning>
Identify specific performance bottlenecks (Muda)
Sourcefn estimate_roofline(&self, analysis: &AnalysisReport) -> RooflineMetric
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".