20 #include <ripple/basics/partitioned_unordered_map.h>
22 #include <ripple/basics/SHAMapHash.h>
23 #include <ripple/basics/base_uint.h>
24 #include <ripple/beast/hash/uhash.h>
25 #include <ripple/protocol/Protocol.h>
56 return ::beast::uhash<>{}(key);
59 template <
typename Key>
63 return extract(key) % numPartitions;
78 partitioner<std::string>(
template std::size_t partitioner< LedgerIndex >(LedgerIndex const &key, std::size_t const numPartitions)
std::uint32_t LedgerIndex
A ledger index.
template std::size_t partitioner< SHAMapHash >(SHAMapHash const &key, std::size_t const numPartitions)
template std::size_t partitioner< uint256 >(uint256 const &key, std::size_t const numPartitions)
std::size_t partitioner(Key const &key, std::size_t const numPartitions)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
uint256 const & as_uint256() const
static std::size_t extract(uint256 const &key)