MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / operator<

Function operator<

src/backend/common/Version.hpp:58–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56constexpr static Version NullVersion{-1, -1, -1};
57
58constexpr bool operator<(const Version& lhs, const Version& rhs) {
59 if (lhs == NullVersion || rhs == NullVersion) return false;
60 if (lhs.major() != -1 && rhs.major() != -1 && lhs.major() < rhs.major())
61 return true;
62 if (lhs.minor() != -1 && rhs.minor() != -1 && lhs.minor() < rhs.minor())
63 return true;
64 if (lhs.patch() != -1 && rhs.patch() != -1 && lhs.patch() < rhs.patch())
65 return true;
66 return false;
67}
68
69inline Version fromCudaVersion(size_t version_int) {
70 return {static_cast<int>(version_int / 1000),

Callers

nothing calls this directly

Calls 3

majorMethod · 0.80
minorMethod · 0.80
patchMethod · 0.80

Tested by

no test coverage detected