util

#include <hpx/util/insert_checked.hpp>

namespace hpx
namespace util

Functions

template <typename Iterator>
bool insert_checked(std::pair<Iterator, bool> const &r)

Helper function for writing predicates that test whether an std::map insertion succeeded. This inline template function negates the need to explicitly write the sometimes lengthy std::pair<Iterator, bool> type.

Return
This function returns r.second.
Parameters
  • r: [in] The return value of a std::map insert operation.

template <typename Iterator>
bool insert_checked(std::pair<Iterator, bool> const &r, Iterator &it)

Helper function for writing predicates that test whether an std::map insertion succeeded. This inline template function negates the need to explicitly write the sometimes lengthy std::pair<Iterator, bool> type.

Return
This function returns r.second.
Parameters
  • r: [in] The return value of a std::map insert operation.
  • r: [out] A reference to an Iterator, which is set to r.first.

#include <hpx/util/calculate_fanout.hpp>

namespace hpx
namespace util

Functions

std::size_t calculate_fanout(std::size_t size, std::size_t local_fanout)

#include <hpx/util/await_traits.hpp>

#include <hpx/util/get_and_reset_value.hpp>

namespace hpx
namespace util

Functions

std::uint64_t get_and_reset_value(std::uint64_t &value, bool reset)
std::int64_t get_and_reset_value(std::int64_t &value, bool reset)
template <typename T>
T get_and_reset_value(std::atomic<T> &value, bool reset)
std::vector<std::int64_t> get_and_reset_value(std::vector<std::int64_t> &value, bool reset)

#include <hpx/util/manage_config.hpp>

namespace hpx
namespace util
struct manage_config

Public Types

typedef std::map<std::string, std::string> map_type

Public Functions

manage_config(std::vector<std::string> const &cfg)
void add(std::vector<std::string> const &cfg)
template <typename T>
T get_value(std::string const &key, T dflt = T()) const

Public Members

map_type config_

#include <hpx/util/safe_lexical_cast.hpp>

namespace hpx
namespace util

Functions

template <typename DestType, typename SrcType>
DestType safe_lexical_cast(SrcType const &value, DestType const &dflt = DestType())
template <typename DestType, typename Config>
std::enable_if<std::is_integral<DestType>::value, DestType>::type get_entry_as(Config const &config, std::string const &key, DestType const &dflt)
template <typename DestType, typename Config>
DestType get_entry_as(Config const &config, std::string const &key, std::string const &dflt)