Sample

Dorn/cuda/7

Human rating uses the original dataset scale.

DatasetDorn
Human2.69
Lines50

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
3.3Δ 13.9
Scalabrino0.5590–1; higher is more readable
51.9Δ 34.7
Dorn0.1890–1; higher is more readable
15.3Δ 1.9
Mi0.1920–1; higher is more readable
19.5Δ 2.2
LLOC29Logical lines; fewer is more readable
13.5Δ 3.8
DeepSeek V4 Pro6.670–20; mean of three runs
20.9Δ 3.6
GPT-6.1 Sol110–20; mean of three runs
14.2Δ 3.1
BTTF0.2030–1; higher is more readable
5.6Δ 11.7
Human2.691–5; original rating
17.3

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.2932.893−96.785
Source linesThe number of non-empty source lines.50+20
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.399−8.098

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

Score0.559

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.119−1.375
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.119+1.116
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.202−1.017
Indentation frequencyHow rapidly indentation changes from line to line.47+0.889
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.51−0.769
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.47−0.658
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.49.817+0.287

Intercept 0.07 + feature contributions = -1.459 (log-odds).
Score = sigmoid(-1.459) = 0.189.

Score0.192
Score29
Run 1

This CUDA kernel exhibits significant readability issues. Macros with commented-out alternatives create ambiguity about matrix orientation. The use of macros like SVH, SH, and SVW obscures data access patterns, making the code harder to follow. Multiple commented-out defines add confusion. Nested conditionals and loops reach three levels deep, increasing cognitive load. Variable names like SH and SVW are cryptic and don't convey meaning. The code performs multiple actions per line in some cases (conditional assignments, index calculations). Magic numbers like 32 and 16 appear without explanation. The matrix indexing macros obfuscate whether accesses are row-major or column-major. No comments explain the algorithm's purpose or the shared memory tiling strategy. The reading flow jumps between thread coordinate setup, boundary checks, shared memory loads, and accumulation loops without clear separation. While the code is concise in some respects, this conciseness comes at the cost of clarity. The kernel's purpose remains unclear without external context, and the macro-heavy approach makes debugging and maintenance difficult.

Run 2

The code is difficult to read due to macro obfuscation, unclear variable names, and mixed indexing patterns. Macros like SVH, SH, and SVW hide matrix access and alternate between row-major and column-major layouts, making intent ambiguous. Several commented-out macros suggest uncertainty in indexing, further confusing readers. The kernel mixes shared memory organization, thread indexing, and boundary checks in a way that obscures the algorithm. While the loop structure is flat and actions are generally one per line, the excessive use of raw thread arithmetic (threadIdx.x + 16, n << 4) and unexplained constants reduces clarity. The code assumes deep familiarity with GPU tile-based matrix operations and lacks comments explaining the tiling strategy or shared memory layout. Although it is not excessively long, the poor naming, cryptic macros, and implicit layout assumptions make it hard to follow. Overall, the code is functionally compact but poorly communicates its purpose or data flow, earning a low readability score.

Run 3

The code is difficult to read due to heavy use of macros for array indexing, which obscures the actual memory access patterns and makes the logic hard to follow. The structure relies on CUDA-specific constructs and shared memory management, but the nested conditionals and index arithmetic add complexity. Intent is partially clear—it appears to be a matrix update kernel—but variable names like SVH, SVW, SH, WH are cryptic. Nesting is moderate (two levels within loops), but conditional branches with manual boundary checks increase cognitive load. Code length is reasonable for a CUDA kernel, but action granularity is poor: several operations (index calculation, division, conditional assignment) are packed into single statements. Reading flow is disrupted by macro indirection and non-obvious thread/block mapping. Overall, the code is maintainable only by someone deeply familiar with the original design; readability for general review is low.

Run 1

Code Structure: The kernel has logically grouped initialization, tile loading, synchronization, and accumulation, but indexing macros obscure layout and the snippet ends without closing the function. Nesting: Moderate loop-and-conditional nesting remains manageable, although ternaries add complexity. Clarity of intent: CUDA operations suggest tiled matrix computation, but abbreviated names, unexplained constants (32 and 16), and absent algorithm comments make the update purpose difficult to follow. Code length: Reasonably concise, though repeated boundary handling and commented-out macro alternatives add clutter. Action granularity: Most lines perform one assignment or operation, with some dense indexing and arithmetic expressions. Reading flow: Blank lines and indentation support sequential reading, but transposed macro access, bit-shift indexing, and reliance on external definitions interrupt comprehension.

Run 2

Code Structure: Organized into shared-memory loading and accumulation phases, but the snippet ends without closing the kernel or showing the update. Nesting: Moderate loop and conditional nesting is manageable. Clarity of intent: CUDA operations are recognizable, but abbreviated names, undocumented indexing macros, transposed access, and magic constants obscure the mathematical purpose. Code length: Fairly compact, though repeated zero assignments and commented-out macro alternatives add clutter. Action granularity: Generally one operation per line, with ternary expressions making some assignments denser. Reading flow: Loading, synchronization, accumulation, and synchronization follow a logical sequence, but inconsistent spacing, bit-shift arithmetic, and missing explanatory comments make index calculations harder to follow.

Run 3

Code Structure: The kernel has logically separated initialization, tile loading, synchronization, and accumulation, but the snippet ends without completing the function or showing output updates. Nesting: Moderate nesting of loops and conditionals is manageable. Clarity of intent: CUDA operations suggest tiled matrix computation, but terse names, undocumented dimensions, indexing macros, and unexplained constants obscure the algorithm. Code length: Mostly concise, although repeated boundary-handling assignments and commented-out macro alternatives add clutter. Action granularity: Most lines perform one action; long ternary assignments combine indexing, boundary checks, and arithmetic, increasing reading effort. Reading flow: Blank lines and consistent indentation support sequential reading, but transposed macro indexing, mixed use of 16 and bit shifts, and missing explanatory comments require readers to mentally reconstruct data layout and thread responsibilities.