Table of Contents

Namespace DotFly.Core.Checkpoints

Classes

CheckpointContent

In-memory representation of everything that goes into a .dfb file. Produced by the builders in DotFly.Data and consumed by DfbWriter.

DfbFile

A memory-mapped .dfb file. Sections are exposed as spans over the mapping — nothing is copied to the managed heap. The file must stay open while any span obtained from it is in use.

DfbFormat

Layout constants of the dotFly brain checkpoint (.dfb) file.

The file is a little-endian container of fixed-width columns, each 64-byte aligned so that it can be memory-mapped and used in place:

[0..64)      header: magic "DFB1", version, section count, header size, reserved
[64..)       section table:  × count
...          sections, each aligned to 64 bytes

Section tags are four ASCII characters. Neuron columns have one element per neuron; edge columns have one element per directed edge in CSR order (rows = presynaptic neuron index, columns sorted ascending within a row).

DfbWriter

Writes a CheckpointContent to a .dfb file.

EdgeStats

Structural edge counts of the selected neurons in the source data. Edges and Contacts count every (pre, post) pair among included neurons; the checkpoint itself keeps only pairs whose sign is non-zero (the rest would contribute g += 0).

Provenance

Everything needed to reproduce a checkpoint: where the data came from, which filter selected the neurons, which sign policy produced the edge signs, and the neuron model the checkpoint was built for. Stored as JSON inside the .dfb file.

SourceFile

A source file reference with its hash.

StringTable

Interned string table used by checkpoint columns. Index 0 is always the empty string and stands for "not annotated".

Structs

SectionEntry

An entry of the section table.