Sample

Dorn/cuda/25

Human rating uses the original dataset scale.

DatasetDorn
Human1.83
Lines29

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
12.8Δ 10.9
Scalabrino0.190–1; higher is more readable
14.3Δ 12.4
Dorn0.370–1; higher is more readable
30.6Δ 28.7
Mi0.0910–1; higher is more readable
10.9Δ 8.9
LLOC17Logical lines; fewer is more readable
41.2Δ 39.3
DeepSeek V4 Pro14.330–20; mean of three runs
69.9Δ 68.0
GPT-6.1 Sol160–20; mean of three runs
66.0Δ 64.1
BTTF0.2380–1; higher is more readable
8.4Δ 6.4
Human1.831–5; original rating
1.9

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.1800.688−59.423
Source linesThe number of non-empty source lines.29+11.6
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.473−8.209

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

Score0.19

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.116+1.067
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.118−0.204
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.26−0.176
Indentation frequencyHow rapidly indentation changes from line to line.20−0.045
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.29+0.01
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.28.863−0.006

Intercept 0.07 + feature contributions = -0.533 (log-odds).
Score = sigmoid(-0.533) = 0.37.

Score0.091
Score17
Run 1

The code is moderately readable due to consistent use of CUDA_SAFE_CALL wrappers and logical grouping of operations (symbol binding, texture binding, kernel launch). Each operation is on its own line, which helps granularity. However, line lengths are excessive, especially in the kernel launch and texture binding calls, reducing readability. The variable names are very long but descriptive. The code lacks comments explaining the purpose of the bindings and kernel launch. There is inconsistent indentation (some lines use spaces, others tabs), which disrupts reading flow. The #ifndef NDEBUG debug print is useful but adds complexity. Overall it is structured but verbose, with minor formatting inconsistencies.

Run 2

The code is logically organized into clear sections (symbol binding, texture binding, kernel launch), and most lines follow one action per line. However, readability suffers from several issues: inconsistent indentation (tabs vs spaces), very long variable and function names that obscure intent, and multiple actions on some lines. The macro CUDA_SAFE_CALL improves consistency but adds visual noise. The debug block interrupts flow between kernel launch and synchronization. Some operations like memset and grid calculation are clear, but the deeply technical CUDA context assumes strong domain knowledge. Overall, the structure is sound but the naming conventions and inconsistent formatting reduce clarity.

Run 3

The code demonstrates good structure with logical grouping of operations (symbol binding, texture binding, kernel launch). It uses consistent error checking via CUDA_SAFE_CALL macros and has clear comments separating sections. However, readability is reduced by long variable names without abbreviations, inconsistent indentation (tabs vs spaces), and awkward line breaks. The kernel launch parameters and grid/block calculations could benefit from more descriptive naming or comments explaining the 'reg' prefix and 'PW' suffix. The debug block adds value but interrupts the flow. Overall, the code is reasonably readable but could be improved with better naming conventions and consistent formatting.

Run 1

1. Code Structure: Symbol setup, texture binding, initialization, launch configuration, and execution form logical groups, though the final unmatched brace suggests an incomplete excerpt. 2. Nesting: Flat code with only a conditional debug section makes scanning easy. 3. Clarity of intent: CUDA calls and descriptive resource names convey purpose, but B1/G1 are vague and abbreviated identifiers require domain knowledge. 4. Code length: Concise overall; repeated setup calls are straightforward, although long identifiers and the debug statement increase visual load. 5. Action granularity: Each statement generally performs one operation, with clear separation between configuration and execution. 6. Reading flow: The setup-to-launch-to-synchronization sequence is natural. Inconsistent indentation, tight argument spacing, and missing section labels around launch configuration slightly reduce readability.

Run 2

Code Structure: Clearly grouped into symbol setup, texture binding, gradient initialization, launch configuration, and execution, though the final closing brace lacks its surrounding context. Nesting: Flat execution with only a simple conditional compilation block. Clarity of intent: CUDA calls and section comments communicate the workflow, but B1 and G1 are vague, while other identifiers are cumbersome. Code length: Reasonably concise; repeated binding calls are explicit rather than unnecessarily elaborate. Action granularity: Each statement performs one primary action, making individual operations easy to inspect. Reading flow: The setup-to-launch sequence is natural, but inconsistent indentation, tight argument spacing, and long lines reduce scanning ease.

Run 3

Code Structure: Clearly grouped symbol binding, texture binding, initialization, launch configuration, and execution, though the closing brace lacks surrounding context. Nesting: Flat control flow with only a simple conditional compilation block. Clarity of intent: CUDA calls and section comments make the workflow understandable, but names such as B1 and G1 are vague, while configuration identifiers are cumbersome. Code length: Reasonably concise; repeated binding calls are appropriate, although the debug statement is long. Action granularity: Each statement performs one primary action, with error-checking wrappers applied consistently. Reading flow: The setup-to-launch-to-debug sequence is natural, but mixed indentation, sparse operator spacing, and inconsistent alignment reduce visual consistency.