This commit is contained in:
Shunsuke Kanda 2021-06-29 09:12:13 +09:00
parent e216688f2f
commit 2b7f1054e7

View file

@ -17,7 +17,7 @@ using trie_7_type = trie<bc_vector_7>;
using trie_8_type = trie<bc_vector_8>;
template <class Trie>
static Trie mmap(const char* address) {
Trie mmap(const char* address) {
Trie idx;
mmap_visitor visitor(address);
visitor.visit(idx);
@ -25,7 +25,7 @@ static Trie mmap(const char* address) {
}
template <class Trie>
static Trie load(std::string_view filepath) {
Trie load(std::string_view filepath) {
Trie idx;
load_visitor visitor(filepath);
visitor.visit(idx);
@ -33,14 +33,14 @@ static Trie load(std::string_view filepath) {
}
template <class Trie>
static std::uint64_t save(const Trie& idx, std::string_view filepath) {
std::uint64_t save(const Trie& idx, std::string_view filepath) {
save_visitor visitor(filepath);
visitor.visit(const_cast<Trie&>(idx));
return visitor.bytes();
}
template <class Trie>
static std::uint64_t memory_in_bytes(const Trie& idx) {
std::uint64_t memory_in_bytes(const Trie& idx) {
size_visitor visitor;
visitor.visit(const_cast<Trie&>(idx));
return visitor.bytes();