Class Proto
java.lang.Object
ai.beestream.jitnn.onnx.Proto
A reader for the protocol buffers wire format, enough to decode ONNX's messages without a
protobuf library: varints, fixed 32/64-bit values and length-delimited fields (strings, bytes,
nested messages and packed repeated numbers). Public for jitNN's other importers (TensorFlow);
not a stable API.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceReceives double values fromdoubles(Proto.DoubleSink).static interfaceReceives float values fromfloats(Proto.FloatSink).static interfaceReceives int64 values fromlongs(Proto.LongSink). -
Constructor Summary
ConstructorsConstructorDescriptionProto(ByteBuffer buf) A reader over the message inbuf, from its position to its limit. -
Method Summary
Modifier and TypeMethodDescriptionbytes()The current length-delimited field as a view (no copy).voiddoubles(Proto.DoubleSink sink) Repeated double values: one fixed64, or a packed run.intfield()The field number of the current field.intfixed32()Reads a little-endian 32-bit value.longfixed64()Reads a little-endian 64-bit value.floatfloat32()Reads a 32-bit float.doublefloat64()Reads a 64-bit float.voidfloats(Proto.FloatSink sink) Repeated float values: one fixed32, or a packed run.voidlongs(Proto.LongSink sink) Repeated int64 values: one varint, or a packed run.message()The current length-delimited field as a nested message.booleannext()Advances to the next field; false at the end of the message.voidskip()Skips the current field's value.string()The current length-delimited field as a UTF-8 string.longvarint()Reads a varint.intwire()The wire type of the current field (0 varint, 1 fixed64, 2 length-delimited, 5 fixed32).
-
Constructor Details
-
Proto
A reader over the message inbuf, from its position to its limit.
-
-
Method Details
-
next
public boolean next()Advances to the next field; false at the end of the message. -
field
public int field()The field number of the current field. -
wire
public int wire()The wire type of the current field (0 varint, 1 fixed64, 2 length-delimited, 5 fixed32). -
varint
public long varint()Reads a varint. -
fixed64
public long fixed64()Reads a little-endian 64-bit value. -
fixed32
public int fixed32()Reads a little-endian 32-bit value. -
float32
public float float32()Reads a 32-bit float. -
float64
public double float64()Reads a 64-bit float. -
bytes
The current length-delimited field as a view (no copy). -
string
The current length-delimited field as a UTF-8 string. -
message
The current length-delimited field as a nested message. -
longs
Repeated int64 values: one varint, or a packed run. -
floats
Repeated float values: one fixed32, or a packed run. -
doubles
Repeated double values: one fixed64, or a packed run. -
skip
public void skip()Skips the current field's value.
-