Expand description
Host-side I/O management for calculus modality.
This module provides platform-specific zero-copy streaming implementations that bypass the OS page cache for deterministic edge compute. It manages memory-mapped I/O, io_uring (Linux), and IOCP (Windows) with strict alignment requirements for DMA transfers.
§Architecture
- ZeroCopyStreamer trait: Platform-agnostic interface for async I/O
- DmaBuffer: Page-aligned (4096-byte) buffers for DMA transfers
- Memory pinning: Prevents swap to ensure DMA stability
- Double-buffering: One buffer active for reading, one inactive for DMA
§Windows FFI Firewall
Windows-specific IOCP implementation is isolated in directml_bridge.rs to avoid DirectX API version conflicts. This module uses type-erased FFI functions to communicate with the Windows-specific code.
Structs§
- DmaBuffer
- DMA buffer aligned to OS page boundaries (4096 bytes).
- IoUring
Grid Manager - Linux io_uring-based zero-copy streamer.
- Mmap
Grid Manager - Simple mmap-based grid manager for non-real-time use cases.
Enums§
Constants§
- DEFAULT_
BUFFER_ SIZE - Default buffer size (65536 bytes = 16 pages = 8192 f64 values)
- PAGE_
SIZE - OS page size for DMA alignment (4096 bytes on most systems)
Traits§
- Zero
Copy Streamer - Platform-agnostic zero-copy streaming interface.