MCPcopy
hub / github.com/redis/go-redis / encodeFloat32Vector

Function encodeFloat32Vector

search_test.go:38–44  ·  view source on GitHub ↗
(vec []float32)

Source from the content-addressed store, hash-verified

36}
37
38func encodeFloat32Vector(vec []float32) []byte {
39 buf := new(bytes.Buffer)
40 for _, v := range vec {
41 binary.Write(buf, binary.LittleEndian, v)
42 }
43 return buf.Bytes()
44}
45
46func encodeFloat16Vector(vec []float32) []byte {
47 buf := new(bytes.Buffer)

Callers 1

search_test.goFile · 0.85

Calls 2

WriteMethod · 0.45
BytesMethod · 0.45

Tested by

no test coverage detected