Plugin Jit Blob#
-
class PluginJitBlobWriter#
Little-endian blob writer: the layout never depends on host byte order or struct padding, which keeps engine bytes reproducible.
Public Functions
- inline explicit PluginJitBlobWriter(
- PluginJitBlobFormat const &format
-
inline PluginJitBlobFormat const &format() const noexcept#
-
inline void appendHeader()#
-
inline void appendU32(uint32_t const value)#
-
inline void appendU64(uint64_t const value)#
-
inline void appendBytes(std::vector<uint8_t> const &bytes)#
-
inline std::vector<uint8_t> release() noexcept#
-
class PluginJitBlobReader#
Bounds-checked little-endian reader over a caller-owned byte range.
- Throws std::invalid_argument:
for a null blob, std::runtime_error for a malformed one.
Public Functions
- inline PluginJitBlobReader(
- PluginJitBlobFormat const &format,
- void const *const data,
- size_t const size
-
inline PluginJitBlobFormat const &format() const noexcept#
-
inline void readHeader()#
-
inline uint32_t readU32()#
-
inline uint64_t readU64()#
-
inline std::vector<uint8_t> readBytes(size_t const size)#
-
inline size_t remaining() const noexcept#
-
inline void finish() const#
Every byte must belong to the format; trailing bytes mean the blob is not what it claims.
-
struct PluginJitBlobFormat#
Identity of one plugin’s serialized JIT blob.
nameprefixes every error message.magicnames both the plugin and its record layout: it opens every blob and is checked before anything else is read, so a blob from another plugin or from a library with a different layout is refused here instead of misread. Change it together with the record layout; the digest over key words and cubin catches whatever a stale magic would let through.