#[derive(Debug, thiserror::Error)]
pub enum PtxGenError {
#[error("PTX generation failed: {0}")]
GenerationFailed(String),
#[error("invalid PTX type: {0}")]
InvalidType(String),
#[error("register allocation failed: {0}")]
RegisterError(String),
#[error("missing body function")]
MissingBody,
#[error("format error: {0}")]
FormatError(#[from] std::fmt::Error),
#[error("I/O error: {0}")]
IoError(#[from] std::io::Error),
#[error("unknown parameter: {0}")]
UnknownParam(String),
#[error("unsupported on {arch}: {feature}")]
UnsupportedFeature {
arch: String,
feature: String,
},
}