auto_execute

Function auto_execute 

Source
pub fn auto_execute<T, D, F, R>(
    arrays: &mut [&mut AutoDevice<T, D>],
    operation: &str,
    executor: F,
) -> CoreResult<R>
where T: Clone + Send + Sync + 'static + Zero + Div<f64, Output = T> + Default + Mul<Output = T> + Add<Output = T>, D: Dimension + RemoveAxis + 'static, SliceInfo<[SliceInfoElem; 1], Dim<[usize; 1]>, Dim<[usize; 1]>>: SliceArg<D>, SliceInfo<[SliceInfoElem; 2], Dim<[usize; 2]>, Dim<[usize; 2]>>: SliceArg<D>, F: FnOnce(&[&dyn ArrayProtocol]) -> CoreResult<R>, R: 'static,
Expand description

Execute an operation with automatic device selection.

This function automatically selects the best device for the operation based on the arrays involved and the operation being performed.