Sample
Dorn/cuda/89
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 11.1Δ 5.3 |
| Scalabrino | 0.151 | 0–1; higher is more readable | 8.9Δ 3.1 |
| Dorn | 0.449 | 0–1; higher is more readable | 38.4Δ 32.6 |
| Mi | 0.077 | 0–1; higher is more readable | 9.7Δ 3.9 |
| LLOC | 18 | Logical lines; fewer is more readable | 38.4Δ 32.6 |
| DeepSeek V4 Pro | 7.33 | 0–20; mean of three runs | 24.8Δ 18.9 |
| GPT-6.1 Sol | 14 | 0–20; mean of three runs | 41.4Δ 35.5 |
| BTTF | 0.231 | 0–1; higher is more readable | 7.8Δ 1.9 |
| Human | 2.15 | 1–5; original rating | 5.8 |
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. | 1913.833 | −63.156 |
| Source linesThe number of non-empty source lines. | 30 | +12 |
| 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.196 | −7.795 |
Intercept 8.87 + feature contributions = -50.081 (log-odds).
Score = sigmoid(-50.081) = 0.
| Score | 0.151 |
|---|
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. | 115.903 | −1.244 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 116 | +1.067 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 28 | +0.231 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 27 | −0.199 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.105 | −0.077 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 31 | −0.061 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 29.855 | +0.007 |
Intercept 0.07 + feature contributions = -0.205 (log-odds).
Score = sigmoid(-0.205) = 0.449.
| Score | 0.077 |
|---|
| Score | 18 |
|---|
Run 1
The code has a clear logical flow with distinct sections for binding symbols and textures, and comments help identify these sections. However, readability suffers from several issues: the indentation is inconsistent (first line is severely indented), and many lines are extremely long, combining multiple operations with redundant CUDA_SAFE_CALL wrappers. The function signature is partially shown, making intent less clear without context. Variable names like B1 and G1 are uninformative. While the overall structure is organized, the dense formatting and long lines disrupt natural reading flow and obscure individual actions.
Run 2
The code is difficult to read due to poor structure, inconsistent indentation, and unclear intent. It jumps between variable declarations, CUDA calls, and kernel launch configuration without logical separation. The function signature is missing its return type and function name, making the purpose ambiguous. Lines are long and combine multiple actions, reducing action granularity. Nesting is not an issue, but the lack of comments explaining the computational workflow (e.g., what NMI, mask_d, or binning represent) hurts clarity. Magic numbers like '0' in texture binding calls add confusion. The code would benefit from sectioning, meaningful comments, consistent formatting, and breaking long expressions into smaller steps to improve readability.
Run 3
The code has some positive aspects like clear section comments ('Bind Symbols', 'Texture binding') and consistent prefix naming, but overall readability suffers from multiple issues. The function signature is missing its name and return type, making the code fragment confusing. Variable names are excessively long (e.g., 'Grid_reg_getVoxelBasedNMIGradientUsingPW') which reduces scanning efficiency. Indentation is inconsistent, with the opening lines misaligned and mixed tab/space usage. Multiple operations per line in CUDA_SAFE_CALL blocks reduce clarity. The lack of any explanatory comments about what each symbol represents or the mathematical purpose of the operations makes the code domain-specific and opaque to readers unfamiliar with this particular GPU kernel setup. While the code tries to be structured logically, the naming conventions, formatting inconsistencies, and dense macro-heavy calls significantly hamper readability for anyone not deeply familiar with this codebase.
Run 1
Code Structure: Logical sections group constants, symbol transfers, texture bindings, memory initialization, and launch configuration. However, the incomplete function signature and missing ending reduce context. Nesting: The code is flat and easy to scan. Clarity of intent: CUDA calls and section comments communicate the main operations, but abbreviations such as NMI, B1, and G1 require domain knowledge or surrounding context. Code length: Reasonably concise, although repeated CUDA calls and very long configuration identifiers add visual bulk. Action granularity: Each statement performs one main action, making individual operations easy to identify. Reading flow: Execution follows a natural setup sequence, but inconsistent indentation, tight operator spacing, and long lines interrupt readability.
Run 2
Code Structure: logically groups constant setup, symbol binding, texture binding, buffer initialization, and grid configuration, although the incomplete function signature limits context. Nesting: flat, with no nested control flow. Clarity of intent: descriptive resource names and section comments help, but unexplained NMI calculations, terse B1/G1 names, and verbose configuration identifiers obscure some intent. Code length: reasonably concise for CUDA setup, though repetitive API calls add visual bulk. Action granularity: generally one declaration or API operation per line, making individual steps easy to identify. Reading flow: follows a natural initialization sequence, but inconsistent indentation, tight operator spacing, and long lines reduce scanability.
Run 3
Code Structure: Operations are logically grouped into constant setup, symbol copying, texture binding, initialization, and launch configuration, aided by section comments. Nesting: The code is flat with no nested control flow. Clarity of intent: Descriptive resource names and CUDA calls communicate most operations, but the truncated function signature, unexplained bin-count formula, and generic B1/G1 names weaken clarity. Code length: Mostly concise, though repetitive API calls and very long identifiers make scanning harder. Action granularity: Each statement performs one primary action, keeping execution steps distinct. Reading flow: The sequence is natural for GPU setup, but inconsistent indentation, tight operator spacing, long lines, and the incomplete snippet interrupt readability.