(vec []float32)
| 44 | } |
| 45 | |
| 46 | func encodeFloat16Vector(vec []float32) []byte { |
| 47 | buf := new(bytes.Buffer) |
| 48 | for _, v := range vec { |
| 49 | // Convert float32 to float16 (16-bit representation) |
| 50 | // This is a simplified conversion - in practice you'd use a proper float16 library |
| 51 | f16 := uint16(v * 1000) // Simple scaling for test purposes |
| 52 | binary.Write(buf, binary.LittleEndian, f16) |
| 53 | } |
| 54 | return buf.Bytes() |
| 55 | } |
| 56 | |
| 57 | var _ = Describe("RediSearch commands Resp 2", Label("search"), func() { |
| 58 | ctx := context.TODO() |
no test coverage detected