Sample
Dorn/cuda/106
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 42.1Δ 19.8 |
| Scalabrino | 0.534 | 0–1; higher is more readable | 49.2Δ 12.6 |
| Dorn | 0.442 | 0–1; higher is more readable | 37.9Δ 24.0 |
| Mi | 0.273 | 0–1; higher is more readable | 26.7Δ 35.1 |
| LLOC | 17 | Logical lines; fewer is more readable | 41.2Δ 20.6 |
| DeepSeek V4 Pro | 13 | 0–20; mean of three runs | 59.3Δ 2.5 |
| GPT-6.1 Sol | 11.67 | 0–20; mean of three runs | 16.9Δ 45.0 |
| BTTF | 0.505 | 0–1; higher is more readable | 46.5Δ 15.3 |
| Human | 3.48 | 1–5; original rating | 61.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. | 1057.989 | −34.914 |
| 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.179 | −7.768 |
Intercept 8.87 + feature contributions = -14.212 (log-odds).
Score = sigmoid(-14.212) = 0.
| Score | 0.534 |
|---|
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 | −1.206 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 114.98 | +1.051 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 50 | −0.734 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 31 | +0.335 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 31 | −0.291 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 48.853 | +0.273 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.069 | +0.268 |
Intercept 0.07 + feature contributions = -0.233 (log-odds).
Score = sigmoid(-0.233) = 0.442.
| Score | 0.273 |
|---|
| Score | 17 |
|---|
Run 1
The code shows reasonable structure with a clear license header and includes, giving it a professional foundation. The kernel function has a logical purpose (finding minimum value per row), but has several readability problems. The nesting is minimal, which is good, but there's inconsistency in naming conventions (KERNEL vs extern C function) and indentation. The variables bx, by, and idnx are declared but unused or only partially used, creating ambiguity about intent. The main loop uses repeated array indexing (Output[idny*output_width+j]) which could be simplified for clarity. The action granularity is acceptable, with one operation per line for the key operations. The reading flow is interrupted by the unused variable declarations and mixed naming conventions. The kernel lacks comments explaining the algorithm or the CUDA block/thread mapping. The function KernelCenterAttribution has a more straightforward structure but lacks documentation about parameters or purpose.
Run 2
The code is fairly readable with a clear structure and reasonable naming, but has several issues. The logic is mostly flat with a single loop, which is good, but there is repeated indexing (`idny*output_width+j`) that adds noise. The unused variables (`bx`, `by`, `idnx`) and unused parameter in the kernel call create ambiguity. The loop for finding the minimum value is not immediately obvious in intent—a comment or more descriptive variable names would help. The code length is concise, but the kernel function could be split into smaller logical steps for better granularity. Reading flow is disrupted by the mixed indentation (tabs vs spaces) and the license header, which is long but appropriate. The array indexing is clear but verbose; extracting a base pointer would improve clarity. Overall, it is readable but could be improved with cleaner variable usage and minor refactoring.
Run 3
The code is moderately readable but has several issues. The structure is logical with clear separation between kernel and wrapper, but there are unused variables (bx, by, idnx) that create ambiguity. The kernel uses a nested loop with a conditional, adding some depth but not excessive. Variable naming is generally meaningful, though 'min_tmp' and 'idx' could be more descriptive. The action granularity is mostly one action per line, but the compound expression calculating hBlocks combines multiple operations. Reading flow is natural for CUDA kernels, but the unused variables and magic number 16 for blockSize reduce clarity. The copyright header is verbose for the actual code content. The function lacks comments explaining the purpose of finding the minimum output value and attributing a center. Overall, the code is understandable but could be improved with better comments, removal of dead variables, and clearer initialization values. The single-line if statement with assignment on separate line is acceptable but inconsistent with the loop's brace style.
Run 1
Code Structure: The kernel and wrapper are logically separated, but the wrapper is incomplete, and unused variables distract from the organization. Nesting: A single loop containing one conditional keeps nesting shallow and manageable. Clarity of intent: Finding the minimum-output center for each row is understandable, but names such as idny, idx, and min_tmp are vague, and thread indexing lacks explanation. Code length: The computational portion is concise, although unused indexing variables add unnecessary lines. Action granularity: Most statements perform one action per line; compact arithmetic and conditional expressions slightly reduce readability. Reading flow: The minimum-search sequence flows naturally, but inconsistent indentation, spacing, redundant indexing calculations, and the abruptly truncated wrapper interrupt reading.
Run 2
Code Structure: The kernel and host wrapper are logically separated, but the wrapper is incomplete, limiting overall coherence. Nesting: A single loop containing one conditional keeps nesting shallow and easy to follow. Clarity of intent: Function names and minimum-selection logic suggest assigning each output row to its minimum-value center, but terse names such as idnx, idny, and min_tmp reduce clarity. Unused bx, by, and idnx variables distract, and missing row-bound checks leave execution assumptions unclear. Code length: The computational logic is concise, though unused declarations and the lengthy license header add reading overhead. Action granularity: Statements generally perform one action per line; indexing expressions are compact but repeatedly written. Reading flow: Initialization, scanning, and assignment follow a natural sequence, but inconsistent indentation and spacing interrupt readability, and the abruptly truncated wrapper prevents following the complete launch setup.
Run 3
Code Structure: The CUDA kernel and host wrapper are logically separated, but the wrapper is incomplete and unused variables add clutter. Nesting: A single loop containing one conditional keeps nesting shallow and manageable. Clarity of intent: Function names and the minimum-selection logic suggest assigning each output row to a center, but abbreviated names such as idnx, idny, and min_tmp obscure meaning. Unused thread coordinates and the absence of visible bounds checks complicate understanding of thread responsibilities. Code length: The algorithm is concise, although unused declarations and a lengthy license header increase reading overhead. Action granularity: Most statements perform one action per line; indexing expressions and the block-count calculation are somewhat dense. Reading flow: Initialization, scanning, and assignment follow a natural sequence, but inconsistent indentation, cramped operator spacing, and the abruptly truncated wrapper disrupt the flow.