diff options
Diffstat (limited to 'ptx_parser/src/ast.rs')
-rw-r--r-- | ptx_parser/src/ast.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ptx_parser/src/ast.rs b/ptx_parser/src/ast.rs index d0dc303..a90b21e 100644 --- a/ptx_parser/src/ast.rs +++ b/ptx_parser/src/ast.rs @@ -1040,6 +1040,15 @@ pub enum MethodName<'input, ID> { Func(ID),
}
+impl<'input, ID> MethodName<'input, ID> {
+ pub fn is_kernel(&self) -> bool {
+ match self {
+ MethodName::Kernel(_) => true,
+ MethodName::Func(_) => false,
+ }
+ }
+}
+
bitflags! {
pub struct LinkingDirective: u8 {
const NONE = 0b000;
@@ -1128,7 +1137,7 @@ impl SetpData { state.errors.push(PtxError::NonF32Ftz);
None
}
- _ => None
+ _ => None,
};
let type_kind = type_.kind();
let cmp_op = if type_kind == ScalarKind::Float {
|