From c886ba9c06dab5eb4245bc0d90d7f66525af9953 Mon Sep 17 00:00:00 2001 From: anagainaru Date: Fri, 10 Feb 2023 13:36:52 -0500 Subject: [PATCH] Removing long double from the types that can use MinMax on the device Co-authored-by: Greg Eisenhauer --- source/adios2/toolkit/format/bp/bp4/BP4Serializer.tcc | 3 ++- source/adios2/toolkit/format/bp5/BP5Serializer.cpp | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/source/adios2/toolkit/format/bp/bp4/BP4Serializer.tcc b/source/adios2/toolkit/format/bp/bp4/BP4Serializer.tcc index ca0a760729..59b08923e5 100644 --- a/source/adios2/toolkit/format/bp/bp4/BP4Serializer.tcc +++ b/source/adios2/toolkit/format/bp/bp4/BP4Serializer.tcc @@ -339,7 +339,8 @@ BP4Serializer::GetBPStats(const bool singleValue, if (blockInfo.MemSpace == MemorySpace::CUDA) { const size_t size = helper::GetTotalSize(blockInfo.Count); - helper::CUDAMinMax(blockInfo.Data, size, stats.Min, stats.Max); + if (!std::is_same::value) + helper::CUDAMinMax(blockInfo.Data, size, stats.Min, stats.Max); return stats; } #endif diff --git a/source/adios2/toolkit/format/bp5/BP5Serializer.cpp b/source/adios2/toolkit/format/bp5/BP5Serializer.cpp index 96125b32d5..32d00f572c 100644 --- a/source/adios2/toolkit/format/bp5/BP5Serializer.cpp +++ b/source/adios2/toolkit/format/bp5/BP5Serializer.cpp @@ -606,8 +606,9 @@ static void GetMinMax(const void *Data, size_t ElemCount, const DataType Type, Type == helper::GetDataType()) \ { \ const T *values = (const T *)Data; \ - helper::CUDAMinMax(values, ElemCount, MinMax.MinUnion.field_##N, \ - MinMax.MaxUnion.field_##N); \ + if (!std::is_same::value) \ + helper::CUDAMinMax(values, ElemCount, MinMax.MinUnion.field_##N, \ + MinMax.MaxUnion.field_##N); \ } ADIOS2_FOREACH_MINMAX_STDTYPE_2ARGS(pertype) #undef pertype