-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #282 from LLNL/feature/boost_open_addressing_conta…
…iner Add Boost open-addressing set/map containers
- Loading branch information
Showing
5 changed files
with
140 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright 2023 Lawrence Livermore National Security, LLC and other Metall | ||
// Project Developers. See the top-level COPYRIGHT file for details. | ||
// | ||
// SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||
|
||
#ifndef METALL_CONTAINER_UNORDERED_FLAT_MAP_HPP | ||
#define METALL_CONTAINER_UNORDERED_FLAT_MAP_HPP | ||
|
||
#include <functional> | ||
|
||
static_assert(BOOST_VERSION >= 108100, "Unsupported Boost version"); | ||
#include <boost/unordered/unordered_flat_map.hpp> | ||
|
||
#include <metall/metall.hpp> | ||
|
||
namespace metall::container { | ||
|
||
/// \brief An unordered_flat_map container that uses Metall as its default | ||
/// allocator. | ||
template <class Key, class T, class Hash = std::hash<Key>, | ||
class KeyEqual = std::equal_to<Key>, | ||
class Allocator = manager::allocator_type<std::pair<const Key, T>>> | ||
using unordered_flat_map = | ||
boost::unordered_flat_map<Key, T, Hash, KeyEqual, Allocator>; | ||
|
||
} // namespace metall::container | ||
|
||
#endif // METALL_CONTAINER_UNORDERED_FLAT_MAP_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright 2023 Lawrence Livermore National Security, LLC and other Metall | ||
// Project Developers. See the top-level COPYRIGHT file for details. | ||
// | ||
// SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||
|
||
#ifndef METALL_CONTAINER_UNORDERED_FLAT_SET_HPP | ||
#define METALL_CONTAINER_UNORDERED_FLAT_SET_HPP | ||
|
||
#include <functional> | ||
|
||
static_assert(BOOST_VERSION >= 108100, "Unsupported Boost version"); | ||
#include <boost/unordered/unordered_flat_set.hpp> | ||
|
||
#include <metall/metall.hpp> | ||
|
||
namespace metall::container { | ||
|
||
/// \brief An unordered_flat_set container that uses Metall as its default | ||
/// allocator. | ||
template <class Key, class Hash = std::hash<Key>, | ||
class KeyEqual = std::equal_to<Key>, | ||
class Allocator = manager::allocator_type<Key>> | ||
using unordered_flat_set = | ||
boost::unordered_flat_set<Key, Hash, KeyEqual, Allocator>; | ||
|
||
} // namespace metall::container | ||
|
||
#endif // METALL_CONTAINER_UNORDERED_FLAT_SET_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright 2023 Lawrence Livermore National Security, LLC and other Metall | ||
// Project Developers. See the top-level COPYRIGHT file for details. | ||
// | ||
// SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||
|
||
#ifndef METALL_CONTAINER_UNORDERED_NODE_MAP_HPP | ||
#define METALL_CONTAINER_UNORDERED_NODE_MAP_HPP | ||
|
||
#include <functional> | ||
|
||
static_assert(BOOST_VERSION >= 108200, "Unsupported Boost version"); | ||
#include <boost/unordered/unordered_node_map.hpp> | ||
|
||
#include <metall/metall.hpp> | ||
|
||
namespace metall::container { | ||
|
||
/// \brief An unordered_node_map container that uses Metall as its default | ||
/// allocator. | ||
template <class Key, class T, class Hash = std::hash<Key>, | ||
class KeyEqual = std::equal_to<Key>, | ||
class Allocator = manager::allocator_type<std::pair<const Key, T>>> | ||
using unordered_node_map = | ||
boost::unordered_node_map<Key, T, Hash, KeyEqual, Allocator>; | ||
|
||
} // namespace metall::container | ||
|
||
#endif // METALL_CONTAINER_UNORDERED_NODE_MAP_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright 2023 Lawrence Livermore National Security, LLC and other Metall | ||
// Project Developers. See the top-level COPYRIGHT file for details. | ||
// | ||
// SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||
|
||
#ifndef METALL_CONTAINER_UNORDERED_NODE_SET_HPP | ||
#define METALL_CONTAINER_UNORDERED_NODE_SET_HPP | ||
|
||
#include <functional> | ||
|
||
static_assert(BOOST_VERSION >= 108200, "Unsupported Boost version"); | ||
#include <boost/unordered/unordered_node_set.hpp> | ||
|
||
#include <metall/metall.hpp> | ||
|
||
namespace metall::container { | ||
|
||
/// \brief An unordered_node_set container that uses Metall as its default | ||
/// allocator. | ||
template <class Key, class Hash = std::hash<Key>, | ||
class KeyEqual = std::equal_to<Key>, | ||
class Allocator = manager::allocator_type<Key>> | ||
using unordered_node_set = | ||
boost::unordered_node_set<Key, Hash, KeyEqual, Allocator>; | ||
|
||
} // namespace metall::container | ||
|
||
#endif // METALL_CONTAINER_UNORDERED_NODE_SET_HPP |