Skip to content

Commit

Permalink
Merge pull request #259 from LLNL/hotfix/0.23.1
Browse files Browse the repository at this point in the history
Hotfix/0.23.1
  • Loading branch information
KIwabuchi authored Nov 22, 2022
2 parents 2a4c78a + c0a560a commit bf31ba8
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ endif()
# Metall general configuration
# -------------------------------------------------------------------------------- #
project(Metall
VERSION 0.23
VERSION 0.23.1
DESCRIPTION "A persistent memory allocator for data-centric analytics"
HOMEPAGE_URL "https://github.com/LLNL/metall")

Expand Down
2 changes: 1 addition & 1 deletion docs/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "Metall"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = v0.23
PROJECT_NUMBER = v0.23.1

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
9 changes: 4 additions & 5 deletions example/container/string_key_store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,20 @@ void json_store_example() {
const uint64_t hash_seed = 123;
auto *store = manager.construct<json_store_type>("json-store")(unique, hash_seed, manager.get_allocator());

store->insert("a",
mj::parse(R"({"name":"Alice"})", manager.get_allocator()));
store->insert("a"); // Insert with only key.

store->insert("b",
mj::parse(R"({"name":"N/A"})", manager.get_allocator()));
store->insert("b",
mj::parse(R"({"name":"Bob"})", manager.get_allocator())); // Overwrite
mj::parse(R"({"name":"Alice"})", manager.get_allocator())); // Overwrite
}

{
metall::manager manager(metall::open_read_only, "./string_key_store_obj");
auto *store = manager.find<json_store_type>("json-store").first;

// Use find() to locate elements.
// Use find() to locate an element.
std::cout << "a : " << mj::serialize(store->value(store->find("a"))) << std::endl;
std::cout << "b : " << mj::serialize(store->value(store->find("b"))) << std::endl;
}
}
}
5 changes: 4 additions & 1 deletion include/metall/container/experimental/json/array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,12 @@ class array {
using iterator = typename array_type::iterator;
using const_iterator = typename array_type::const_iterator;

/// \brief Constructor
array() = default;

/// \brief Constructor.
/// \param alloc An allocator object.
explicit array(const allocator_type &alloc = allocator_type())
explicit array(const allocator_type &alloc)
: m_array(alloc) {}

/// \brief Copy constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,12 @@ class compact_object {
using iterator = typename value_storage_type::iterator;
using const_iterator = typename value_storage_type::const_iterator;

/// \brief Constructor.
compact_object() {}

/// \brief Constructor.
/// \param alloc An allocator object.
explicit compact_object(const allocator_type &alloc = allocator_type())
explicit compact_object(const allocator_type &alloc)
: m_value_storage(alloc) {}

/// \brief Copy constructor
Expand Down
7 changes: 5 additions & 2 deletions include/metall/container/experimental/json/indexed_object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace jsndtl {
/// \brief Provides 'equal' calculation for other object types that have the same interface as the object class.
template <typename allocator_type, typename other_object_type>
inline bool general_indexed_object_equal(const indexed_object<allocator_type> &object,
const other_object_type &other_object) noexcept {
const other_object_type &other_object) noexcept {
if (object.size() != other_object.size()) return false;

for (const auto &key_value: object) {
Expand Down Expand Up @@ -80,9 +80,12 @@ class indexed_object {
using iterator = typename value_storage_type::iterator;
using const_iterator = typename value_storage_type::const_iterator;

/// \brief Constructor.
indexed_object() {}

/// \brief Constructor.
/// \param alloc An allocator object.
explicit indexed_object(const allocator_type &alloc = allocator_type())
explicit indexed_object(const allocator_type &alloc)
: m_index_table(alloc),
m_value_storage(alloc) {}

Expand Down
6 changes: 5 additions & 1 deletion include/metall/container/experimental/json/value.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,13 @@ class value {
object_type, array_type, string_type>;

public:

/// \brief Constructor.
value() {}

/// \brief Constructor.
/// \param alloc An allocator object.
explicit value(const allocator_type &alloc = allocator_type())
explicit value(const allocator_type &alloc)
: m_allocator(alloc),
m_data(null_type()) {}

Expand Down
2 changes: 1 addition & 1 deletion include/metall/version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/// METALL_VERSION / 100 % 1000 // the minor version.
/// METALL_VERSION % 100 // the patch level.
/// \endcode
#define METALL_VERSION 2300
#define METALL_VERSION 2301

namespace metall {
/// \brief Variable type to handle a version data.
Expand Down

0 comments on commit bf31ba8

Please sign in to comment.