Sample

Dorn/cuda/52

Human rating uses the original dataset scale.

DatasetDorn
Human3.58
Lines10

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.0010–1; higher is more readable
61.6Δ 7.8
Dorn0.4690–1; higher is more readable
39.8Δ 29.5
Mi0.6970–1; higher is more readable
83.6Δ 14.2
LLOC6Logical lines; fewer is more readable
72.8Δ 3.5
DeepSeek V4 Pro150–20; mean of three runs
77.3Δ 7.9
GPT-6.1 Sol11.330–20; mean of three runs
15.5Δ 53.9
BTTF0.40–1; higher is more readable
23.7Δ 45.7
Human3.581–5; original rating
69.4

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.361.21−11.92
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.057−7.586
Source linesThe number of non-empty source lines.10+4

Intercept 8.87 + feature contributions = -6.636 (log-odds).
Score = sigmoid(-6.636) = 0.001.

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.61+1.082
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.11+0.647
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.163−0.643
Indentation frequencyHow rapidly indentation changes from line to line.10−0.391
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.9.742−0.274
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.10+0.191

Intercept 0.07 + feature contributions = -0.122 (log-odds).
Score = sigmoid(-0.122) = 0.469.

Score0.697
Score6
Run 1

The code is moderately readable. It has a clear structure with a simple loop and a guard against invalid values, but the indexing and thread mapping logic is not self-explanatory without context. Nesting is shallow (one level), which helps, but the boolean check and the branch logic break the flow slightly. The code is concise and each line generally performs one action, but the abrupt ending of the else block leaves the action incomplete, hurting clarity. Variable names like 'SAMPLE', 'idx', 'o', 'w', and 'b' are short and may be ambiguous without surrounding context. Overall, the code is understandable for a domain expert but lacks the clarity needed for broader readability.

Run 2

The code is generally readable with a clear structure and intent. It follows a standard CUDA kernel pattern for iterating over neurons with stride. Each action is on its own line, and the flow is logical: compute index, load input, check for invalid values, then handle valid case by loading weight and bias. Nesting is minimal (one if-else block). The variable names like 'numNeurons', 'weights', 'bias', and 'inputs' clearly convey meaning. A minor deduction comes from the abbreviation 'o' for the output/input value, which is slightly ambiguous, and the CUDA_VALUE macro wrapping reduces immediate clarity of the literal. The code could also benefit from a comment explaining the purpose of SAMPLE. Overall, it's concise and easy to follow.

Run 3

The code is generally readable with clear intent: iterating over neurons in a CUDA kernel, retrieving an input, and handling invalid values. The structure is logical and flat, with only one level of nesting in the if-else block. Variable names are descriptive (numNeurons, weights, bias, inputs), and each line performs a single action, improving granularity and reading flow. However, the snippet is incomplete, making it difficult to assess the full context, and lacks brief comments for CUDA-specific patterns like grid-stride loop. Minor score reduction due to truncation and absence of explanatory comments. Overall, the code is concise and clear for a CUDA kernel snippet.

Run 1

Code Structure: The visible loop logically groups indexing, input retrieval, validation, and parameter loading, but the snippet ends abruptly with unclosed blocks. Nesting: Moderate loop/conditional nesting remains manageable. Clarity of intent: CUDA indexing and invalid-value handling are understandable, but abbreviated names (n, o, w, b) and the incomplete else branch obscure the overall computation. Code length: The visible code is concise without unnecessary statements. Action granularity: Each statement performs a single clear action. Reading flow: Blank lines and consistent indentation support a natural sequence, but truncation prevents following the operation to completion.

Run 2

Code Structure: The visible loop and conditional are logically organized, but the snippet is incomplete and lacks closing braces. Nesting: Two levels are manageable and easy to follow. Clarity of intent: Indexing and replacement of infinite or NaN inputs with zero are clear; abbreviated variables and the unfinished else branch obscure the broader purpose. Code length: The visible code is concise without unnecessary repetition. Action granularity: Each body statement performs a single action; the loop header conventionally combines initialization, condition, and increment. Reading flow: Consistent indentation and blank lines support a natural progression, but the abrupt ending prevents understanding the complete operation.

Run 3

Code Structure: The visible loop and conditional are logically organized, but the snippet ends abruptly with unclosed blocks. Nesting: Moderate nesting is easy to follow. Clarity of intent: Thread-strided neuron processing and invalid-value sanitization are understandable, though abbreviated names and the missing continuation obscure the overall computation. Code length: The visible code is concise without unnecessary repetition. Action granularity: Declarations, indexing, loading, and assignment are separated into individual statements. Reading flow: Indentation and blank lines guide the reader naturally, but the incomplete else branch interrupts the flow and prevents assessing the full logic.