Skip to content

Commit 562680c

Browse files
committed
add simple description of the float8 layout
1 parent 34c2974 commit 562680c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

libsql-sqlite3/src/vectorInt.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ typedef u32 VectorDims;
3737
* - "trailing_bits" byte specify amount of trailing *bits* in the blob without last 'type'-byte which must be omitted
3838
* (so, vector dimensions are equal to 8 * (blob_size - 1) - trailing_bits)
3939
* - last 'type'-byte is mandatory for float1bit vectors
40+
*
41+
* 4. float8
42+
* [data[0] as u8] [data[1] as u8] ... [data[dims - 1] as u8] [_ as u8; alignment_padding]* [alpha as f32] [shift as f32] [padding as u8] [trailing_bytes as u8] [4 as u8]
43+
* - every data byte represents single quantized vector component
44+
* - "alignment_padding" has size from 0 to 3 bytes in order to pad content to multiple of 4 = sizeof(float)
45+
* - "trailing_bytes" byte specify amount of bytes in the "alignment_padding"
46+
* - last 'type'-byte is mandatory for float8 vectors
4047
*/
4148

4249
/*

0 commit comments

Comments
 (0)