Sample

Dorn/cuda/67

Human rating uses the original dataset scale.

DatasetDorn
Human2.3
Lines10

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
41.2Δ 32.9
Scalabrino0.1580–1; higher is more readable
10.1Δ 1.7
Dorn0.1030–1; higher is more readable
7.0Δ 1.4
Mi0.1280–1; higher is more readable
13.4Δ 5.0
LLOC7Logical lines; fewer is more readable
67.7Δ 59.3
DeepSeek V4 Pro150–20; mean of three runs
77.3Δ 68.9
GPT-6.1 Sol150–20; mean of three runs
52.8Δ 44.4
BTTF0.1290–1; higher is more readable
2.2Δ 6.1
Human2.31–5; original rating
8.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.610.496−20.146
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.274−7.911
Source linesThe number of non-empty source lines.10+4

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

Score0.158

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.115.909−1.244
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
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
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.9.795−0.273
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.10+0.191
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.102−0.046

Intercept 0.07 + feature contributions = -2.162 (log-odds).
Score = sigmoid(-2.162) = 0.103.

Score0.128
Score7
Run 1

The code is highly readable due to its flat structure, clear intent, and consistent action granularity. Each CUDA API call is on its own line, making it easy to identify individual operations. The texture binding calls are logically grouped at the top, followed by a memory initialization and kernel launch configuration. Variable names are descriptive, and the use of constants for grid and block dimensions adds clarity. Minor deductions: the long variable names slightly reduce line-by-line scanning speed, and the repeated 'CUDA_SAFE_CALL' wrapper adds some visual noise, but overall the code is very clean and maintainable.

Run 2

The code binds textures and sets up CUDA grid/block dimensions, but readability suffers from several issues. The structure is logical but dense: multiple bind calls are packed together with long, repetitive function and variable names. Nesting is flat, which is good, but clarity of intent is reduced by heavy CUDA-specific boilerplate and the very long identifiers. Code length is concise but at the expense of readability; lines are overloaded with operations and constants. Action granularity is low: each line performs one macro call, but the macro hides the underlying function call, making it harder to see what happens. Reading flow is natural in sequence, but the repeated 'CUDA_SAFE_CALL' wrapper obscures the essential operations. The code would benefit from line breaks, descriptive comments, or abstraction of the setup steps.

Run 3

The code shows reasonable structure with CUDA API calls grouped logically for texture binding, followed by memory initialization and kernel launch configuration. Nesting is minimal and flat. Variable names are mostly descriptive, though 'B1' and 'G1' are overly abbreviated and would benefit from more meaningful names. The code is concise but includes one long line for grid dimension calculation that could be split for readability. Action granularity is generally one operation per line, which is good. Reading flow is natural, grouping related operations together. The main weaknesses are the cryptic grid/block variable names and the overly dense grid calculation expression.

Run 1

Code Structure: Logically groups texture binding, gradient initialization, and kernel launch configuration. Nesting: Flat, with no nested control flow. Clarity of intent: CUDA operations and descriptive variable names convey purpose, but B1 and G1 are vague and the long grid-size identifier is cumbersome. Code length: Concise overall, though repeated casts and lengthy identifiers make the grid calculation harder to scan. Action granularity: Each statement performs one primary action. Reading flow: Operations follow a natural setup sequence, but inconsistent indentation and tight spacing around arithmetic operators and arguments reduce visual consistency.

Run 2

Code Structure: Operations are logically grouped into texture binding, gradient initialization, and launch configuration. Nesting: The code is flat with no nested control flow. Clarity of intent: CUDA calls and descriptive resource names convey purpose, but B1 and G1 are opaque, while the grid-size identifier is cumbersome. Code length: The snippet is concise, although long expressions and repeated naming reduce scanability. Action granularity: Each statement performs one main action; the wrapped grid-size calculation remains a single coherent operation. Reading flow: Execution proceeds naturally from setup to configuration, with blank lines separating stages. Mixed indentation, inconsistent spacing around operators and arguments, C-style casts, and the absence of explanatory context slightly impair readability.

Run 3

Code Structure: The sequence is logically organized: bind textures, initialize gradient memory, then configure kernel dimensions. Nesting: The code is flat, with no nested control flow. Clarity of intent: CUDA calls and descriptive resource names convey the operations, but B1 and G1 are vague, and the grid-size calculation lacks explanation. Code length: The snippet is concise, although repeated long identifiers make the calculation harder to scan. Action granularity: Each statement performs one primary action. Reading flow: Execution order is natural and blank lines separate stages, but inconsistent indentation, tight operator spacing, and verbose casts slightly disrupt readability.