Sample

Dorn/cuda/28

Human rating uses the original dataset scale.

DatasetDorn
Human3.46
Lines50

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
10.6Δ 49.3
Scalabrino0.6040–1; higher is more readable
59.3Δ 0.6
Dorn0.1140–1; higher is more readable
7.8Δ 52.1
Mi0.0910–1; higher is more readable
11.1Δ 48.7
LLOC30Logical lines; fewer is more readable
11.4Δ 48.5
DeepSeek V4 Pro15.670–20; mean of three runs
82.6Δ 22.7
GPT-6.1 Sol150–20; mean of three runs
52.8Δ 7.1
BTTF0.4460–1; higher is more readable
32.9Δ 27.0
Human3.461–5; original rating
59.9

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.2189.31−72.247
Source linesThe number of non-empty source lines.50+20
Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value.4.826−7.238

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

Score0.604

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.173.902−3.701
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.173.98+2.003
Indentation frequencyHow rapidly indentation changes from line to line.45+0.819
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.51−0.769
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.46−0.635
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.49.891+0.288
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.109−0.121

Intercept 0.07 + feature contributions = -2.047 (log-odds).
Score = sigmoid(-2.047) = 0.114.

Score0.091
Score30
Run 1

The code is generally well-structured and readable. It shows good flat nesting, clear separation of concerns (helper functions for min/max, vector transforms, and kernel), and mostly one action per line. Variable names are descriptive (largest_tmin, smallest_tmax, volume_voxels) and comments clarify intent where needed. The ray-box intersection logic is concise and easy to follow. Minor issues: the use of raw pointers with 'in/out' direction unclear, the global MAX_STEPS constant with a commented-out dynamic calculation adds slight ambiguity, and the float4 'mul' function assumes w=1.0f without explanation. The kernel begins by copying parameters to local constants, which aids GPU programming but could be seen as slightly redundant. Overall, the code is readable, but minor clarity improvements could raise the score.

Run 2

The code is generally readable with clear structure and intent. Sections are separated by comments (e.g., 'transform vector by matrix'), functions have descriptive names, and actions are mostly one per line. However, it is not flawless: the slab test calculation has redundant nested fmax/fmin calls (tmin.x and tmin.z are checked twice), and the commented-out maxSteps expression is incomplete and potentially confusing. The kernel function uses consistent variable naming (volume_size, source_position) but introduces a long, unused comment block, and the interpolation parameter is never used. Overall the code is clear but could benefit from minor cleanup and removing redundant logic.

Run 3

The code is generally readable: functions are short, clearly named (ray-box intersection, matrix transforms), and use consistent formatting. Action granularity is one operation per line, and nesting is minimal. However, some issues reduce clarity: the first snippet lacks function context/signature, making purpose ambiguous; repeated fmax/fmin calls on tmin/tmax could be simplified (e.g., using a reduction or helper), and the comment 'find largest tmin' is slightly misleading since it computes from components. The matrix multiplication overloads are clean but rely on implicit vector types (float4 with dot) which may confuse readers unfamiliar with CUDA math. The kernel setup uses clear local copies of kernel arguments but includes a commented-out calculation for maxSteps, which adds clutter. Overall structure is logical, but minor repetition and missing context prevent a higher score.

Run 1

Code Structure: Small transformation helpers and a distinct kernel provide logical organization, though the excerpt starts and ends mid-function. Nesting: Control-flow nesting is absent; nested min/max calls are manageable but redundantly repeat the x component. Clarity of intent: Comments and descriptive bounds variables explain the calculations, while abbreviated names such as mul, M, v, and ttop require context. Code length: Mostly concise, but kernel parameter aliases and the long commented-out maxSteps formula add clutter. Action granularity: Each statement generally performs one assignment or operation, making individual steps easy to follow. Reading flow: Calculations proceed naturally from bounds to outputs and from matrix rows to vector components, but inconsistent naming conventions, uneven spacing, and the long kernel signature interrupt the flow.

Run 2

Code Structure: Vector-transform helpers and kernel initialization are logically separated, although the snippet begins mid-function and ends before the kernel logic. Nesting: Control flow is flat; nested min/max calls add minor expression complexity. Clarity of intent: Comments and descriptive names explain intersection bounds and transformations, but abbreviations such as mul and d_tt_backproject_ray require context. Code length: Mostly concise, though repeated tmin.x/tmax.x comparisons and local aliases add redundancy. Action granularity: Each statement performs a single clear assignment or operation. Reading flow: Computation proceeds naturally from bounds to outputs and from matrix components to results, but inconsistent naming styles, uneven whitespace, a long kernel signature, and a cluttered commented-out maxSteps expression interrupt readability.

Run 3

Code Structure: helper functions and kernel setup are logically separated, although the snippet starts mid-function and ends before the kernel logic. Nesting: flat control flow is easy to follow; nested min/max expressions add minor complexity. Clarity of intent: comments explain transformations and interval bounds, but abbreviated names such as mul, M, and ttop require context. Code length: mostly concise, though parameter aliases and redundant comparisons of the x component add unnecessary repetition. Action granularity: each statement performs one clear assignment or return. Reading flow: calculations proceed naturally from bounds to outputs, followed by helpers and initialization; inconsistent naming conventions, uneven spacing, a long kernel signature, and a lengthy commented-out expression slightly disrupt readability.