pub trait KernelExecutor:
Debug
+ Send
+ Sync {
// Required methods
fn execute(&self, inputs: &KernelInputs) -> Result<KernelOutputs>;
fn estimate_execution_time(&self, inputs: &KernelInputs) -> Duration;
fn can_handle(&self, inputs: &KernelInputs) -> bool;
fn get_resource_requirements(
&self,
inputs: &KernelInputs,
) -> ResourceRequirements;
}Expand description
Kernel executor interface
Required Methods§
Sourcefn execute(&self, inputs: &KernelInputs) -> Result<KernelOutputs>
fn execute(&self, inputs: &KernelInputs) -> Result<KernelOutputs>
Execute the kernel with given inputs
Sourcefn estimate_execution_time(&self, inputs: &KernelInputs) -> Duration
fn estimate_execution_time(&self, inputs: &KernelInputs) -> Duration
Get estimated execution time
Sourcefn can_handle(&self, inputs: &KernelInputs) -> bool
fn can_handle(&self, inputs: &KernelInputs) -> bool
Check if kernel can handle given inputs
Sourcefn get_resource_requirements(
&self,
inputs: &KernelInputs,
) -> ResourceRequirements
fn get_resource_requirements( &self, inputs: &KernelInputs, ) -> ResourceRequirements
Get kernel resource requirements