Skip to content

Commit

Permalink
update header to match sz3 v3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
t20100 committed Aug 27, 2024
1 parent 45cb691 commit 2ba2424
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions src/SZ3_extra/SZ3/version.hpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,36 @@
//
// DO NOT MODIFY version.hpp, it is automatically generated by cmake
// The version is controlled in CMakeLists.txt
// Change the version numbers in CMakeLists.txt
//

#ifndef SZ3_VERSION_HPP
#define SZ3_VERSION_HPP
#include <sstream>

#define SZ3_MAGIC_NUMBER 0xF342F310

#define SZ3_NAME "SZ3"
#define SZ3_VER "3.1.7"
#define SZ3_VER "3.2.0"
#define SZ3_VER_MAJOR 3
#define SZ3_VER_MINOR 1
#define SZ3_VER_PATCH 7
#define SZ3_VER_TWEAK
#define SZ3_VER_MINOR 2
#define SZ3_VER_PATCH 0
#define SZ3_VER_TWEAK

#define SZ3_DATA_VER "3.2.0"

uint32_t versionInt(const std::string& version) {
uint32_t major = 0, minor = 0, patch = 0;
char dot;
std::stringstream ss(version);
ss >> major >> dot >> minor >> dot >> patch;
return (major << 24) | (minor << 16) | (patch<<8);
}

std::string versionStr(uint32_t version) {
uint32_t major = (version >> 24) & 0xFF;
uint32_t minor = (version >> 16) & 0xFF;
uint32_t patch = (version >> 8) & 0xFF;
return std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(patch);
}

#endif //SZ3_VERSION_HP
#endif //SZ3_VERSION_HPP

0 comments on commit 2ba2424

Please sign in to comment.