Sample

Dorn/cuda/33

Human rating uses the original dataset scale.

DatasetDorn
Human2.61
Lines30

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
13.4Δ 1.4
Scalabrino0.4060–1; higher is more readable
30.2Δ 15.5
Dorn0.0180–1; higher is more readable
2.5Δ 12.3
Mi0.0620–1; higher is more readable
8.9Δ 5.8
LLOC18Logical lines; fewer is more readable
38.4Δ 23.7
DeepSeek V4 Pro80–20; mean of three runs
29.4Δ 14.6
GPT-6.1 Sol120–20; mean of three runs
19.9Δ 5.2
BTTF0.0380–1; higher is more readable
1.1Δ 13.6
Human2.611–5; original rating
14.8

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.1789.714−59.061
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.162−7.742

Intercept 8.87 + feature contributions = -45.933 (log-odds).
Score = sigmoid(-45.933) = 0.

Score0.406

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.153−2.815
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.149−0.502
Indentation frequencyHow rapidly indentation changes from line to line.30+0.301
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.30−0.268
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.29+0.01
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.29.727+0.006

Intercept 0.07 + feature contributions = -4.004 (log-odds).
Score = sigmoid(-4.004) = 0.018.

Score0.062
Score18
Run 1

The code snippet demonstrates low readability due to multiple factors. The structure appears tangled with scattered context, missing beginnings of functions, and unclear variable naming (e.g., 'dimJsamples', 'dimIsamples', 'v_reconstructed'). Nesting is moderate but the ternary operators and conditional blocks add complexity. Clarity of intent is poor — the purpose of the code is only partially discernible (likely GPU kernel invocation for an RBM), but the logic around random values and proportions is opaque without surrounding context. Code length is verbose for the operations performed, and action granularity is inconsistent: some lines pack multiple operations (e.g., ternary plus pointer arithmetic), while others are appropriately single-action. Reading flow is disjointed, jumping between kernel configuration, pointer manipulation, and counter increments without clear segmentation or comments. The use of magic numbers (e.g., MAX_THREADS_PER_BLOCK) and abbreviated identifiers further obscures the flow. Overall, the code requires significant effort to parse and understand.

Run 2

The code shows moderate readability but has several issues. The structure mixes kernel launch configuration with conditional logic, making intent harder to grasp. Nesting is shallow (one level), which is positive, but the conditional branching between large and small kernels adds cognitive load. Variable names like 'rnd', 'I', and 'J' are cryptic without context. Magic numbers and pointer arithmetic on 'rnd' obscure purpose. Action granularity is mostly one statement per line, aiding readability, but pointer offset calculations are dense. Reading flow is disrupted by inline conditional operators and compact kernel launch syntax. The abrupt opening with 'proportionRandomValuesUsed = 0;' and closing brace suggests the code is a fragment, further complicating standalone evaluation. Overall, it's functional but not optimized for clarity.

Run 3

The code suffers from poor readability due to several issues. The structure is tangled with long, dense lines mixing pointer arithmetic, conditional expressions, and CUDA kernel launches. Nesting is moderate but the conditional branches contain complex one-liners. Intent is unclear - variables like 'rnd', 'w', 'b', 'h', 'I', 'J' lack descriptive names, and the purpose of parameters like 'proportionRandomValuesUsed' is ambiguous. Code length is not excessive but individual lines are overly long (exceeding 100+ characters). Action granularity is poor - multiple operations are packed into single lines (pointer arithmetic + kernel call + ternary operators). Reading flow is disrupted by inconsistent formatting, lack of strategic line breaks, and cryptic variable naming. The code assumes deep domain knowledge of RBM and CUDA specifics, making it inaccessible to general readers.

Run 1

Code Structure: Hidden-unit computation, optional visible reconstruction, and contrastive divergence are logically grouped, but the excerpt starts and ends mid-function, obscuring context. Nesting: Mostly shallow, with only two conditional levels. Clarity of intent: Descriptive kernel and method names help, but abbreviated variables, unexplained dimensions, and random-value pointer arithmetic require domain knowledge. Code length: Reasonably concise, though lengthy kernel calls and repeated dispatch logic make scanning harder. Action granularity: Most statements perform one action per line, but the contrastive-divergence loop combines its control and body on one line. Reading flow: Computation follows a natural sequence, but inconsistent spacing, long lines, CUDA launch syntax, and incomplete boundaries interrupt readability.

Run 2

Code Structure: Hidden-unit computation, optional visible reconstruction, and contrastive divergence are logically grouped, but the fragment starts mid-block and ends without a closing brace. Nesting: Mostly shallow, with only two levels in the reconstruction branch. Clarity of intent: Descriptive function names reveal the broad purpose, but abbreviations such as rnd, I, J, and dimJI obscure details, and random-value offsets lack explanation. Code length: Reasonably concise, though long kernel calls and repeated dispatch logic increase reading effort. Action granularity: Most statements perform one action per line, but the contrastive-divergence loop places its body on the same line, reducing scanability. Reading flow: Computation proceeds naturally from hidden units to reconstruction, but inconsistent spacing, long expressions, and missing surrounding context interrupt the flow.

Run 3

Code Structure: Hidden-unit computation, optional visible reconstruction, and contrastive divergence are logically grouped, but the excerpt begins and ends mid-function, obscuring context. Nesting: Mostly shallow, with only one additional conditional level for visible reconstruction. Clarity of intent: Descriptive function names reveal the RBM operations, but abbreviated variables such as v, h, rnd, I, and J require domain knowledge; random-value offset handling is not explained. Code length: Generally concise, although repeated kernel-selection branches and long argument lists add visual complexity. Action granularity: Most statements perform one action per line, but the unbraced, single-line loop combines control flow and computation. Reading flow: Execution proceeds naturally from hidden-unit computation to reconstruction and iteration, though inconsistent spacing, dense pointer arithmetic, CUDA launch syntax, and incomplete function boundaries interrupt readability.