Sample
Dorn/cuda/88
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.274 | 0–1; higher is more readable | 77.2Δ 12.8 |
| Scalabrino | 0.613 | 0–1; higher is more readable | 60.9Δ 29.1 |
| Dorn | 0.344 | 0–1; higher is more readable | 27.9Δ 62.1 |
| Mi | 0.693 | 0–1; higher is more readable | 82.2Δ 7.8 |
| LLOC | 1 | Logical lines; fewer is more readable | 97.9Δ 7.9 |
| DeepSeek V4 Pro | 9.33 | 0–20; mean of three runs | 37.2Δ 52.8 |
| GPT-6.1 Sol | 16.67 | 0–20; mean of three runs | 73.8Δ 16.2 |
| BTTF | 0.298 | 0–1; higher is more readable | 15.3Δ 74.7 |
| Human | 3.94 | 1–5; original rating | 90.0 |
Views
Select the downloaded ZIP or its extracted folder. Files stay in your browser.
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 4.745 | −7.118 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 203.901 | −6.729 |
| Source linesThe number of non-empty source lines. | 10 | +4 |
Intercept 8.87 + feature contributions = -0.977 (log-odds).
Score = sigmoid(-0.977) = 0.274.
| Score | 0.613 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.381 | −2.76 |
| Identifier layout (horizontal)How rapidly the visual pattern of identifier characters changes from left to right. It measures spatial frequency, not the meaning of the names. | 33.909 | +2.229 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 11 | +0.647 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 9.886 | −0.272 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 34 | −0.256 |
Intercept 0.07 + feature contributions = -0.646 (log-odds).
Score = sigmoid(-0.646) = 0.344.
| Score | 0.693 |
|---|
| Score | 1 |
|---|
Run 1
The code is a short, well-structured header snippet with clear intent. It defines a single MAX macro followed by a block of related CUDA/utility includes, logically grouped together. There is no nesting, minimal length, and one action per line, making it highly readable. The only minor deductions are for the commented-out include and the slightly ambiguous '_tt_common.h' custom header name, but overall it is very clean and easy to understand.
Run 2
The code is a mix of macro and include statements with no surrounding context, making its intent unclear. It has a flat structure with no nesting, but the reading flow is disrupted by the macro definition appearing before the includes. The macro `MAX` is simple but uses a potentially unsafe ternary without guards. Includes are disorganized, mixing CUDA utility headers with standard-like vectors and a custom header. A commented-out include adds confusion. The code is concise but lacks logical organization and clarity of purpose, resulting in low readability.
Run 3
This code is mostly unreadable as a standalone unit. It begins with a macro definition before any includes, disrupting logical organization. The macro itself is unsafe (evaluates arguments twice, lacks parentheses around parameters), which obscures intent and risks subtle bugs. Several headers appear CUDA-specific but are mixed with unclear custom headers like '_tt_common.h'. There is commented-out code without explanation, adding noise. The structure lacks a clear purpose or entry point; it reads like a fragment pasted from a larger file. Nesting is not an issue, but clarity of intent, logical organization, and reading flow are very poor. Action granularity is acceptable only because there are few actions. Overall, it fails to communicate what it does or why, making it difficult for a reader to understand or safely modify.
Run 1
Code Structure: The snippet is simple, but placing includes before the macro and removing the commented-out include would improve organization. Nesting: There is no control-flow nesting; the macro's parentheses are easy to follow. Clarity of intent: MAX clearly indicates its purpose, although the dependency list provides little broader context. Code length: Very concise, with only minor clutter from extra blank lines and the commented-out include. Action granularity: Each directive occupies its own line. Reading flow: Straightforward overall, though inconsistent spacing and the macro appearing before the includes slightly disrupt conventional flow.
Run 2
Code Structure: The macro and includes are separated, but placing includes first and removing the commented-out include would improve organization. Nesting: No nested control flow; the ternary expression is straightforward. Clarity of intent: MAX clearly indicates its purpose, though the include dependencies provide little context about the broader code. Code length: Very concise, with minor unnecessary blank lines and a stale comment. Action granularity: Each directive occupies its own line. Reading flow: Easy to scan, though inconsistent spacing in the macro and the commented-out include slightly interrupt the flow.
Run 3
Code Structure: The macro and includes are simply organized, though placing includes first and removing the commented-out include would improve consistency. Nesting: No nesting makes the snippet easy to scan. Clarity of intent: The MAX macro and dependencies are recognizable, but the snippet provides little context about their purpose; parenthesizing each macro argument would also make its behavior clearer and safer. Code length: Very concise, with only minor clutter from extra blank lines and the commented include. Action granularity: Each directive occupies its own line. Reading flow: Mostly natural, although the leading macro and redundant whitespace slightly interrupt the flow.