Expand description
Loop transpilation helpers for CUDA code generation.
This module provides utilities for transpiling Rust loop constructs to their CUDA C equivalents.
§Supported Loop Types
for i in start..end→for (int i = start; i < end; i++)for i in start..=end→for (int i = start; i <= end; i++)while condition→while (condition)loop→while (true)orfor (;;)
§Control Flow
break→break;continue→continue;break 'label→ Not yet supported (would require goto)
Structs§
- Range
Info - Information about a parsed range expression.
Enums§
- Loop
Pattern - Represents different loop patterns that can be transpiled.
Functions§
- extract_
loop_ var - Extract the loop variable name from a for loop pattern.
- infer_
loop_ var_ type - Determine the appropriate CUDA type for a loop variable.
- is_
range_ expr - Check if an expression is a simple range (start..end or start..=end).