Struct DataLoaderOptions
Defined in File dataloader_options.h
Page Contents
Struct Documentation
-
struct DataLoaderOptions
Options to configure a
DataLoader
.Public Functions
-
inline auto batch_size(const size_t &new_batch_size) -> decltype(*this)
The size of each batch to fetch.
-
inline auto workers(const size_t &new_workers) -> decltype(*this)
The number of worker threads to launch.
If zero, the main thread will synchronously perform the data loading.
-
inline auto max_jobs(const std::optional<size_t> &new_max_jobs) -> decltype(*this)
The maximum number of jobs to enqueue for fetching by worker threads.
Defaults to two times the number of worker threads.
-
inline auto timeout(const std::optional<std::chrono::milliseconds> &new_timeout) -> decltype(*this)
An optional limit on the time to wait for the next batch.
-
inline auto enforce_ordering(const bool &new_enforce_ordering) -> decltype(*this)
Whether to enforce ordering of batches when multiple are loaded asynchronously by worker threads.
Set to
false
for better performance if you do not care about determinism.
-
inline auto batch_size(const size_t &new_batch_size) -> decltype(*this)