33 #ifndef GKO_CORE_BASE_VERSION_HPP_ 34 #define GKO_CORE_BASE_VERSION_HPP_ 37 #include <ginkgo/config.hpp> 38 #include <ginkgo/core/base/types.hpp> 76 const char *
const tag;
80 #define GKO_ENABLE_VERSION_COMPARISON(_operator) \ 81 inline bool operator _operator(const version &first, \ 82 const version &second) \ 84 return std::tie(first.major, first.minor, first.patch) \ 85 _operator std::tie(second.major, second.minor, second.patch); \ 88 "This assert is used to counter the false positive extra " \ 89 "semi-colon warnings") 91 GKO_ENABLE_VERSION_COMPARISON(<);
92 GKO_ENABLE_VERSION_COMPARISON(<=);
93 GKO_ENABLE_VERSION_COMPARISON(==);
94 GKO_ENABLE_VERSION_COMPARISON(!=);
95 GKO_ENABLE_VERSION_COMPARISON(>=);
96 GKO_ENABLE_VERSION_COMPARISON(>);
98 #undef GKO_ENABLE_VERSION_COMPARISON 109 inline std::ostream &operator<<(std::ostream &os,
const version &ver)
113 os <<
" (" << ver.
tag <<
")";
188 static constexpr
version get_header_version() noexcept
190 return {GKO_VERSION_MAJOR, GKO_VERSION_MINOR, GKO_VERSION_PATCH,
194 static version get_core_version() noexcept;
196 static version get_reference_version() noexcept;
198 static version get_omp_version() noexcept;
200 static version get_cuda_version() noexcept;
203 : header_version{get_header_version()},
204 core_version{get_core_version()},
205 reference_version{get_reference_version()},
206 omp_version{get_omp_version()},
207 cuda_version{get_cuda_version()}
220 std::ostream &operator<<(std::ostream &os,
const version_info &ver_info);
226 #endif // GKO_CORE_BASE_VERSION_HPP_ version cuda_version
Contains version information of the CUDA module.
Definition: version.hpp:185
version reference_version
Contains version information of the reference module.
Definition: version.hpp:171
version core_version
Contains version information of the core library.
Definition: version.hpp:163
The Ginkgo namespace.
Definition: abstract_factory.hpp:45
std::uint64_t uint64
64-bit unsigned integral type.
Definition: types.hpp:140
Ginkgo uses version numbers to label new features and to communicate backward compatibility guarantee...
Definition: version.hpp:140
version omp_version
Contains version information of the OMP module.
Definition: version.hpp:178
const uint64 minor
The minor version number.
Definition: version.hpp:64
This structure is used to represent versions of various Ginkgo modules.
Definition: version.hpp:55
const uint64 major
The major version number.
Definition: version.hpp:59
version header_version
Contains version information of the header files.
Definition: version.hpp:156
const char *const tag
Addition tag string that describes the version in more detail.
Definition: version.hpp:76
const uint64 patch
The patch version number.
Definition: version.hpp:69