adiar icon indicating copy to clipboard operation
adiar copied to clipboard

Reduce: Use Adiar's I/O Wrappers

Open SSoelvsten opened this issue 2 years ago • 1 comments

In the reduce algorithm, all mappings due to the first reduction rule are placed in a tpie::file_stream<mapping>. With #397 we have cleaned up Adiar's wrappers on files and streams and should use these instead (especially to support #199 later).

  • [ ] Replace the tpie::file_stream<mapping> in __reduce_level using Adiar's wrappers: file<mapping>, file_writer<mapping>, and file_stream<mapping>.

SSoelvsten avatar Dec 17 '22 20:12 SSoelvsten

I am thinking to mark this as a good first issue, but I have a hard time figuring out, whether this could impact performance negatively. If that would be the case, then I would like to do as follows:

  1. Rename the (levelized_)file_stream<mapping> class to (levelized_)file_reader<mapping>.
  2. Add a file_stream class that both provides read and write access. We can probably rephrase the file_writer and file_reader as wrappers on this class.
  3. Use the adiar::file_stream<mapping> class in __reduce_level.

SSoelvsten avatar Dec 17 '22 20:12 SSoelvsten