Skip to content

Generate the TNumber OO TBox arrays - #80

Merged
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:feat/generate-tnumber-tbox-arrays
Jul 23, 2026
Merged

Generate the TNumber OO TBox arrays#80
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:feat/generate-tnumber-tbox-arrays

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

The number-box array accessors tboxes, splitNTboxes and splitEachNTboxes each return a contiguous TBox array with a count out-parameter — the same fold shape as the span array. TBox nests two Span structs, so its stride is beyond the scalar-only struct sizing.

This resolves a struct field's size and alignment recursively, so a nested struct (a TBox's two Spans) contributes its own laid-out size, and adds the TBox array fold: each element is copied off the array at the TBox stride and wrapped through the hand type.

GeneratedTNumber emits 16 methods; only the value-span returns (toSpan, valuespans) wait for the concrete numeric subclasses. A parity test checks the folded TBox lists against the raw arrays the wrappers fill.

The number-box array accessors tboxes, splitNTboxes and splitEachNTboxes return
a contiguous TBox array with a count out-parameter — the same fold shape as the
span array, but TBox nests two Span structs, so its stride was beyond the
scalar-only struct sizing.

Resolve a struct field's size and alignment recursively, so a nested struct
(a TBox's two Spans) contributes its own laid-out size, and add the TBox array
fold: each element is copied off the array at the TBox stride and wrapped
through the hand type.

GeneratedTNumber now emits 16 methods; only the value-span returns (toSpan,
valuespans) wait for the concrete numeric subclasses. A parity test checks the
folded TBox lists against the raw arrays the wrappers fill.
@estebanzimanyi
estebanzimanyi merged commit 210998a into MobilityDB:main Jul 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant