Metall v0.30
A persistent memory allocator for data-centric analytics
 
Loading...
Searching...
No Matches
version.hpp
Go to the documentation of this file.
1// Copyright 2020 Lawrence Livermore National Security, LLC and other Metall
2// Project Developers. See the top-level COPYRIGHT file for details.
3//
4// SPDX-License-Identifier: (Apache-2.0 OR MIT)
5
6#ifndef METALL_VERSION_HPP
7#define METALL_VERSION_HPP
8
17#define METALL_VERSION 3000
18
19namespace metall {
21using version_type = uint32_t;
22static_assert(std::numeric_limits<version_type>::max() >= METALL_VERSION,
23 "version_type cannot handle the current version");
24
25#ifndef DOXYGEN_SKIP
28namespace ver_detail {
29static constexpr version_type k_error_version = 0;
30static_assert(k_error_version != METALL_VERSION,
31 "The current version is equal to a error number");
32} // namespace ver_detail
33#endif // DOXYGEN_SKIP
34
42inline std::string to_version_string(const version_type version) {
43 return std::to_string(version / 100000) + "." +
44 std::to_string(version / 100 % 1000) + "." +
45 std::to_string(version % 100);
46}
47} // namespace metall
48
49#endif // METALL_VERSION_HPP
The top level of namespace of Metall.
Definition basic_manager.hpp:22
uint32_t version_type
Variable type to handle a version data.
Definition version.hpp:21
std::string to_version_string(const version_type version)
Converts a raw version number to a std::string with format 'MAJOR.MINOR.PATCH'.
Definition version.hpp:42
#define METALL_VERSION
Metall version. Metall follows the Semantic Versioning 2.0.0.
Definition version.hpp:17