dau_core.records ================ .. py:module:: dau_core.records .. autoapi-nested-parse:: Byte layouts of the rows and records the row, grouped and bar tiles exchange with the host. A layout is a tuple of ``(field, kind)`` pairs in wire order, little-endian, with ``kind`` a numpy-style code (``i4``, ``u4``, ``i8``, ``u8``). The tiles' registry entries declare the same records in 64-bit words (``record_words`` and ``output_record_words``), and the suite checks the two agree, so a tile that changes its record width fails there rather than on the host. Field names follow the goldens' result types (``GroupAggregate``, ``BarAggregate``); ``pad`` fields hold no data and keep the wider fields on their natural alignment. Attributes ---------- .. autoapisummary:: dau_core.records.QUAD_ROW_FIELDS dau_core.records.KEYED_ROW_FIELDS dau_core.records.GROUP_RECORD_FIELDS dau_core.records.BAR_ROW_FIELDS dau_core.records.BAR_RECORD_FIELDS dau_core.records.QUAD_ROW_BYTES dau_core.records.KEYED_ROW_BYTES dau_core.records.GROUP_RECORD_BYTES dau_core.records.BAR_ROW_BYTES dau_core.records.BAR_RECORD_BYTES Functions --------- .. autoapisummary:: dau_core.records.struct_format dau_core.records.numpy_dtype_fields dau_core.records.record_bytes Module Contents --------------- .. py:data:: QUAD_ROW_FIELDS :type: Layout :value: (('key', 'i4'), ('value', 'i4'), ('aux0', 'i4'), ('aux1', 'i4')) .. py:data:: KEYED_ROW_FIELDS :type: Layout :value: (('key', 'i4'), ('value', 'u4')) .. py:data:: GROUP_RECORD_FIELDS :type: Layout :value: (('key', 'i4'), ('first', 'i4'), ('last', 'i4'), ('minimum', 'i4'), ('maximum', 'i4'), ('pad',... .. py:data:: BAR_ROW_FIELDS :type: Layout :value: (('key', 'i4'), ('price', 'i4'), ('shares', 'i4'), ('frac', 'i4')) .. py:data:: BAR_RECORD_FIELDS :type: Layout :value: (('key', 'i4'), ('open', 'i4'), ('close', 'i4'), ('low', 'i4'), ('high', 'i4'), ('pad', 'i4'),... .. py:function:: struct_format(fields: Layout) -> str The little-endian ``struct`` format for a layout. .. py:function:: numpy_dtype_fields(fields: Layout) -> list[tuple[str, str]] The same layout as numpy dtype pairs, for vectorized consumers. .. py:function:: record_bytes(fields: Layout) -> int Bytes per row or record of a layout. .. py:data:: QUAD_ROW_BYTES .. py:data:: KEYED_ROW_BYTES .. py:data:: GROUP_RECORD_BYTES .. py:data:: BAR_ROW_BYTES .. py:data:: BAR_RECORD_BYTES