From e670b0910de4e5ca18ea3e1e92098d91f59f3942 Mon Sep 17 00:00:00 2001 From: Dave Pugmire Date: Mon, 4 Mar 2019 10:04:44 -0500 Subject: [PATCH] fix type bug in zfp. --- vtkm/worklet/zfp/ZFPEncode.h | 2 +- vtkm/worklet/zfp/ZFPTypeInfo.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/vtkm/worklet/zfp/ZFPEncode.h b/vtkm/worklet/zfp/ZFPEncode.h index 9c9bff7fc..040ac093f 100644 --- a/vtkm/worklet/zfp/ZFPEncode.h +++ b/vtkm/worklet/zfp/ZFPEncode.h @@ -359,7 +359,7 @@ struct ZFPBlockEncoder { using Int = typename zfp::zfp_traits::Int; zfp::BlockWriter blockWriter(stream, maxbits, vtkm::Id(blockIdx)); - encode_block(blockWriter, maxbits, get_precision(), (Int*)fblock); + encode_block(blockWriter, maxbits, get_precision(), (Int*)fblock); } }; diff --git a/vtkm/worklet/zfp/ZFPTypeInfo.h b/vtkm/worklet/zfp/ZFPTypeInfo.h index e68d5e7c7..1d8c19e33 100644 --- a/vtkm/worklet/zfp/ZFPTypeInfo.h +++ b/vtkm/worklet/zfp/ZFPTypeInfo.h @@ -97,6 +97,12 @@ inline VTKM_EXEC int get_precision() return 32; } +template <> +inline VTKM_EXEC int get_precision() +{ + return 8; +} + template inline VTKM_EXEC int get_min_exp(); template <>