5#ifndef GKO_PUBLIC_CORE_BASE_VERSION_HPP_
6#define GKO_PUBLIC_CORE_BASE_VERSION_HPP_
11#include <ginkgo/config.hpp>
12#include <ginkgo/core/base/types.hpp>
51 const char*
const tag;
60inline bool operator!=(
const version& first,
const version& second)
62 return !(first == second);
67 if (first.major < second.major)
return true;
68 if (first.major == second.major && first.minor < second.minor)
return true;
69 if (first.major == second.major && first.minor == second.minor &&
70 first.patch < second.patch)
77 return !(second < first);
82 return second < first;
87 return !(first < second);
90#undef GKO_ENABLE_VERSION_COMPARISON
101inline std::ostream& operator<<(std::ostream& os,
const version& ver)
105 os <<
" (" << ver.
tag <<
")";
139 static const version_info&
get()
141 static version_info info{};
194 static constexpr version get_header_version() noexcept
196 return version{GKO_VERSION_MAJOR, GKO_VERSION_MINOR, GKO_VERSION_PATCH,
200 static version get_core_version() noexcept;
202 static
version get_reference_version() noexcept;
204 static
version get_omp_version() noexcept;
206 static
version get_cuda_version() noexcept;
208 static
version get_hip_version() noexcept;
210 static
version get_dpcpp_version() noexcept;
232std::ostream& operator<<(std::ostream& os,
const version_info& ver_info);
Ginkgo uses version numbers to label new features and to communicate backward compatibility guarantee...
Definition version.hpp:132
version dpcpp_version
Contains version information of the DPC++ module.
Definition version.hpp:191
version header_version
Contains version information of the header files.
Definition version.hpp:148
version cuda_version
Contains version information of the CUDA module.
Definition version.hpp:177
version reference_version
Contains version information of the reference module.
Definition version.hpp:163
version omp_version
Contains version information of the OMP module.
Definition version.hpp:170
version core_version
Contains version information of the core library.
Definition version.hpp:155
version hip_version
Contains version information of the HIP module.
Definition version.hpp:184
static const version_info & get()
Returns an instance of version_info.
Definition version.hpp:139
The Ginkgo namespace.
Definition abstract_factory.hpp:20
std::uint64_t uint64
64-bit unsigned integral type.
Definition types.hpp:136
This structure is used to represent versions of various Ginkgo modules.
Definition version.hpp:25
const uint64 major
The major version number.
Definition version.hpp:34
const char *const tag
Addition tag string that describes the version in more detail.
Definition version.hpp:51
const uint64 patch
The patch version number.
Definition version.hpp:44
const uint64 minor
The minor version number.
Definition version.hpp:39