pub struct MultiBrickExecutor { /* private fields */ }Expand description
Multi-backend executor for brick operations
Dispatches brick execution to the best available backend.
Implementations§
Source§impl MultiBrickExecutor
impl MultiBrickExecutor
Sourcepub fn new(data_tracker: Arc<BrickDataTracker>) -> Self
pub fn new(data_tracker: Arc<BrickDataTracker>) -> Self
Create a new multi-backend executor
Sourcepub fn with_selector(self, selector: BackendSelector) -> Self
pub fn with_selector(self, selector: BackendSelector) -> Self
Create with custom backend selector
Sourcepub fn with_gpu_available(self, available: bool) -> Self
pub fn with_gpu_available(self, available: bool) -> Self
Set GPU availability
Sourcepub fn execute(
&self,
brick: &dyn Brick,
input: BrickInput,
) -> BrickResult<BrickOutput>
pub fn execute( &self, brick: &dyn Brick, input: BrickInput, ) -> BrickResult<BrickOutput>
Execute a brick on the best backend
Sourcepub fn execute_distributed<B: Brick>(
&self,
brick: &DistributedBrick<B>,
input: BrickInput,
) -> BrickResult<BrickOutput>
pub fn execute_distributed<B: Brick>( &self, brick: &DistributedBrick<B>, input: BrickInput, ) -> BrickResult<BrickOutput>
Execute distributed brick
Sourcepub fn data_tracker(&self) -> &Arc<BrickDataTracker>
pub fn data_tracker(&self) -> &Arc<BrickDataTracker>
Get the data tracker
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MultiBrickExecutor
impl RefUnwindSafe for MultiBrickExecutor
impl Send for MultiBrickExecutor
impl Sync for MultiBrickExecutor
impl Unpin for MultiBrickExecutor
impl UnsafeUnpin for MultiBrickExecutor
impl UnwindSafe for MultiBrickExecutor
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> 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