Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: “EricZequan” <[email protected]>
  • Loading branch information
EricZequan committed Aug 12, 2024
1 parent d0793b1 commit e17267c
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions pkg/types/vector.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,6 @@ func PeekBytesAsVectorFloat32(b []byte) (n int, err error) {
return int(totalDataSize), nil
}

// ZeroCopyDeserializeVectorFloat32 deserializes the byte slice into a vector, without memory copy.
// Note: b must not be mutated, because this function does zero copy.
func ZeroCopyDeserializeVectorFloat32(b []byte) (VectorFloat32, []byte, error) {
len, err := PeekBytesAsVectorFloat32(b)
if err != nil {
return ZeroVectorFloat32, b, err
}
return VectorFloat32{data: b[:len]}, b[len:], nil
}

// ParseVectorFloat32 parses a string into a vector.
func ParseVectorFloat32(s string) (VectorFloat32, error) {
var values []float32
Expand Down

0 comments on commit e17267c

Please sign in to comment.