mreineck / ducc

Fork of https://gitlab.mpcdf.mpg.de/mtr/ducc to simplify external contributions
GNU General Public License v2.0
13 stars 12 forks source link

Template the input MS type passed into `ms2dirty` #31

Closed malcolm-vivosa closed 3 months ago

malcolm-vivosa commented 3 months ago

Template the input MS type passed into ms2dirty instead of hardcoding as cmav<complex<Tms>,2>>

Doing this allows us to pass in a different underlying buffer type when using wgridder. e.g. one that does a callback to get visibilities, which are then perhaps calculated inline (or "on the fly") instead of using raw contigous memory.

The specific use case for us at SKAO is that we want to share one memory buffer between multiple gridders (for different facets) and then apply "facet solutions" for each facet to that memory inside the callback. This allows us to do less reads from disk (or across the network) when working with large data. It also allows for each facet to hold more visibilities in memory at once (when multiple facets are running in parallel) which when gridding large amounts of data with lots of wlayers can have a big performance impact.

There could of course be other use cases that people could use this for. e.g. perhaps generating test/simulated data on the fly or similar.

mreineck commented 3 months ago

Thanks!