5#include <vitrio/export.hpp>
6#include <vitrio/image_scratch.hpp>
7#include <vitrio/image_scratch_open_mode.hpp>
8#include <vitrio/platform.hpp>
14#include <unordered_map>
56 :
public image_scratch
100 std::shared_ptr<image_scratch_storage> storage,
101 std::size_t run_length,
102 image_scratch_open_mode mode = image_scratch_open_mode::empty
107 std::shared_ptr<image_scratch_entry>
108 find(
const std::string &key)
override;
111 using entry_map_type =
112 std::unordered_map<std::string, std::shared_ptr<image_scratch_entry>>;
114 VITRIO_STD_MEMBER_INTERFACE
115 entry_map_type m_entries;
148std::shared_ptr<image_scratch> create_host_image_scratch(
152 std::size_t run_length,
153 std::size_t max_size = std::numeric_limits<std::size_t>::max()
203std::shared_ptr<image_scratch> create_file_image_scratch(
208 const std::string &path,
209 std::size_t run_length,
210 std::size_t max_size = std::numeric_limits<std::size_t>::max()
280std::shared_ptr<image_scratch> create_directory_image_scratch(
285 const std::string &directory,
286 std::size_t run_length,
Where a task is handed off to run, now or later.
Definition executor.hpp:26
Threads that carry out the reads and writes of files, each many at once, and hand the computations th...
Definition file_transfer_pool.hpp:30
Groups a list of image locations by file.
Definition image_location_grouping.hpp:31
Interface to serve image_reader given a key.
Definition image_reader_provider.hpp:26
Where a scratch keeps its copies: a block of bytes, in main memory or in a file, which it reads and w...
Definition image_scratch_storage.hpp:41
indexed_image_scratch(const image_location_grouping &locations, image_reader_provider &files, executor &tasks, std::shared_ptr< image_scratch_storage > storage, std::size_t run_length, image_scratch_open_mode mode=image_scratch_open_mode::empty)
Construct a scratch for a grouping of locations.
std::shared_ptr< image_scratch_entry > find(const std::string &key) override
Get what is held of a file, to read it and to add to it.