pub struct AI3Engine {
pub task_distributor: TaskDistributor,
/* private fields */
}Expand description
Main AI3 engine: coordinates tensor operations and mining tasks (Ported from .AI3 ai3-lib with PoT-O extensions).
Fields§
§task_distributor: TaskDistributorDistributor for mining tasks.
Implementations§
Source§impl AI3Engine
impl AI3Engine
pub fn new() -> AI3Engine
pub fn with_config(config: EngineConfig) -> AI3Engine
Sourcepub fn execute_task(&self, task: &MiningTask) -> Result<Tensor, TribeError>
pub fn execute_task(&self, task: &MiningTask) -> Result<Tensor, TribeError>
Execute a tensor operation from a mining task and return the result tensor.
Sourcepub fn get_stats(&self) -> EngineStats
pub fn get_stats(&self) -> EngineStats
Returns current engine statistics.
Sourcepub fn record_result(&self, success: bool, duration: Duration)
pub fn record_result(&self, success: bool, duration: Duration)
Records a task result for statistics.
Trait Implementations§
Source§impl TensorEngine for AI3Engine
impl TensorEngine for AI3Engine
fn execute_task(&self, task: &MiningTask) -> Result<Tensor, TribeError>
fn get_stats(&self) -> EngineStats
fn record_result(&self, success: bool, duration: Duration)
Auto Trait Implementations§
impl Freeze for AI3Engine
impl RefUnwindSafe for AI3Engine
impl Send for AI3Engine
impl Sync for AI3Engine
impl Unpin for AI3Engine
impl UnsafeUnpin for AI3Engine
impl UnwindSafe for AI3Engine
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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