MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / ForceVectorAlignment

Function ForceVectorAlignment

Libs/flatbuffers/flatbuffers.h:1764–1767  ·  view source on GitHub ↗

Call this right before StartVector/CreateVector if you want to force the alignment to be something different than what the element size would normally dictate. This is useful when storing a nested_flatbuffer in a vector of bytes, or when storing SIMD floats, etc.

Source from the content-addressed store, hash-verified

1762 // This is useful when storing a nested_flatbuffer in a vector of bytes,
1763 // or when storing SIMD floats, etc.
1764 void ForceVectorAlignment(size_t len, size_t elemsize, size_t alignment) {
1765 FLATBUFFERS_ASSERT(VerifyAlignmentRequirements(alignment));
1766 PreAlign(len * elemsize, alignment);
1767 }
1768
1769 // Similar to ForceVectorAlignment but for String fields.
1770 void ForceStringAlignment(size_t len, size_t alignment) {

Callers

nothing calls this directly

Calls 2

PreAlignFunction · 0.85

Tested by

no test coverage detected