fair-acc / opendigitizer

Generic Digitizer Framework based on OpenCMW
GNU Lesser General Public License v3.0
6 stars 3 forks source link

[0pt,6pt] Clean up the prototype code for presenting to wider GR audience #45

Closed ivan-cukic closed 1 year ago

ivan-cukic commented 1 year ago

Background

We need two types of processing: a) synchronous stream- as well as b) asynchronous message-type processing (i.e. chunked and/or DataSet based data). The original OpenDigitizer draft design intended that the latter would be done using RxCpp. However, since the RxCpp development somewhat stalled and because both processing types are graph-type problems, the proposal was to rationalise and merge both designs into one using GNU Radio in it's 4.0 version incarnation.

The graph-prototype is targeted as an enhancement and replacement of the low-level GNU Radio 4.0 API to enable such message-type processing using graphs.

Immediate things to be refactored prior to merging with GR 4.0 -- 'Step one'

template class my_node : public node<my_node>, Setting { public: IN in0; IN in1; OUT out;

[[nodiscard]] constexpr T process_one(T value1, T value2) const noexcept {
    return  settings.scaling_factor * some_math_func(value1, value2); // ... do some operation with values from ports in[0,1]
}

}; ENABLE_REFLECTION_FOR((my_node, float, double, int), in0, in1, out) // <- refl::cpp macro for my_node


  - [x] SIMD loop + epilogue integration - proof of concept : https://github.com/fair-acc/graph-prototype/pull/26
  - [x] pre-finish: @wirew0rm will iterate with @ivan-cukic and @RalphSteinhagen on the new refactored design
  - [x] finish: @wirew0rm (as lead) will iterate with GR maintainers (@mormj, @willcode et al.) regarding maintainability, readability, etc. (N.B. to be kept in mind... this is not feature complete yet, just the basic framework)
  - [x] post-finish: remove/close rxcpp issue w/ appropriate replacement comments
    (N.B. after GR governance team accepted to merge the ideas developed in graph-prototype with GR 4.0)
      * the following issues can be removed [total: 15SP]:
        https://github.com/fair-acc/opencmw-cpp/issues/195
        https://github.com/fair-acc/opencmw-cpp/issues/196
        https://github.com/fair-acc/opencmw-cpp/issues/198
      * the following issues have to be adapted (total: 8SP): 
         https://github.com/fair-acc/opencmw-cpp/issues/199
         https://github.com/fair-acc/opencmw-cpp/issues/200

### Steps afterward (EPIC: https://github.com/fair-acc/opendigitizer/issues/42)
 * immediate follow-up: https://github.com/fair-acc/opendigitizer/issues/46
ivan-cukic commented 1 year ago
RalphSteinhagen commented 1 year ago

Done. Thanks a lot to @ivan-cukic and the good work he put into this!