Skip to main content

Module type

Module type 

Source
Expand description

PTX type definitions - Abstract Syntax Tree (AST) nodes.

All types are re-exported at the top level for easy access:

  • ptx_parser::r#type::Module - Root module type
  • ptx_parser::r#type::Instruction - Instruction with label/predicate
  • ptx_parser::r#type::Operand - Operand types
  • etc.

Instruction variants are under a separate namespace:

  • ptx_parser::r#type::instruction::Inst - Enum of all instruction variants
  • Individual instruction modules under ptx_parser::r#type::instruction::*

Modules§

instruction

Structs§

AddressSizeDirective
Structured representation of the .address_size directive.
AliasFunctionDirective
Alias directive relating one function symbol to another.
BranchTargetsDirective
Structured representation of a .branchtargets directive.
CallPrototypeDirective
Structured representation of a .callprototype directive.
CallTargetsDirective
Structured representation of a .calltargets directive.
DwarfDirective
Raw dwarf directive emitted by the compiler (e.g. @@dwarf).
EntryFunctionDirective
A PTX device function declared with the .func directive.
FileDirective
Structured representation of the .file directive.
FuncFunctionDirective
A PTX kernel declared with the .entry directive.
FunctionBody
Statements contained within a PTX function body.
FunctionSymbol
Function symbol
Immediate
Immediate value representing a constant literal in PTX assembly.
Instruction
Represents a complete instruction with optional label and predicate guard Format: [label:] [@{!}pred] instruction
Label
Label name (e.g., L__label_1).
LocationDirective
Structured representation of a .loc directive inside a PTX function.
LocationInlinedAt
Module
A full PTX module containing directives and function definitions.
PragmaDirective
Structured representation of a .pragma directive.
Predicate
Predicate guard for conditional instruction execution
PredicateRegister
Predicate register names (e.g., %p0).
RegisterDirective
Directive that declares a register variable inside a function body.
RegisterOperand
Register operand starting with % (e.g., %r1).
RegisterTarget
SectionDirective
Structured representation of a .section directive inside a function body.
TargetDirective
Structured representation of the .target directive.
TexHandler2
Texture handler with 2 operands, e.g. [%r1, %r2]
TexHandler3
Texture handler with optional sampler operand, e.g. [tex, coords] or [tex, sampler, coords]
TexHandler3Optional
Texture handler with optional sampler operand, e.g. [tex, coords] or [tex, sampler, coords]
VariableDirective
Module-scoped variable declaration shared by .tex, .shared, .global, and .const.
VariableSymbol
Variable symbol
VersionDirective
Structured representation of the .version directive.

Enums§

AddressBase
Base location referenced by an address expression.
AddressOffset
Specific adjustment applied within a displacement term.
AddressOperand
Representation of an address operand.
AddressSize
Address size options for the .address_size directive.
AttributeDirective
Axis
Axis component for 3-component special registers (x/y/z)
CodeLinkage
DataLinkage
DataType
DwarfDirectiveKind
EntryFunctionHeaderDirective
Directive tokens that may decorate a PTX function header.
FuncFunctionHeaderDirective
Directive tokens that may decorate a PTX function header.
FunctionDim
Dimension triplet used by several function header directives.
FunctionStatement
Nested statement block enclosed in braces. Executable items that appear within a function body.
GeneralOperand
GlobalInitializer
Structured representation of a global variable initialiser.
InitializerValue
ModuleDebugDirective
Debugging directives defined by the PTX ISA.
ModuleDirective
Module-level directives recognised by the parser.
ModuleInfoDirectiveKind
Directives that apply to the PTX module as a whole.
ModuleVariableDirective
Module-level declarations that reserve storage in a specific address space.
Operand
ParamStateSpace
Address space qualifiers for parameters.
ParameterDirective
Parameters, used in function declarations and calls, e.g., .param .b32 p.
PragmaDirectiveKind
SectionEntry
Sign
SpecialRegister
StatementDirective
Directive that applies to individual statements.
StatementSectionDirectiveLine
TargetString
Target specifiers used in the .target directive.
VariableModifier
Qualifiers left on module variable declarations (e.g. .v4).
VectorOperand