Sample
Dorn/cuda/44
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 41.5Δ 12.0 |
| Dorn | 0.438 | 0–1; higher is more readable | 37.0Δ 7.5 |
| Mi | 0.814 | 0–1; higher is more readable | 98.3Δ 68.8 |
| LLOC | 16 | Logical lines; fewer is more readable | 43.7Δ 14.2 |
| DeepSeek V4 Pro | 7 | 0–20; mean of three runs | 22.7Δ 6.8 |
| GPT-6.1 Sol | 10.33 | 0–20; mean of three runs | 12.0Δ 17.5 |
| BTTF | 0.423 | 0–1; higher is more readable | 27.6Δ 1.9 |
| Human | 3 | 1–5; original rating | 29.5 |
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) |
|---|---|---|
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 862.221 | −28.453 |
| Source linesThe number of non-empty source lines. | 30 | +12 |
| 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.739 | −7.109 |
Intercept 8.87 + feature contributions = -14.693 (log-odds).
Score = sigmoid(-14.693) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.193 | −0.937 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 82 | +0.519 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 29 | −0.245 |
| 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. | 81.871 | +0.197 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 26 | +0.116 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 22 | +0.024 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 29.831 | +0.007 |
Intercept 0.07 + feature contributions = -0.249 (log-odds).
Score = sigmoid(-0.249) = 0.438.
| Score | 0.814 |
|---|
| Score | 16 |
|---|
Run 1
The code shows a moderately readable CUDA kernel fragment. It has a logical structure with clear variable names (dat, rec, deltaA, error, etc.) and one action per line, which aids readability. However, it lacks surrounding context, making intent ambiguous — especially the roles of vd, vr, hd, hr, and the synchronization logic. Nesting is shallow, but the conditional blocks and thread indexing introduce complexity without explanation. Code length is concise, though variable names like 'e', 'j', 'J', 's' are opaque without context. The reading flow is somewhat disorganized because the relationship between the two conditionals and the final deltaW update is not immediately clear. Overall, it is readable for someone familiar with CUDA, but less so for general audiences.
Run 2
The code is difficult to read due to unclear intent, inconsistent variable naming (e.g., vd, vr, hd, hr, dat, rec), and missing context such as function boundaries, variable declarations, and thread organization. The nesting is moderate, but the logical structure is fragmented, jumping between conditional thread operations and shared memory updates without clear separation. Multiple actions occur per line in some cases, and the reading flow is disjointed. The code appears to be part of a CUDA kernel performing matrix factorization or reconstruction error calculations, but the purpose is only guessable from context. The lack of comments, meaningful names, and a clear high-level structure significantly reduces readability.
Run 3
The code is difficult to read due to fragmented context, unclear variable names (e.g., 'dat', 'rec', 'vd', 'vr', 'hd', 'hr'), and inconsistent indentation. The logic jumps between thread-local computation and conditional host-side updates without clear separation of concerns. Nesting is shallow but the flow is disorganized—synchronization and memory access patterns are hard to follow. Variable definitions and their purpose are ambiguous, and actions are sometimes combined in non-obvious ways. The snippet appears to be part of a larger kernel, but lacks surrounding structure or comments to clarify intent. Overall readability is poor.
Run 1
Code Structure: Computation is grouped into data loading, error accumulation, synchronization, and weight updates, but the fragment begins and ends mid-block, obscuring its overall organization. Nesting: Visible conditionals are shallow, although enclosing loops and blocks are missing. Clarity of intent: The weight-update comment and error calculation help, but abbreviated identifiers such as vd, hr, I, and J make the mathematical purpose harder to interpret. Code length: The snippet is concise with little apparent redundancy. Action granularity: Most statements perform one action per line; the deltaW expression combines several operations but remains manageable. Reading flow: Whitespace separates related operations logically, and synchronization provides a clear phase boundary, but incomplete context and unexplained indexing interrupt comprehension.
Run 2
Code Structure: Recognizable phases separate error accumulation, synchronization, and weight updates, but the incomplete excerpt has unmatched closing braces and missing surrounding context. Nesting: Visible conditionals are shallow, although indentation suggests additional enclosing loops. Clarity of intent: The weight-update comment and names such as error and samples help, but abbreviations like vd, vr, hd, hr, I, and J obscure meaning. Code length: The excerpt is concise without obvious redundancy. Action granularity: Most lines perform one assignment or update, making individual operations easy to follow. Reading flow: Blank lines group related calculations naturally, but the abrupt beginning and ending, unexplained indexing, and synchronization dependencies make the overall computation harder to understand.
Run 3
Code Structure: Computation is grouped into data loading, error accumulation, synchronization, and weight updates, but the incomplete excerpt obscures enclosing logic. Nesting: Visible conditional blocks are shallow, though unmatched closing braces make the full nesting unclear. Clarity of intent: The weight-update comment and delta variables suggest the purpose, but abbreviated names such as vd, hr, I, and J require external context. Code length: The excerpt is concise without obvious redundancy, although long indexing expressions add visual complexity. Action granularity: Statements generally perform one action per line, making individual operations easy to follow. Reading flow: Blank lines separate related steps, and synchronization provides a clear phase boundary; however, starting and ending mid-block interrupts comprehension.