Sample
Dorn/cuda/79
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 16.7Δ 5.3 |
| Scalabrino | 0.162 | 0–1; higher is more readable | 11.2Δ 0.2 |
| Dorn | 0.216 | 0–1; higher is more readable | 18.1Δ 6.7 |
| Mi | 0.456 | 0–1; higher is more readable | 46.0Δ 34.5 |
| LLOC | 15 | Logical lines; fewer is more readable | 46.5Δ 35.1 |
| DeepSeek V4 Pro | 11 | 0–20; mean of three runs | 46.4Δ 35.0 |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs | 52.8Δ 41.4 |
| BTTF | 0.161 | 0–1; higher is more readable | 4.2Δ 7.2 |
| Human | 2.47 | 1–5; original rating | 11.4 |
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. | 1547.605 | −51.071 |
| 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.209 | −7.814 |
Intercept 8.87 + feature contributions = -38.415 (log-odds).
Score = sigmoid(-38.415) = 0.
| Score | 0.162 |
|---|
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. | 155.967 | −2.941 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 156 | +1.713 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.116 | −0.19 |
| 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. | 26 | +0.162 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 27 | +0.08 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 28.86 | −0.006 |
Intercept 0.07 + feature contributions = -1.288 (log-odds).
Score = sigmoid(-1.288) = 0.216.
| Score | 0.456 |
|---|
| Score | 15 |
|---|
Run 1
The code has a clear overall purpose (GPU setup for perspective positioning) but suffers from readability issues. Structure is moderately logical, with grouped variable declarations and CUDA calls, but inconsistent formatting and ad-hoc comments indicate incomplete cleanup. Nesting is relatively flat, which is positive, but multiple CUDA calls and variable declarations are packed together, reducing line-level clarity. Intent is reasonably clear from naming conventions, but ambiguous elements like the commented-out code and inconsistent indentation obscure the flow. Code length is acceptable yet could be more concise with helper functions for repetitive CUDA memory copies. Action granularity is mixed: each CUDA call is on its own line, but assignments and declarations are sometimes combined. Reading flow is disrupted by dead comments, inconsistent spacing, and the abrupt kernel launch without explanation. Overall, it is understandable but lacks polish and consistency, preventing higher readability.
Run 2
The code has reasonable top-level organization with clear sections for copying parameters to GPU, but suffers from several readability issues. The function lacks documentation or comments explaining its purpose or parameters. There is inconsistent indentation (some lines use spaces, others tabs) and inconsistent spacing. The commented-out code should be removed. Variable naming is mostly clear, but some names like 'B1' and 'G1' are too cryptic. Lines perform single actions when setting up CUDA calls, which is good, but the CUDA_SAFE_CALL macro wraps multiple operations. The grid/block calculation logic is somewhat unclear without context. Overall, the code is understandable but not particularly polished or self-documenting.
Run 3
The code has a clear purpose and follows a mostly linear structure, but readability is hampered by several issues. The function name and parameters are descriptive, but variable naming is inconsistent ('imageSize' vs 'B1/G1'). The commented-out code creates clutter and ambiguity about what is current versus legacy. Mixed indentation and long function calls reduce visual clarity. While the sequence of memory copy operations is logically ordered, the lack of explanatory comments for GPU kernel configuration and no error context reduces clarity of intent. The nesting is flat and actions are generally one per line, which helps, but the overall presentation feels unpolished.
Run 1
Code Structure: Logically organized into image/detector configuration, launch setup, and kernel execution, though inconsistent indentation and obsolete commented-out code add clutter. Nesting: Completely flat, making control flow easy to follow. Clarity of intent: Descriptive parameter names and CUDA calls communicate the main purpose, but B1/G1 are vague, and the use of dimensions 1 and 3 for the launch grid is unexplained. Code length: Concise overall, with only a few unnecessary comments and blank lines. Action granularity: Each statement performs a focused action, with no crowded multi-statement lines. Reading flow: Configuration naturally precedes execution and synchronization, but uneven formatting, limited spacing around arguments, and the long function signature reduce scanning ease.
Run 2
Code Structure: Logically separates image/detector setup, launch configuration, kernel execution, and synchronization, though sections are not explicitly labeled. Nesting: Completely flat, making control flow easy to follow. Clarity of intent: Descriptive data names and the kernel name convey purpose, but B1/G1 are vague, and the choice of image dimensions for the launch grid is unexplained. Code length: Concise overall; obsolete commented-out statements add unnecessary clutter. Action granularity: Each statement performs one primary action, with vector construction and symbol copying clearly separated. Reading flow: Operations follow a natural setup-to-execution sequence, but inconsistent indentation, spacing, and blank lines interrupt visual consistency.
Run 3
Code Structure: Logically separates parameter setup, grid configuration, kernel launch, and synchronization, though inconsistent indentation and obsolete commented-out code add clutter. Nesting: Completely flat, making execution easy to follow. Clarity of intent: Descriptive parameter and constant names convey the purpose, but B1 and G1 are vague, and the choice of image dimensions for the grid is unexplained. Code length: Appropriately concise overall, with repetitive setup that remains understandable; dead comments are unnecessary. Action granularity: Generally one declaration or operation per line, supporting readability. Reading flow: Follows a natural setup-to-execution sequence, but uneven whitespace, long lines, and inconsistent formatting interrupt scanning.