Sample

Dorn/cuda/34

Human rating uses the original dataset scale.

DatasetDorn
Human2.17
Lines49

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
4.3Δ 1.8
Scalabrino0.1580–1; higher is more readable
10.7Δ 4.5
Dorn0.3630–1; higher is more readable
29.7Δ 23.5
Mi0.0170–1; higher is more readable
3.8Δ 2.4
LLOC22Logical lines; fewer is more readable
26.7Δ 20.6
DeepSeek V4 Pro14.330–20; mean of three runs
69.9Δ 63.8
GPT-6.1 Sol15.670–20; mean of three runs
61.6Δ 55.4
BTTF0.2240–1; higher is more readable
7.1Δ 1.0
Human2.171–5; original rating
6.1

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.2812.62−92.816
Source linesThe number of non-empty source lines.49+19.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.023−7.535

Intercept 8.87 + feature contributions = -71.882 (log-odds).
Score = sigmoid(-71.882) = 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.121.96−1.501
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.122+1.164
Indentation frequencyHow rapidly indentation changes from line to line.46+0.854
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.50−0.734
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.46−0.635
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.48.87+0.273
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.103−0.055

Intercept 0.07 + feature contributions = -0.563 (log-odds).
Score = sigmoid(-0.563) = 0.363.

Score0.017
Score22
Run 1

The code has a relatively flat structure and consistent formatting, but readability is damaged by long function declarations and excessive indentation in the parameter list. Symbol binding and CUDA calls are grouped logically, making the purpose clear, but there is little separation between setup phases. Several lines mix multiple actions (e.g., computing NMI then using it in the same statement). The kernel launch and grid configuration are concise, but variable naming is verbose without adding much clarity. The debug block is helpful but adds clutter. Overall, it is understandable to someone familiar with CUDA but not welcoming to a general reader.

Run 2

The code is generally readable with a clear, linear structure and logical organization: variable setup, symbol binding, texture binding, kernel launch, and debug output. Nesting is minimal, and intent is mostly clear. Each line performs one main action, contributing to good action granularity. However, readability is slightly reduced by very long function and variable names, dense lines like the NMI calculation combining multiple operations, and the debug printf spanning multiple lines. The mixed use of const and non-const local variables, redundant CUDA_SAFE_CALL repetitions, and lack of explanatory comments for GPU-specific setup also add minor friction. Overall, the function is straightforward to follow for someone familiar with CUDA, but could be improved with more spacing, comments, and simplified expressions.

Run 3

The code is structured logically, progressing from setup to kernel launch. Nesting is minimal, and the overall flow is understandable for CUDA code. However, readability suffers from inconsistent indentation/alignment, excessive horizontal length in function signatures and kernel launches, and the use of 'magic numbers' like 0 in cudaBindTexture. Multiple actions are sometimes combined on a single line, reducing clarity. The intent is clear for an experienced CUDA developer, but less so for a general audience due to the dense GPU-specific syntax and lack of explanatory comments.

Run 1

Code Structure: Logically grouped into constant preparation, symbol binding, texture binding, initialization, and kernel execution, with helpful section comments. Nesting: The function is flat, with only a conditional debug block, making control flow easy to follow. Clarity of intent: The function and API calls indicate its purpose, but specialized abbreviations, opaque names such as B1 and G1, an unused resultImage parameter, and unexplained entropy indices reduce clarity. Code length: Reasonably concise for the GPU setup performed, though the long parameter list and verbose identifiers increase reading effort. Action granularity: Most statements perform one action per line; the packed entropy construction and debug output are denser. Reading flow: Execution follows a natural setup-to-launch sequence, but inconsistent indentation, tight operator spacing, and long lines interrupt scanning.

Run 2

Code Structure: Logically organized into initialization, symbol copying, texture binding, buffer clearing, and kernel execution, with useful section comments. Nesting: Essentially flat, making control flow easy to follow. Clarity of intent: Descriptive function and resource names communicate the GPU gradient computation, but abbreviations, B1/G1 names, entropy indices, and unexplained binning arithmetic require domain knowledge. Code length: Reasonably concise, although the lengthy parameter list and repeated CUDA calls add visual bulk. Action granularity: Most statements perform one action per line; compact argument lists slightly reduce scanability. Reading flow: Execution follows a natural setup-to-launch sequence, but inconsistent indentation, spacing, long lines, and embedded debug preprocessing interrupt readability.

Run 3

Code Structure: Initialization, symbol copying, texture binding, output clearing, and kernel execution form logical sections, aided by comments. Nesting: The function is flat, with only a conditional debug block. Clarity of intent: Descriptive function and resource names communicate GPU gradient computation, but domain-specific abbreviations, entropy array indices, and generic B1/G1 names require interpretation. Code length: Reasonably concise for the setup work, although the long parameter list and repetitive CUDA calls add visual weight. Action granularity: Most statements perform one action, making execution steps easy to distinguish. Reading flow: The sequence naturally progresses from setup to execution and diagnostics, but inconsistent indentation, crowded argument lists, lengthy identifiers, and mixed spacing interrupt scanning.