![]() |
Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
|
DEMO |
Reads FIXED_LEN_BYTE_ARRAY page data back into float vectors. More...
#include <vector_type.hpp>
Classes | |
| struct | ZeroCopyResult |
| Zero-copy read result: a pointer to the float data and the vector count. More... | |
Public Member Functions | |
| VectorReader (VectorColumnSpec spec) | |
| Construct a VectorReader for the given column specification. | |
| std::vector< std::vector< float > > | read_page (const uint8_t *data, size_t data_size) const |
| Decode a PLAIN-encoded page of FIXED_LEN_BYTE_ARRAY vectors into float32 vectors. | |
| expected< ZeroCopyResult > | read_page_zero_copy (const uint8_t *data, size_t data_size) const |
| Attempt a zero-copy read of a FLOAT32 page. | |
| std::vector< float > | read_vector (const uint8_t *page_data, size_t page_size, size_t index) const |
| Read a single vector at the given index from a page. | |
| const VectorColumnSpec & | spec () const noexcept |
| The column spec this reader was constructed with. | |
Reads FIXED_LEN_BYTE_ARRAY page data back into float vectors.
Does not own any data – operates on const pointers to page buffers. Supports element type conversion: FLOAT16/FLOAT64 pages are converted to float32 on read. For FLOAT32 data with natural alignment, a zero-copy path is available via read_page_zero_copy().
Definition at line 329 of file vector_type.hpp.
|
inlineexplicit |
Construct a VectorReader for the given column specification.
| spec | Column specification (dimension and element type). |
Definition at line 333 of file vector_type.hpp.
|
inline |
Decode a PLAIN-encoded page of FIXED_LEN_BYTE_ARRAY vectors into float32 vectors.
Each inner vector has dimension elements.
| data | Pointer to the start of page data. |
| data_size | Total byte size of the page data. |
Definition at line 343 of file vector_type.hpp.
|
inline |
Attempt a zero-copy read of a FLOAT32 page.
Returns a direct pointer into the page buffer without any data copying. Only succeeds when:
| data | Pointer to page data. |
| data_size | Total byte size of the page data. |
Definition at line 404 of file vector_type.hpp.
|
inline |
Read a single vector at the given index from a page.
| page_data | Pointer to page data. |
| page_size | Total byte size of the page data. |
| index | Zero-based index of the vector to read. |
dimension elements, or empty on OOB. Definition at line 439 of file vector_type.hpp.
|
inlinenoexcept |
The column spec this reader was constructed with.
Definition at line 478 of file vector_type.hpp.