fn install_compute_results<'view, F: Float>(
    ys: Result<op::OutputArray<op::OpOutput<'view, F>>, op::OpError>,
    storage: &OutputStorage<'view, F>,
) -> Result<op::OutputArray<ValueInfo>, op::OpError> {
    let mut value_info_list = op::OutputArray::new();
    match ys {
        Ok(ys) => {
            debug_assert!(!ys.is_empty(), "Bad op implementation: empty return value");
            for y in ys {
                match y {
                    crate::OpOutput::Reuse(existing_key) => {
                        // push nothing to storage
                        value_info_list.push(ValueInfo::new(ValueType::Owned, existing_key))
                    }
                    crate::OpOutput::Owned(val) => {
                        let new_key = storage.push_owned(val);
                        value_info_list.push(ValueInfo::new(ValueType::Owned, new_key));
                    }
                    crate::OpOutput::View(val) => {
                        let new_key = storage.push_view(val);
                        value_info_list.push(ValueInfo::new(ValueType::View, new_key));
                    }
                }
            }
            Ok(value_info_list)
        }
        Err(e) => Err(e),
    }
}
// Extract output arrays from `results` and stores into `storage`.
Extract output arrays from `results` and stores into `storage`.
Extract output arrays from ` results ` and stores into ` storage ` .
fn install_compute_results<'view, F: Float>(
    ys: Result<op::OutputArray<op::OpOutput<'view, F>>, op::OpError>,
    storage: &OutputStorage<'view, F>,
) -> Result<op::OutputArray<ValueInfo>, op::OpError> {
    let mut value_info_list = op::OutputArray::new();
    match ys {
        Ok(ys) => {
            debug_assert!(!ys.is_empty(), "Bad op implementation: empty return value");
            for y in ys {
                match y {
                    crate::OpOutput::Reuse(existing_key) => {
                        // push nothing to storage
                        value_info_list.push(ValueInfo::new(ValueType::Owned, existing_key))
                    }
                    crate::OpOutput::Owned(val) => {
                        let new_key = storage.push_owned(val);
                        value_info_list.push(ValueInfo::new(ValueType::Owned, new_key));
                    }
                    crate::OpOutput::View(val) => {
                        let new_key = storage.push_view(val);
                        value_info_list.push(ValueInfo::new(ValueType::View, new_key));
                    }
                }
            }
            Ok(value_info_list)
        }
        Err(e) => Err(e),
    }
}
fn install_compute_results < ' view , F : Float > ( ys : Result < op :: OutputArray < op :: OpOutput < ' view , F > > , op :: OpError > , storage : & OutputStorage < ' view , F > , ) -> Result < op :: OutputArray < ValueInfo > , op :: OpError > { let mut value_info_list = op :: OutputArray :: new ( ) ; match ys { Ok ( ys ) => { debug_assert ! ( ys is_empty ( ) " " ) ; for y in ys { match y { crate :: OpOutput :: Reuse ( existing_key ) => { // push nothing to storage value_info_list . push ( ValueInfo :: new ( ValueType :: Owned , existing_key ) ) } crate :: OpOutput :: Owned ( val ) => { let new_key = storage . push_owned ( val ) ; value_info_list . push ( ValueInfo :: new ( ValueType :: Owned , new_key ) ) ; } crate :: OpOutput :: View ( val ) => { let new_key = storage . push_view ( val ) ; value_info_list . push ( ValueInfo :: new ( ValueType :: View , new_key ) ) ; } } } Ok ( value_info_list ) } Err ( e ) => Err ( e ) , } }
Extract output arrays from `results` and stores into `storage`.
Extract output arrays from ` results ` and stores into ` storage ` .
ys
Result<op::OutputArray<op::OpOutput<'view, F>>, op::OpError>
storage
&OutputStorage<'view, F>
ys
Result<op::OutputArray<op::OpOutput<'view, F>>, op::OpError>
storage
&OutputStorage<'view, F>