feature: add mkdocs-material documentation site with CI deployment
Generate comprehensive documentation for all 173 source units and integrate mkdocs-material into the build toolchain. Documentation covers kernel core, x86 architecture, drivers, applications, and all subsystems with a tabbed navigation structure. - Add mkdocs.yml with material theme, mermaid support, and tabbed nav - Add doc/index.md landing page - Generate doc/src/ markdown for every Pascal unit in src/ - Reorganize planning docs into doc/planning/ - Add compat, lvglh, and toolchain doc sections - Update Dockerfile to install python3 and mkdocs-material (pinned <2) - Replace pasdoc-based compile_docs.sh with mkdocs build --strict - Add compile_docs.sh to the main build pipeline in compile.sh - Add deploy-docs step in .drone.yml with host volume mount to nginx - Add site/.gitkeep for build output directory
This commit is contained in:
1 parent
7157a57513
commit
26e2fd947e
209 files changed
+16996
-13
No files matched your search
@@ -0,0 +1,50 @@
|
||||
# core.enc.fnv1a
|
||||
|
||||
FNV-1a (Fowler-Noll-Vo) non-cryptographic hash in 32-bit and 64-bit widths.
|
||||
|
||||
## Overview
|
||||
|
||||
`core.enc.fnv1a` implements the FNV-1a variant of the Fowler-Noll-Vo hash algorithm. FNV-1a XORs each input byte into the hash value before multiplying by the FNV prime, which provides better avalanche characteristics than the original FNV-1 (which multiplies first). The algorithm is simple, fast, and produces well-distributed hashes suitable for hash tables, Bloom filters, and checksums.
|
||||
|
||||
FNV-1a is the primary hash function used by `core.ds.hashmap` (key hashing) and `core.ds.bloom` (first of two hash functions in the double-hashing scheme).
|
||||
|
||||
## Dependencies
|
||||
|
||||
- `io.syslog` — test output (implementation only)
|
||||
- `memory.heap` — `kfree` (implementation only)
|
||||
- `core.strings` — test output formatting (implementation only)
|
||||
|
||||
## Functions and Procedures
|
||||
|
||||
### Hash_FNV1a32
|
||||
```pascal
|
||||
function Hash_FNV1a32(Data : void; DataLen : uint32) : uint32;
|
||||
```
|
||||
Computes a 32-bit FNV-1a hash of `DataLen` bytes starting at `Data`.
|
||||
- Initial basis: `$811C9DC5`
|
||||
- FNV prime: `$01000193`
|
||||
- Per byte: `h = (h xor byte) * prime`
|
||||
|
||||
Zero-length input returns the basis value `$811C9DC5`.
|
||||
|
||||
### Hash_FNV1a64
|
||||
```pascal
|
||||
function Hash_FNV1a64(Data : void; DataLen : uint32) : uint64;
|
||||
```
|
||||
Computes a 64-bit FNV-1a hash.
|
||||
- Initial basis: `$CBF29CE484222325`
|
||||
- FNV prime: `$00000100000001B3`
|
||||
|
||||
Zero-length input returns the basis value.
|
||||
|
||||
### UnitTest
|
||||
```pascal
|
||||
procedure UnitTest;
|
||||
```
|
||||
Runs the FNV-1a test suite (known basis for empty input, determinism, distinctness for different inputs, length sensitivity, independence of 32-bit and 64-bit variants) and logs a pass/fail summary to syslog under the `'FNV1A'` channel.
|
||||
|
||||
## Notes
|
||||
|
||||
Both functions are purely computational with no side effects or allocations. They may be called from any context.
|
||||
|
||||
The low 32 bits of `Hash_FNV1a64` are not guaranteed to equal `Hash_FNV1a32` for the same input; they are independent algorithms.
|
||||
Reference in new issue
Block a user