pub struct Immediate {
pub value: String,
pub span: Span,
}Expand description
Immediate value representing a constant literal in PTX assembly.
Supports all PTX constant formats:
Integer literals (with optional U suffix for unsigned):
- Hexadecimal:
0x1234,0x1234U,0XABCD - Octal:
0777,0777U,0123 - Binary:
0b1010,0b1010U,0B0011 - Decimal:
42,42U,0,0U,123
Floating-point literals:
- Decimal float:
3.14,2.5 - Scientific notation:
1.5e10,3.2E-5,1e3 - Hex float (single-precision, 32-bit):
0f3f800000(8 hex digits after0f) - Hex float (double-precision, 64-bit):
0d3ff0000000000000(16 hex digits after0d)
Fields§
§value: StringThe literal value as a string (includes prefix, digits, and optional ‘U’ suffix)
span: SpanImplementations§
Trait Implementations§
Source§impl PtxParser for Immediate
impl PtxParser for Immediate
Source§fn parse() -> impl Fn(&mut PtxTokenStream<'_>) -> Result<(Self, Span), PtxParseError>
fn parse() -> impl Fn(&mut PtxTokenStream<'_>) -> Result<(Self, Span), PtxParseError>
Returns a parser function that can parse an instance of
Self.Source§impl PtxUnparser for Immediate
impl PtxUnparser for Immediate
Source§impl TreeDisplay for Immediate
impl TreeDisplay for Immediate
Source§fn tree_display(&self, f: &mut TreeFormatter, source: &str) -> Result
fn tree_display(&self, f: &mut TreeFormatter, source: &str) -> Result
Display this node in tree format. Read more
impl Eq for Immediate
impl StructuralPartialEq for Immediate
Auto Trait Implementations§
impl Freeze for Immediate
impl RefUnwindSafe for Immediate
impl Send for Immediate
impl Sync for Immediate
impl Unpin for Immediate
impl UnwindSafe for Immediate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more