pub struct AsyncPlasticityExecutor { /* private fields */ }Expand description
Async plasticity executor for std environments
Runs plasticity computation in a background thread, allowing the burst loop to continue processing while patterns are detected and memory neurons created.
This is optimal for CPU/GPU backends where:
- FireLedger is CPU-resident
- Plasticity computation can overlap with GPU burst processing
- Thread overhead is acceptable
Implementations§
Source§impl AsyncPlasticityExecutor
impl AsyncPlasticityExecutor
Sourcepub fn new(
config: PlasticityConfig,
memory_stats_cache: MemoryStatsCache,
npu: Arc<TracingMutex<DynamicNPU>>,
) -> Self
pub fn new( config: PlasticityConfig, memory_stats_cache: MemoryStatsCache, npu: Arc<TracingMutex<DynamicNPU>>, ) -> Self
Create a new async plasticity executor
Sourcepub fn get_memory_stats_cache(&self) -> MemoryStatsCache
pub fn get_memory_stats_cache(&self) -> MemoryStatsCache
Get the memory stats cache
pub fn enqueue_commands_for_test(&self, commands: Vec<PlasticityCommand>)
Trait Implementations§
Source§impl PlasticityExecutor for AsyncPlasticityExecutor
impl PlasticityExecutor for AsyncPlasticityExecutor
Source§fn notify_burst(&self, timestep: u64)
fn notify_burst(&self, timestep: u64)
Notify the executor of a completed burst Read more
Source§fn drain_commands(&self) -> Vec<PlasticityCommand>
fn drain_commands(&self) -> Vec<PlasticityCommand>
Drain pending commands from the executor Read more
Source§fn register_memory_area(
&self,
area_idx: u32,
area_name: String,
temporal_depth: u32,
upstream_areas: Vec<u32>,
lifecycle_config: Option<MemoryNeuronLifecycleConfig>,
)
fn register_memory_area( &self, area_idx: u32, area_name: String, temporal_depth: u32, upstream_areas: Vec<u32>, lifecycle_config: Option<MemoryNeuronLifecycleConfig>, )
Register a memory area with the plasticity system Read more
Source§fn is_running(&self) -> bool
fn is_running(&self) -> bool
Check if the executor is running
Auto Trait Implementations§
impl Freeze for AsyncPlasticityExecutor
impl !RefUnwindSafe for AsyncPlasticityExecutor
impl Send for AsyncPlasticityExecutor
impl Sync for AsyncPlasticityExecutor
impl Unpin for AsyncPlasticityExecutor
impl UnsafeUnpin for AsyncPlasticityExecutor
impl !UnwindSafe for AsyncPlasticityExecutor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more