|
vitrio 0.1.4
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
|
Performs writes described by a transaction plan on an executor. More...
#include <vitrio/executor_image_saver.hpp>


Public Member Functions | |
| executor_image_saver (std::shared_ptr< image_writer_provider > writers, std::shared_ptr< vitrio::executor > executor) | |
| Construct a saver over a provider and an executor. | |
| std::shared_ptr< completion > | save (const_array source, const image_transaction_plan &plan, std::shared_ptr< const image_transfer_sanitizer > sanitizer) const override |
| Save every region a transaction plan names. | |
Public Member Functions inherited from vitrio::image_saver | |
| image_saver (const image_saver &other)=delete | |
| image_saver (image_saver &&other)=delete | |
| image_saver & | operator= (const image_saver &other)=delete |
| image_saver & | operator= (image_saver &&other)=delete |
Performs writes described by a transaction plan on an executor.
Splits the plan by the file each region addresses and writes each file's regions as one task, fanned out onto the executor this was constructed with. Files are therefore written concurrently to whatever degree the executor allows, not necessarily one after another.
Neither completion::wait nor completion::get of a completion this saver returns may be called from within a task already running on that executor.
| vitrio::executor_image_saver::executor_image_saver | ( | std::shared_ptr< image_writer_provider > | writers, |
| std::shared_ptr< vitrio::executor > | executor | ||
| ) |
Construct a saver over a provider and an executor.
| writers | Where a key becomes an open writer. |
| executor | Where a file's write is run. |
| std::invalid_argument | If writers or executor is null. |
|
overridevirtual |
Save every region a transaction plan names.
May return before the writes are done. The completion returned is ready once every region has been written or has failed, and rethrows what the first failure threw.
The regions of each file are shown to sanitizer beside the extents of that file and of source, and what it answers is written in their place. What it refuses is reported through the completion.
| source | The values to save. |
| plan | The transaction to save. |
| sanitizer | What becomes of the regions that do not fit. |
| std::invalid_argument | If sanitizer is null. |
Implements vitrio::image_saver.