Skip to main content

feagi_brain_development/connectivity/
synaptogenesis.rs

1// Copyright 2025 Neuraville Inc.
2// SPDX-License-Identifier: Apache-2.0
3
4/*!
5NPU-Native Synaptogenesis - Zero-Copy Morphology Application
6
7This module re-exports core morphology implementations from the core_morphologies module
8for backward compatibility. All core morphologies have been refactored into separate
9modules in the core_morphologies directory.
10
11## Architecture
12
13```text
14Python: Call rust_apply_projector(npu, src_area_id, dst_area_id, params)
1516Rust:   1. Query neurons from NPU (zero copy)
17        2. Apply morphology rules (SIMD optimized)
18        3. Create synapses directly in NPU
19        4. Return synapse count
2021Python: Receives u32 (synapse count only)
22```
23
24## Performance Impact
25
26- **Eliminates:** 6+ seconds of FFI overhead per area pair
27- **Eliminates:** Python list building and marshaling
28- **Enables:** SIMD-optimized morphology application
29- **Result:** ~50+ second improvement for typical genomes
30
31Copyright 2025 Neuraville Inc.
32Licensed under the Apache License, Version 2.0
33*/
34
35// Re-export all core morphology functions from the refactored modules
36pub use crate::connectivity::core_morphologies::{
37    apply_block_connection_morphology, apply_block_connection_morphology_batched,
38    apply_expander_morphology, apply_patterns_morphology, apply_projector_morphology,
39    apply_vectors_morphology, apply_vectors_morphology_with_dimensions,
40};