Sample
Dorn/cuda/64
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 4.3Δ 0.7 |
| Scalabrino | 0.158 | 0–1; higher is more readable | 10.7Δ 5.6 |
| Dorn | 0.363 | 0–1; higher is more readable | 29.7Δ 24.7 |
| Mi | 0.017 | 0–1; higher is more readable | 3.8Δ 1.3 |
| LLOC | 22 | Logical lines; fewer is more readable | 26.7Δ 21.7 |
| DeepSeek V4 Pro | 14.33 | 0–20; mean of three runs | 69.9Δ 64.9 |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs | 66.0Δ 61.0 |
| BTTF | 0.224 | 0–1; higher is more readable | 7.1Δ 2.1 |
| Human | 2.1 | 1–5; original rating | 5.0 |
Views
Select the downloaded ZIP or its extracted folder. Files stay in your browser.
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (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.
| Score | 0.158 |
|---|
Feature contributions
| Feature | Value | Contribution (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.
| Score | 0.017 |
|---|
| Score | 22 |
|---|
Run 1
The code is moderately readable with clear structure and logical organization. Function purpose is evident from the name, and operations are grouped into logical sections (symbol binding, texture binding, kernel launch). Line length is reasonable, and each line generally performs one action. However, readability is reduced by several factors: excessive indentation in the function signature makes parameter alignment visually awkward; inconsistent indentation between sections (tabs vs spaces) creates visual noise; the kernel launch grid/block setup is verbose and could be more concise; some variable names are very long and repetitive (e.g., Grid_reg_getVoxelBasedNMIGradientUsingPW). The function relies heavily on CUDA-specific operations that may be unclear without context. Overall, the code is understandable but would benefit from cleaner formatting and more concise naming.
Run 2
The code has a clear purpose and logical sequence of operations: binding textures, setting up kernel parameters, launching the kernel, and debugging output. It avoids deep nesting and generally maintains one action per line. However, readability is hindered by inconsistent formatting (mixed tabs/spaces, alignment issues), very long lines exceeding typical screen width, and poorly named variables like 'B1' and 'G1' that lack descriptive intent. The function parameter list is extremely long and spans multiple lines with excessive indentation, making it hard to parse at a glance. While the code structure is acceptable, clarity of intent suffers due to abbreviated naming and formatting inconsistencies. The action granularity is mostly good but could be improved with helper functions for setup steps. Overall, the code is maintainable but not optimized for readability.
Run 3
The code is generally well-structured and readable. It logically separates different GPU setup stages (symbol binding, texture binding, kernel launch) with clear comments. Nesting is minimal with a flat structure. Intent is clear: configure GPU memory and launch a NMI gradient kernel. However, some issues prevent a higher score: inconsistent indentation (mixed tabs/spaces), long function signature, and multiple actions per line in texture binding calls (e.g., combined function call with pointer dereference). Variable names like 'B1' and 'G1' are ambiguous, reducing clarity. The debug section uses #ifndef NDEBUG correctly but could be separated better. Overall, the code is maintainable but would benefit from consistent formatting and clearer naming.
Run 1
Code Structure: Logically organized into parameter preparation, symbol copying, texture binding, initialization, and kernel execution, with helpful section comments. Nesting: Flat execution with only a conditional debug section makes control flow easy to follow. Clarity of intent: Descriptive function and CUDA API names communicate the purpose, but abbreviated launch variables B1/G1, unexplained entropy indices, and a long pointer-heavy signature increase cognitive load. Code length: Reasonably concise for GPU setup, though repeated binding calls and lengthy identifiers add visual bulk. Action granularity: Most lines perform one clear operation; the entropy construction and debug output pack several values into single statements. Reading flow: Execution follows a natural setup-to-launch sequence, but inconsistent indentation, tight operator spacing, and long lines reduce scanning ease.
Run 2
Code Structure: Logically organized into initialization, symbol binding, texture binding, buffer clearing, and kernel execution, with useful section comments. Nesting: Flat control flow makes it easy to follow; conditional compilation adds little complexity. Clarity of intent: Descriptive function and resource names convey the GPU gradient operation, but abbreviated names such as B1 and G1, entropy array indices, and the unexplained bin-count formula reduce clarity. Code length: Reasonably concise for CUDA setup, though long identifiers and the large parameter list make scanning harder. Action granularity: Most statements perform one clear action, with complex argument expressions confined to individual calls. Reading flow: Execution follows a natural setup-to-launch sequence, but inconsistent indentation, tightly packed expressions, and long lines interrupt readability.
Run 3
Code Structure: Logically organized into initialization, symbol binding, texture binding, buffer clearing, and kernel execution, with useful section comments. Nesting: Flat control flow makes the function easy to follow; the debug preprocessor block adds little complexity. Clarity of intent: Descriptive function and resource names communicate the GPU gradient computation, but abbreviations, B1/G1, entropy indices, and unexplained bin arithmetic require domain knowledge. Code length: Reasonably concise for CUDA setup, although lengthy identifiers and the large parameter list increase visual load. Action granularity: Most lines perform one clear operation; compact argument lists and casts make some expressions harder to scan. Reading flow: Execution follows a natural setup-to-launch sequence, but inconsistent indentation, sparse operator spacing, and long lines reduce readability.