Sample

Dorn/cuda/56

Human rating uses the original dataset scale.

DatasetDorn
Human2.12
Lines9

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.0080–1; higher is more readable
66.9Δ 61.4
Scalabrino0.4980–1; higher is more readable
40.7Δ 35.3
Dorn0.1170–1; higher is more readable
8.4Δ 2.9
Mi0.4390–1; higher is more readable
43.7Δ 38.3
LLOC3Logical lines; fewer is more readable
88.6Δ 83.1
DeepSeek V4 Pro12.670–20; mean of three runs
57.5Δ 52.1
GPT-6.1 Sol15.330–20; mean of three runs
58.6Δ 53.2
BTTF0.3460–1; higher is more readable
19.2Δ 13.8
Human2.121–5; original rating
5.4

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.277.326−9.152
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.447−8.17
Source linesThe number of non-empty source lines.9+3.6

Intercept 8.87 + feature contributions = -4.852 (log-odds).
Score = sigmoid(-4.852) = 0.008.

Score0.498

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.116−1.248
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.10+0.682
Indentation frequencyHow rapidly indentation changes from line to line.8−0.46
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.135−0.373
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.8.838−0.286

Intercept 0.07 + feature contributions = -2.022 (log-odds).
Score = sigmoid(-2.022) = 0.117.

Score0.439
Score3
Run 1

The code has a clear single-purpose structure with one CUDA kernel launch and safe error checking, but readability is reduced by inconsistent spacing, unclear variable naming (G1, B1), and a verbose debug message format. The nesting is minimal and action granularity is acceptable, though the printf spans multiple lines unnecessarily. The preprocessor conditional adds minor complexity but is standard practice. Overall, the intent is understandable but presentation could be more polished.

Run 2

The code snippet is short and each line performs a single action, but readability is hampered by unclear naming and lack of context. The function and kernel names are very long and cryptic, making intent hard to discern. The dense preprocessor conditional and printf statement with many format specifiers reduce clarity. The code structure is flat, which is good, but the verbose naming and error checking pattern are not intuitive. Overall, the code is understandable to someone familiar with CUDA, but not immediately clear to a general reader.

Run 3

The code snippet is concise and well-structured for what it does: launching a CUDA kernel, synchronizing, and conditionally printing debug information. The use of a macro for safe CUDA calls improves readability by hiding error-checking boilerplate. Nesting is minimal with only one conditional block, and intent is clear—each line performs a distinct action. However, the score is limited by the lack of context: variable names like G1 and B1 are generic, and the surrounding function or purpose is not visible. The verbose debug output is useful but could be more readable if split or formatted. Overall, the reading flow is straightforward and natural for CUDA code, but slightly terse due to undefined naming conventions and macro reliance.

Run 1

Code Structure: The kernel launch, synchronization, and conditional diagnostic output are logically grouped, although the unmatched closing brace indicates an incomplete excerpt. Nesting: The code is effectively flat, with only a compile-time verbosity guard. Clarity of intent: CUDA operations and verbose logging make the purpose apparent, but G1 and B1 are opaque names and the kernel identifier is cumbersome. Code length: The snippet is concise; the diagnostic format string is long but useful. Action granularity: Each main operation occupies a separate statement, though error retrieval and formatting are combined within printf. Reading flow: Execution proceeds naturally from launch to synchronization to diagnostics, but dense argument spacing and the fragmentary context slightly hinder readability.

Run 2

Code Structure: The kernel launch, synchronization, and conditional diagnostic output are logically organized, although the unmatched closing brace indicates an incomplete excerpt. Nesting: Flat, with only a compile-time verbosity guard. Clarity of intent: The descriptive kernel name and CUDA calls make the purpose apparent, but G1 and B1 are cryptic variable names. Code length: Concise, though the diagnostic format string is lengthy. Action granularity: Each statement performs one main action; the diagnostic call combines error retrieval and configuration reporting. Reading flow: Execution naturally progresses from launch to synchronization to logging, but inconsistent spacing, leading indentation, and missing surrounding context slightly hinder readability.

Run 3

Code Structure: The kernel launch, synchronization, and optional diagnostic output are logically organized, though the unmatched closing brace indicates an incomplete excerpt. Nesting: The code is flat, with only a compile-time verbosity guard. Clarity of intent: The descriptive kernel name and diagnostic message communicate purpose, but G1 and B1 are cryptic and the pointer dereference requires context. Code length: The snippet is concise; the long diagnostic line is justified but slightly harder to scan. Action granularity: Each statement performs one main action, although error retrieval is embedded in printf. Reading flow: Execution proceeds naturally from launch to synchronization to logging, with minor readability friction from sparse argument spacing and inconsistent indentation.