Repository navigation
State the memory image of every value type a binding carries - #189
Merged
estebanzimanyi merged 1 commit intoOct 11, 2026
Merged
Conversation
Every defined structure states the bytes clang lays it in, its trailing padding included, as
sizeBytes beside the offset_bits of its fields: extract_struct of parser/extractors.py reads it
from the record type clang already lays out for the offsets, so a Span states 24, a TBox 56, an
STBox 80, an Npoint 16 and an Nsegment 24. A structure only declared, such as Raster or Pose,
has no size and states none.
Each class of typeEncodings that MEOS copies states the memory image of its values in image:
copy names the public T *f(const T *) named *_copy, and the image's length is either the public
int f(const T *) named *_mem_size, as size, or, for a type no such function sizes, the
sizeBytes of its structure. _image of parser/codecs.py finds both by shape and name, as
_byte_codec finds the byte codec, and stops the catalog on two copy or two size functions for
one class. A structure ending in a flexible array member is variable-length, so a class over
one states no image without a *_mem_size. Temporal states {copy: temporal_copy, size:
temporal_mem_size}, Raster {copy: raster_copy, size: raster_mem_size} and Span {copy:
span_copy, sizeBytes: 24}; the classes MEOS passes by value or copies through no public
function, H3Index and TimestampTz among them, state none.
The floor of .github/workflows/pytest.yml rises to 546, the suite collecting the two size tests
of StructLayoutTests, the six of ImageTests and the two image tests of CodecContractTests.
Witness: against MEOS-API master 4baf117 over MobilityDB master 4eef012a9f the Span structure
states the offsets of its fields and no size, and typeEncodings states no copy or size of any
class; against this branch Span states sizeBytes 24, typeEncodings.Span.image reads {copy:
span_copy, sizeBytes: 24} and typeEncodings.Raster.image {copy: raster_copy, size:
raster_mem_size}.
Measured over MobilityDB master 4eef012a9f with an all-families libmeos, run.py on upstream
4baf117 and on this branch with the same installed headers: the two catalogs differ in added
keys alone, every key of every function and of the object model being identical; 71 of the 83
structures state sizeBytes, the 12 others being only declared; 21 of the 34 classes of
typeEncodings state an image, 13 sized by a function (Cbuffer, GSERIALIZED, JsonPath, Jsonb,
Pcpatch, Pcpoint, Pose, PoseChain, Raquet, Raster, Set, SpanSet, Temporal) and 8 by their
structure (Interval 16, Npoint 16, Nsegment 24, STBox 80, Span 24, TBox 56, TPCBox 88,
TimeTzADT 16). The suite collects 546 tests, all passing, none skipped. JMEOS main e8c65dc4
generates byte-identical sources from both catalogs: its GeneratedFunctions and object layer,
and its Spark, Flink, Kafka, Spark SQL and Flink SQL surfaces.
Why: a binding holding MEOS values in process carries each as its memory image, allocated to
the size the catalog states and duplicated by the copy it names, and reads both from the
catalog rather than from a table of its own.
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.
Every defined structure states the bytes clang lays it in, its trailing padding included, as
sizeBytes beside the offset_bits of its fields: extract_struct of parser/extractors.py reads it
from the record type clang already lays out for the offsets, so a Span states 24, a TBox 56, an
STBox 80, an Npoint 16 and an Nsegment 24. A structure only declared, such as Raster or Pose,
has no size and states none.
Each class of typeEncodings that MEOS copies states the memory image of its values in image:
copy names the public T *f(const T *) named *_copy, and the image's length is either the public
int f(const T *) named *_mem_size, as size, or, for a type no such function sizes, the
sizeBytes of its structure. _image of parser/codecs.py finds both by shape and name, as
_byte_codec finds the byte codec, and stops the catalog on two copy or two size functions for
one class. A structure ending in a flexible array member is variable-length, so a class over
one states no image without a *_mem_size. Temporal states {copy: temporal_copy, size:
temporal_mem_size}, Raster {copy: raster_copy, size: raster_mem_size} and Span {copy:
span_copy, sizeBytes: 24}; the classes MEOS passes by value or copies through no public
function, H3Index and TimestampTz among them, state none.
The floor of .github/workflows/pytest.yml rises to 546, the suite collecting the two size tests
of StructLayoutTests, the six of ImageTests and the two image tests of CodecContractTests.
Witness: against MEOS-API master 4baf117 over MobilityDB master 4eef012a9f the Span structure
states the offsets of its fields and no size, and typeEncodings states no copy or size of any
class; against this branch Span states sizeBytes 24, typeEncodings.Span.image reads {copy:
span_copy, sizeBytes: 24} and typeEncodings.Raster.image {copy: raster_copy, size:
raster_mem_size}.
Measured over MobilityDB master 4eef012a9f with an all-families libmeos, run.py on upstream
4baf117 and on this branch with the same installed headers: the two catalogs differ in added
keys alone, every key of every function and of the object model being identical; 71 of the 83
structures state sizeBytes, the 12 others being only declared; 21 of the 34 classes of
typeEncodings state an image, 13 sized by a function (Cbuffer, GSERIALIZED, JsonPath, Jsonb,
Pcpatch, Pcpoint, Pose, PoseChain, Raquet, Raster, Set, SpanSet, Temporal) and 8 by their
structure (Interval 16, Npoint 16, Nsegment 24, STBox 80, Span 24, TBox 56, TPCBox 88,
TimeTzADT 16). The suite collects 546 tests, all passing, none skipped. JMEOS main e8c65dc4
generates byte-identical sources from both catalogs: its GeneratedFunctions and object layer,
and its Spark, Flink, Kafka, Spark SQL and Flink SQL surfaces.
Why: a binding holding MEOS values in process carries each as its memory image, allocated to
the size the catalog states and duplicated by the copy it names, and reads both from the
catalog rather than from a table of its own.