Skip to content

Commit

Permalink
Make nvcomp adapter compatible with new version macros (#16245)
Browse files Browse the repository at this point in the history
New nvcomp version changed the names of the version macros. This PR adds "aliasing" to the old names so rest of the code is not affected.

Authors:
  - Vukasin Milovanovic (https://github.com/vuule)

Approvers:
  - MithunR (https://github.com/mythrocks)
  - Muhammad Haseeb (https://github.com/mhaseeb123)

URL: #16245
  • Loading branch information
vuule authored Jul 15, 2024
1 parent 128f0c9 commit ceb73d9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cpp/src/io/comp/nvcomp_adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@
#include NVCOMP_ZSTD_HEADER
#endif

// When building with nvcomp 4.0 or newer, map the new version macros to the old ones
#ifndef NVCOMP_MAJOR_VERSION
#define NVCOMP_MAJOR_VERSION NVCOMP_VER_MAJOR
#define NVCOMP_MINOR_VERSION NVCOMP_VER_MINOR
#define NVCOMP_PATCH_VERSION NVCOMP_VER_PATCH
#endif

#define NVCOMP_HAS_ZSTD_DECOMP(MAJOR, MINOR, PATCH) (MAJOR > 2 or (MAJOR == 2 and MINOR >= 3))

#define NVCOMP_HAS_ZSTD_COMP(MAJOR, MINOR, PATCH) (MAJOR > 2 or (MAJOR == 2 and MINOR >= 4))
Expand Down

0 comments on commit ceb73d9

Please sign in to comment.