NEML2 2.0.0
|
#include <ValueMapLoader.h>
Public Member Functions | |
ValueMapLoader (const ValueMap &value_map, Size batch_dim) | |
std::size_t | total () const override |
Total (fixed) number of batches that will be generated. | |
![]() | |
bool | has_more () const override |
Whether the generator has more work to generate. | |
![]() | |
WorkGenerator ()=default | |
WorkGenerator (WorkGenerator &&) noexcept=default | |
WorkGenerator (const WorkGenerator &)=default | |
WorkGenerator & | operator= (WorkGenerator &&) noexcept=default |
WorkGenerator & | operator= (const WorkGenerator &)=default |
virtual | ~WorkGenerator ()=default |
std::pair< std::size_t, ValueMap > | next (std::size_t n) |
Generate the next n batches of work. | |
std::size_t | offset () const |
Return the current offset, i.e., the number of batches that have been generated. | |
Protected Member Functions | |
std::pair< std::size_t, ValueMap > | generate (std::size_t n) override |
Generate the next n batches of work. | |
ValueMapLoader | ( | const ValueMap & | value_map, |
Size | batch_dim ) |
|
overrideprotectedvirtual |
Generate the next n
batches of work.
Note that in the case of insufficient remaining work, it is possible that the number of batches generated is less than n
.
n | Number of batches to generate |
m
) and the next m
batches of work Implements WorkGenerator< ValueMap >.
|
overridevirtual |
Total (fixed) number of batches that will be generated.
Implements FixedSizeWorkGenerator< ValueMap >.