version.h.in 975 Bytes
Newer Older
zhuwenwen's avatar
zhuwenwen committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <cstdint>
#include <string>

#define CUTLASS_MAJOR @CUTLASS_VERSION_MAJOR@
#define CUTLASS_MINOR @CUTLASS_VERSION_MINOR@
#define CUTLASS_PATCH @CUTLASS_VERSION_PATCH@
#define CUTLASS_BUILD @CUTLASS_VERSION_BUILD@
#define CUTLASS_VERSION ((CUTLASS_MAJOR)*100 + (CUTLASS_MINOR)*10 + CUTLASS_PATCH)

namespace cutlass {

  inline uint32_t getVersion() {
    return CUTLASS_VERSION;
  }
  inline uint32_t getVersionMajor() {
    return CUTLASS_MAJOR;
  }
  inline uint32_t getVersionMinor() {
    return CUTLASS_MINOR;
  }
  inline uint32_t getVersionPatch() {
    return CUTLASS_PATCH;
  }
  inline uint32_t getVersionBuild() {
    return CUTLASS_BUILD + 0;
  }
  inline std::string getVersionString() {
    std::string version = "@CUTLASS_VERSION@";
    if (getVersionBuild()) {
      version += "." + std::to_string(getVersionBuild());
    }
    return version;
  }
  inline std::string getGitRevision() {
    return "@CUTLASS_REVISION@";
  }

} // namespace cutlass