pub struct Runtime<D>{ /* private fields */ }Expand description
The Runtime manages the local fragment of the tonnetz and provides methods for executing tasks and coordinating between partitions.
Implementations§
Methods from Deref<Target = RuntimeInner<D>>§
Sourcepub fn fragment(&self) -> &FragTonnetz<D>
pub fn fragment(&self) -> &FragTonnetz<D>
Get a reference to the fragment
Sourcepub fn fragment_mut(&mut self) -> &mut FragTonnetz<D>
pub fn fragment_mut(&mut self) -> &mut FragTonnetz<D>
Get a mutable reference to the fragment
Sourcepub fn orchestrator(&self) -> &Orchestrator
pub fn orchestrator(&self) -> &Orchestrator
Get a reference to the orchestrator
Sourcepub fn orchestrator_mut(&mut self) -> &mut Orchestrator
pub fn orchestrator_mut(&mut self) -> &mut Orchestrator
returns a mutable reference to the orchestrator
Sourcepub fn perf_tracker(&self) -> &PerformanceTracker
pub fn perf_tracker(&self) -> &PerformanceTracker
returns an immutable reference to the performance tracker
Sourcepub fn perf_tracker_mut(&mut self) -> &mut PerformanceTracker
pub fn perf_tracker_mut(&mut self) -> &mut PerformanceTracker
returns a mutable reference to the performance tracker
Sourcepub fn performance_trend_report(&self) -> String
pub fn performance_trend_report(&self) -> String
Get a performance trend report
Sourcepub fn scheduler_mut(&mut self) -> &mut Scheduler
pub fn scheduler_mut(&mut self) -> &mut Scheduler
returns a mutable reference to the scheduler
Sourcepub fn system_info(&self) -> &SystemInfo
pub fn system_info(&self) -> &SystemInfo
returns an immutable reference to the system’s info
Sourcepub fn system_info_mut(&mut self) -> &mut SystemInfo
pub fn system_info_mut(&mut self) -> &mut SystemInfo
returns a mutable reference to the system’s info
Sourcepub fn task_queue(&self) -> &[Task]
pub fn task_queue(&self) -> &[Task]
returns a reference to the tasks stored in the scheduler
Sourcepub fn task_queue_mut(&mut self) -> &mut Vec<Task>
pub fn task_queue_mut(&mut self) -> &mut Vec<Task>
returns a mutable reference to the task queue within the scheduler
Sourcepub fn vnodes(&self) -> &HashMap<EdgeId, VNode<D>>
pub fn vnodes(&self) -> &HashMap<EdgeId, VNode<D>>
returns an immutable reference to the initialized virtual node’s
Sourcepub fn vnodes_mut(&mut self) -> &mut HashMap<EdgeId, VNode<D>>
pub fn vnodes_mut(&mut self) -> &mut HashMap<EdgeId, VNode<D>>
returns a mutable reference to the initialized virtual nodes
Sourcepub fn set_fragment(&mut self, fragment: FragTonnetz<D>)
pub fn set_fragment(&mut self, fragment: FragTonnetz<D>)
set the runtimes fragment to the given value
Sourcepub fn set_orchestrator(&mut self, orchestrator: Orchestrator)
pub fn set_orchestrator(&mut self, orchestrator: Orchestrator)
set the runtime’s orchestrator
Sourcepub fn set_scheduler(&mut self, scheduler: Scheduler)
pub fn set_scheduler(&mut self, scheduler: Scheduler)
set the runtime’s scheduler
Sourcepub fn update_performance_metrics(&mut self)
pub fn update_performance_metrics(&mut self)
Update performance tracking with current metrics
Sourcepub fn adaptive_schedule(&mut self) -> Result<(), RuntimeError>where
D: TriadDriver,
pub fn adaptive_schedule(&mut self) -> Result<(), RuntimeError>where
D: TriadDriver,
Adaptive task scheduling based on system resources and task performance history
Sourcepub fn add_triad(&mut self, triad: Triad) -> Result<EdgeId, RuntimeError>
pub fn add_triad(&mut self, triad: Triad) -> Result<EdgeId, RuntimeError>
Add a triad to the fragment
Sourcepub fn auto_configure(&mut self) -> Result<(), RuntimeError>
pub fn auto_configure(&mut self) -> Result<(), RuntimeError>
Auto-configure the runtime based on available system resources
pub fn completed_tasks(&self) -> Vec<&Task>
Sourcepub fn coordinate_distributed_learning(&mut self) -> Result<usize, RuntimeError>where
D: TriadDriver,
pub fn coordinate_distributed_learning(&mut self) -> Result<usize, RuntimeError>where
D: TriadDriver,
Coordinate distributed learning with gradient sharing
Sourcepub fn coordinate_knowledge_transfer(&mut self) -> Result<(), RuntimeError>where
D: TriadDriver,
pub fn coordinate_knowledge_transfer(&mut self) -> Result<(), RuntimeError>where
D: TriadDriver,
Coordinate knowledge sharing between surface networks
Sourcepub fn coordinate_learning(&mut self) -> Result<(), RuntimeError>where
D: TriadDriver,
pub fn coordinate_learning(&mut self) -> Result<(), RuntimeError>where
D: TriadDriver,
coordinate learning between nodes
Sourcepub fn execute_task(&mut self, task_id: usize) -> Result<(), RuntimeError>where
D: TriadDriver,
pub fn execute_task(&mut self, task_id: usize) -> Result<(), RuntimeError>where
D: TriadDriver,
executes the task associated with the given identitifier
Sourcepub fn execute_tasks(&mut self) -> Result<(), RuntimeError>where
D: TriadDriver,
pub fn execute_tasks(&mut self) -> Result<(), RuntimeError>where
D: TriadDriver,
Execute tasks in the queue
Sourcepub fn get_vnode(&self, id: &EdgeId) -> Option<&VNode<D>>
pub fn get_vnode(&self, id: &EdgeId) -> Option<&VNode<D>>
returns an immutable reference to the node with the given identifier; if any
Sourcepub fn get_vnode_mut(&mut self, id: &EdgeId) -> Option<&mut VNode<D>>
pub fn get_vnode_mut(&mut self, id: &EdgeId) -> Option<&mut VNode<D>>
returns a mutable reference to the partition with the given identifier; if any
Sourcepub fn init_complete_layer(&mut self) -> Result<(), RuntimeError>
pub fn init_complete_layer(&mut self) -> Result<(), RuntimeError>
Initialize the runtime with major and minor triads
Sourcepub fn init_node_surfaces(&mut self) -> Result<(), RuntimeError>where
D: TriadDriver,
pub fn init_node_surfaces(&mut self) -> Result<(), RuntimeError>where
D: TriadDriver,
Initialize surface networks for all nodes in the fragment
Sourcepub fn init_specialized_surfaces(&mut self) -> Result<(), RuntimeError>where
D: TriadDriver,
pub fn init_specialized_surfaces(&mut self) -> Result<(), RuntimeError>where
D: TriadDriver,
Initialize surface networks with class-specific tuning
Sourcepub fn optimize_memory_allocation(&mut self) -> Result<(), RuntimeError>where
D: TriadDriver,
pub fn optimize_memory_allocation(&mut self) -> Result<(), RuntimeError>where
D: TriadDriver,
Optimize memory allocation across nodes
Sourcepub fn optimize_surface_networks(&mut self) -> Result<(), RuntimeError>where
D: TriadDriver,
pub fn optimize_surface_networks(&mut self) -> Result<(), RuntimeError>where
D: TriadDriver,
Optimize the surface networks across all nodes
Sourcepub fn predict_task_resources(&self, task_type: &TaskType) -> (f32, f32)
pub fn predict_task_resources(&self, task_type: &TaskType) -> (f32, f32)
Get predicted resource requirements for a task
Sourcepub fn predictive_schedule(
&mut self,
look_ahead_ms: u64,
) -> Result<(), RuntimeError>where
D: TriadDriver,
pub fn predictive_schedule(
&mut self,
look_ahead_ms: u64,
) -> Result<(), RuntimeError>where
D: TriadDriver,
Schedule tasks using predictive resource management
Sourcepub fn prioritize_tonnetz_tasks(&mut self) -> Result<(), RuntimeError>where
D: TriadDriver,
pub fn prioritize_tonnetz_tasks(&mut self) -> Result<(), RuntimeError>where
D: TriadDriver,
Prioritize tasks based on observer position in Tonnetz space
Sourcepub fn process_messages(&mut self) -> Result<(), RuntimeError>where
D: TriadDriver,
pub fn process_messages(&mut self) -> Result<(), RuntimeError>where
D: TriadDriver,
Process messages between nodes
Sourcepub fn run_maintenance(&mut self) -> Result<Vec<usize>, RuntimeError>where
D: TriadDriver,
pub fn run_maintenance(&mut self) -> Result<Vec<usize>, RuntimeError>where
D: TriadDriver,
Run maintenance including knowledge coordination
Sourcepub fn runtime_metrics(&self) -> ResourceMetrics
pub fn runtime_metrics(&self) -> ResourceMetrics
Get detailed resource metrics
Sourcepub fn schedule_knowledge_transfer(&mut self, priority: usize) -> usize
pub fn schedule_knowledge_transfer(&mut self, priority: usize) -> usize
Schedule a knowledge transfer task with the given priority
Sourcepub fn schedule_memory_optimization(&mut self) -> Result<usize, RuntimeError>
pub fn schedule_memory_optimization(&mut self) -> Result<usize, RuntimeError>
Schedule memory optimization based on current memory usage
Sourcepub fn schedule_task(&mut self, task_type: TaskType, priority: usize) -> usize
pub fn schedule_task(&mut self, task_type: TaskType, priority: usize) -> usize
Schedule a task for execution
Sourcepub fn system_health_report(&self) -> String
pub fn system_health_report(&self) -> String
Generate a comprehensive system health report with performance insights
Sourcepub fn tune_surface_networks(&mut self) -> Result<(), RuntimeError>where
D: TriadDriver,
pub fn tune_surface_networks(&mut self) -> Result<(), RuntimeError>where
D: TriadDriver,
Tune surface network parameters based on node performance
Sourcepub fn voice_leading_distance(
&self,
from: &EdgeId,
to: &EdgeId,
) -> Option<usize>
pub fn voice_leading_distance( &self, from: &EdgeId, to: &EdgeId, ) -> Option<usize>
compute the vocal leading distance between two facets; see voice_leading_distance for more information
Trait Implementations§
Auto Trait Implementations§
impl<D> Freeze for Runtime<D>
impl<D> RefUnwindSafe for Runtime<D>where
D: RefUnwindSafe,
impl<D> Send for Runtime<D>
impl<D> Sync for Runtime<D>
impl<D> Unpin for Runtime<D>
impl<D> UnwindSafe for Runtime<D>where
D: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> AsWeight<T> for Twhere
T: Clone + IntoWeight<T>,
impl<T> AsWeight<T> for Twhere
T: Clone + IntoWeight<T>,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<K, S> Identity<K> for Swhere
S: Borrow<K>,
K: Identifier,
impl<K, S> Identity<K> for Swhere
S: Borrow<K>,
K: Identifier,
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>
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>
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