Read an array of scalars at the scalar's own width - #35
Merged
estebanzimanyi merged 1 commit intoSep 3, 2026
Merged
Conversation
An array MEOS answers is read at eight bytes a step whenever `Marshal.Copy` carries no overload for its element — the fallback for an array of POINTERS, reached by anything else. `tbool_values` answers a `bool *`, one byte an element, so the walk runs off the end of the array and hands back the values' own bytes as addresses; `geo_cluster_dbscan` answers a `uint32_t *` and reads two cluster ids at a time as one number. An element the layer knows the width of is read at that width: a `bool` a byte at a time and true when non-zero, a `uint` four, a `ulong` eight, a `float` through its bits. The pointer walk stays what it is for — an array of pointers to MEOS values — and `Marshal.Copy` keeps the elements it has an overload for. The object layer hands on an array of scalars whichever scalar it holds, rather than the four spellings it named, so `TBool.Values` answers `bool[]` and `Geo.ClusterDbscan` a `uint[]`. 1337 methods against 1335, 23 deferred against 25. Two tests read the values back: a temporal boolean answers the two distinct booleans it takes, and a temporal float the two doubles — the second the control that `Marshal.Copy` is untouched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An array MEOS answers is read at eight bytes a step whenever
Marshal.Copycarries no overload for its element — the fallback for an array of POINTERS,
reached by anything else.
tbool_valuesanswers abool *, one byte anelement, so the walk runs off the end of the array and hands back the values'
own bytes as addresses;
geo_cluster_dbscananswers auint32_t *and readstwo cluster ids at a time as one number.
An element the layer knows the width of is read at that width: a
boola byteat a time and true when non-zero, a
uintfour, aulongeight, afloatthrough its bits. The pointer walk stays what it is for — an array of pointers
to MEOS values — and
Marshal.Copykeeps the elements it has an overload for.The object layer hands on an array of scalars whichever scalar it holds, rather
than the four spellings it named, so
TBool.Valuesanswersbool[]andGeo.ClusterDbscanauint[]. 1337 methods against 1335, 23 deferred against25.
Two tests read the values back: a temporal boolean answers the two distinct
booleans it takes, and a temporal float the two doubles — the second the control
that
Marshal.Copyis untouched.