Light-weight header-only library for parallel function calls and continuations in C++ based on Eric Niebler's talk at CppCon 2019.
Thread pool added (section 2.2 in README.md)
Lazy can now be compiled with both gcc and clang.
Lazy::Sequence now works with std::ranges::views if you use C++20 compiler. Example:
constexpr int N = 10;
auto even = [](auto i) { return 0 == i % 2; };
auto square = [](auto i) { return i * i; };
auto lseq = Lazy::Sequence{N};
for (auto i : lseq | std::views::filter(even) | std::views::transform(square)) {
std::cout << i << ' ';
}
std::cout << "\n";
Output: 0 4 16 36 64
CMake integration by FriendlyAnon.
Vector in, vector out - mode is now faster if the return type of the function is void. Dummy return type is not needed anymore. Also Lazy::Sequence range container has been added. See README.md and example 2.6 in example-2.cc for further details.
The issue where the output type of Lazy::runForAll(...) was sometimes std::vector when it should be std:array has been fixed.
Includes the functionality of the three use cases described in README.md.