MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / Version

Class Version

src/backend/common/Version.hpp:24–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22namespace arrayfire {
23namespace common {
24class Version {
25 int major_ = -1;
26 int minor_ = -1;
27 int patch_ = -1;
28
29 public:
30 /// Checks if the major version is defined before minor and minor is defined
31 /// before patch
32 constexpr static bool validate(int major_, int minor_,
33 int patch_) noexcept {
34 return !(major_ < 0 && (minor_ >= 0 || patch_ >= 0)) &&
35 !(minor_ < 0 && patch_ >= 0);
36 }
37
38 constexpr int major() const { return major_; }
39 constexpr int minor() const { return minor_; }
40 constexpr int patch() const { return patch_; }
41
42 constexpr Version(const int ver_major, const int ver_minor = -1,
43 const int ver_patch = -1) noexcept
44 : major_(ver_major), minor_(ver_minor), patch_(ver_patch) {}
45};
46
47constexpr bool operator==(const Version& lhs, const Version& rhs) {
48 return lhs.major() == rhs.major() && lhs.minor() == rhs.minor() &&

Callers 2

cudnnModule.cppFile · 0.50
cudnnModuleMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected