mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-31 05:03:22 +08:00
3768a4d37e
* [adios2] add zfp feature * remove zfp version
66 lines
2.2 KiB
Diff
66 lines
2.2 KiB
Diff
diff --git a/cmake/DetectOptions.cmake b/cmake/DetectOptions.cmake
|
|
index d4e2e5dbf..80f231c16 100644
|
|
--- a/cmake/DetectOptions.cmake
|
|
+++ b/cmake/DetectOptions.cmake
|
|
@@ -89,9 +89,9 @@ endif()
|
|
|
|
# ZFP
|
|
if(ADIOS2_USE_ZFP STREQUAL AUTO)
|
|
- find_package(ZFP 0.5.1 CONFIG)
|
|
+ find_package(ZFP CONFIG)
|
|
elseif(ADIOS2_USE_ZFP)
|
|
- find_package(ZFP 0.5.1 REQUIRED CONFIG)
|
|
+ find_package(ZFP REQUIRED CONFIG)
|
|
endif()
|
|
if(ZFP_FOUND)
|
|
set(ADIOS2_HAVE_ZFP TRUE)
|
|
diff --git a/source/adios2/operator/compress/CompressZFP.cpp b/source/adios2/operator/compress/CompressZFP.cpp
|
|
index 77aaa6f08..e8162f97a 100644
|
|
--- a/source/adios2/operator/compress/CompressZFP.cpp
|
|
+++ b/source/adios2/operator/compress/CompressZFP.cpp
|
|
@@ -13,7 +13,7 @@
|
|
#include <zfp.h>
|
|
|
|
/* CMake will make sure zfp >= 5.0.1 */
|
|
-#if ZFP_VERSION_RELEASE > 1 && !defined(ZFP_DEFAULT_EXECUTION_POLICY)
|
|
+//#if ZFP_VERSION_RELEASE > 1 && !defined(ZFP_DEFAULT_EXECUTION_POLICY)
|
|
|
|
/* ZFP will default to SERIAL if CUDA is not available */
|
|
#ifdef ADIOS2_HAVE_ZFP_CUDA
|
|
@@ -22,7 +22,7 @@
|
|
#define ZFP_DEFAULT_EXECUTION_POLICY zfp_exec_serial
|
|
#endif
|
|
|
|
-#endif
|
|
+//#endif
|
|
|
|
namespace adios2
|
|
{
|
|
@@ -80,7 +80,7 @@ size_t CompressZFP::Operate(const char *dataIn, const Dims &blockStart,
|
|
PutParameter(bufferOut, bufferOutOffset,
|
|
static_cast<uint8_t>(ZFP_VERSION_MINOR));
|
|
PutParameter(bufferOut, bufferOutOffset,
|
|
- static_cast<uint8_t>(ZFP_VERSION_RELEASE));
|
|
+ static_cast<uint8_t>(ZFP_VERSION_PATCH));
|
|
PutParameters(bufferOut, bufferOutOffset, m_Parameters);
|
|
// zfp V1 metadata end
|
|
|
|
@@ -302,7 +302,7 @@ zfp_stream *GetZFPStream(const Dims &dimensions, DataType type,
|
|
auto itPrecision = parameters.find("precision");
|
|
const bool hasPrecision = itPrecision != parameters.end();
|
|
|
|
-#if ZFP_VERSION_RELEASE > 1
|
|
+//#if ZFP_VERSION_RELEASE > 1
|
|
auto itBackend = parameters.find("backend");
|
|
const bool hasBackend = itBackend != parameters.end();
|
|
|
|
@@ -332,7 +332,7 @@ zfp_stream *GetZFPStream(const Dims &dimensions, DataType type,
|
|
|
|
zfp_stream_set_execution(stream, policy);
|
|
}
|
|
-#endif
|
|
+//#endif
|
|
|
|
if ((hasAccuracy && hasPrecision) || (hasAccuracy && hasRate) ||
|
|
(hasPrecision && hasRate) ||
|