MCPcopy Create free account
hub / github.com/brimdata/super / Serialize

Method Serialize

vector/float.go:43–54  ·  view source on GitHub ↗
(b *scode.Builder, slot uint32)

Source from the content-addressed store, hash-verified

41}
42
43func (f *Float) Serialize(b *scode.Builder, slot uint32) {
44 switch f.Typ.ID() {
45 case super.IDFloat16:
46 b.Append(super.EncodeFloat16(float32(f.Values[slot])))
47 case super.IDFloat32:
48 b.Append(super.EncodeFloat32(float32(f.Values[slot])))
49 case super.IDFloat64:
50 b.Append(super.EncodeFloat64(f.Values[slot]))
51 default:
52 panic(f.Typ)
53 }
54}
55
56func FloatValue(vec Any, slot uint32) float64 {
57 switch vec := Under(vec).(type) {

Callers

nothing calls this directly

Calls 5

EncodeFloat16Function · 0.92
EncodeFloat32Function · 0.92
EncodeFloat64Function · 0.92
IDMethod · 0.65
AppendMethod · 0.45

Tested by

no test coverage detected