Sample

Dorn/cuda/101

Human rating uses the original dataset scale.

DatasetDorn
Human2.99
Lines30

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
37.0Δ 8.4
Scalabrino0.440–1; higher is more readable
35.3Δ 6.6
Dorn0.3420–1; higher is more readable
27.6Δ 1.1
Mi0.3890–1; higher is more readable
37.6Δ 8.9
LLOC11Logical lines; fewer is more readable
57.0Δ 28.3
DeepSeek V4 Pro7.330–20; mean of three runs
24.8Δ 3.9
GPT-6.1 Sol13.330–20; mean of three runs
34.7Δ 6.0
BTTF0.4270–1; higher is more readable
28.1Δ 0.6
Human2.991–5; original rating
28.7

Views

Download official ZIP ↗

Select the downloaded ZIP or its extracted folder. Files stay in your browser.

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(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.960.709−31.703
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.5.231−7.847

Intercept 8.87 + feature contributions = -18.68 (log-odds).
Score = sigmoid(-18.68) = 0.

Score0.44

Feature contributions

FeatureValueContribution
(log-odds)
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.125−1.629
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.125+1.212
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.119−0.217
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.24−0.13
Indentation frequencyHow rapidly indentation changes from line to line.24+0.093
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.31−0.061
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.29.825+0.007

Intercept 0.07 + feature contributions = -0.655 (log-odds).
Score = sigmoid(-0.655) = 0.342.

Score0.389
Score11
Run 1

This code is largely unreadable due to missing context and inconsistent naming. It appears to be a CUDA kernel fragment, but the function signature, variable declarations, and surrounding logic are absent. The structure is disjointed—starting with a synchronization call and a closing brace, which confuses the reader. Nesting is minimal but only because the code is fragmented. Intent is unclear: variables like 'idnx', 'idny', 'tx', 'ty', 'wC', 'hC', and 'Csub' are not defined in the snippet. The code length is short but insufficient to understand the full algorithm. Action granularity is mixed, with the final write operation compressing multiple operations into one line. Reading flow is disorganized, starting mid-function and ending with an external launcher. Without definitions and surrounding logic, the code fails to convey its purpose effectively.

Run 2

The code snippet is moderately readable but suffers from several issues. The structure is somewhat logical (kernel launch, thread blocks, synchronization), but the function names and variable names are cryptic ('idnx', 'Csub', 'wC'). The nesting is low, which helps, but the intent is unclear without context—what are A and B? Why is sqrt applied? The code length is neither concise nor bloated, but the action granularity is uneven: multiple operations occur in single lines (e.g., index calculation with BLOCK_SIZE, by, bx). Reading flow is disrupted by an unexplained comment block and abrupt variable usage. The synchronization comment helps, but overall the code lacks clarity for a reader unfamiliar with the underlying algorithm.

Run 3

The code shows moderate readability with clear structure around matrix operations and CUDA kernel launches. It has a logical organization with synchronization points and thread boundary checks, but suffers from cryptic variable naming (idnx, idny, Csub, uiWA, uiWB) that obscures intent. The nesting is manageable, with only 1-2 levels of depth. Action granularity is generally good with one operation per line, though the ternary calculation for block count could be clearer. The kernel's mathematical purpose (Euclidean distance) is not evident from the code itself without external context. The extern "C" wrapper and grid/block configuration are clear, but the overall readability is hindered by terse mathematical variable names and lack of explanatory comments around the distance computation logic. The code would benefit from more descriptive variable names and better documentation of the algorithmic steps.

Run 1

Code Structure: The visible code separates synchronization, result storage, and kernel launch logically, but starts mid-function, limiting context. Nesting: Shallow nesting keeps the visible logic easy to follow. Clarity of intent: Comments explain synchronization and output writes, and the launcher has a recognizable purpose; abbreviated identifiers and unexplained index arithmetic reduce clarity. Code length: Concise overall, though block-count calculations could be expressed more simply. Action granularity: Each statement generally performs one action, with declarations, calculations, and the launch on separate lines. Reading flow: Execution proceeds naturally from block calculations to launch, but inconsistent spacing, indentation, and the truncated opening interrupt readability.

Run 2

Code Structure: The visible kernel tail and launch wrapper are logically separated, but the excerpt starts mid-function, limiting context. Nesting: The shown conditional and wrapper are shallow and easy to follow. Clarity of intent: Comments explain synchronization and output writes, and the launch purpose is apparent; abbreviated names such as idnx, uiWA, and c obscure indexing and parameter meanings. Code length: The code is concise, though block-count expressions could be simplified. Action granularity: Each statement generally performs one action, with the output assignment combining indexing and a square-root calculation reasonably. Reading flow: Setup proceeds naturally from block size to grid dimensions to launch, but inconsistent spacing, indentation, and excess blank lines reduce polish.

Run 3

Code Structure: The visible code separates synchronization, result storage, and kernel launch setup logically, but starts mid-function, limiting context. Nesting: Shallow nesting makes the visible control flow easy to follow. Clarity of intent: Comments explain synchronization and output storage, and the launch wrapper has a recognizable purpose; abbreviated names such as idnx, uiWA, and Csub obscure details. Code length: The snippet is concise, though block-count calculations could be expressed more simply. Action granularity: Most lines perform a single action, with indexing arithmetic contained in assignments. Reading flow: Setup proceeds naturally from block size to grid dimensions to kernel launch, but inconsistent spacing, excess blank lines, and leading unmatched context interrupt readability.