#include #include #include #include #include "dpf/online_session.hpp" // PIRsona BitMore fetch on a split-io async star (L=1 → 2 servers). // // c++ -std=c++17 -pthread -I include -I thirdparty \ // examples/applications/pirsona_fetch.cpp int main() { constexpr std::size_t L = 1; constexpr std::size_t n = 1u << L; auto seeds = std::make_shared>>(n); auto answers = std::make_shared>>(n); for (std::size_t i = 0; i < n; ++i) { (*seeds)[i].assign(16 * L, static_cast(i + 1)); (*answers)[i].assign(8, static_cast(0x40 + i)); } try { auto client = dpf::protocol::pirsona_bitmore_fetch(L, 16, 8, seeds, answers); const std::vector slots{16u * L, 8u}; dpf::session::drive_async_star(n, slots, std::move(client), [&](std::size_t i) { return dpf::protocol::star_server_reply_rounds(16 * L, 8, (*answers)[i]); }); std::cout << "pirsona_fetch rounds=" << (2 * n) << " servers=" << n << "\n"; } catch (const std::exception & ex) { std::cerr << "pirsona_fetch: " << ex.what() << "\n"; return 1; } return 0; }