Commit c3737c72 authored by Matthew Letter's avatar Matthew Letter
Browse files

Merge branch 'master' into increase-worklet-arguments

parents d9c51d65 84201902
...@@ -14,4 +14,4 @@ data/* filter=lfs diff=lfs merge=lfs -text ...@@ -14,4 +14,4 @@ data/* filter=lfs diff=lfs merge=lfs -text
*.rst whitespace=tab-in-indent conflict-marker-size=79 *.rst whitespace=tab-in-indent conflict-marker-size=79
*.txt whitespace=tab-in-indent *.txt whitespace=tab-in-indent
diy/** -format.clang-format -whitespace vtkm/thirdparty/diy/vtkmdiy/** -format.clang-format -whitespace
...@@ -39,9 +39,7 @@ set(FILES_TO_CHECK ...@@ -39,9 +39,7 @@ set(FILES_TO_CHECK
set(EXCEPTIONS set(EXCEPTIONS
LICENSE.txt LICENSE.txt
README.txt README.txt
diy/include/diy vtkm/thirdparty/diy/vtkmdiy
diy/LEGAL.txt
diy/LICENSE.txt
) )
if (NOT VTKm_SOURCE_DIR) if (NOT VTKm_SOURCE_DIR)
......
...@@ -39,11 +39,21 @@ set(FILES_TO_CHECK ...@@ -39,11 +39,21 @@ set(FILES_TO_CHECK
set(EXCEPTIONS set(EXCEPTIONS
) )
set(DIRECTORY_EXCEPTIONS
${VTKm_SOURCE_DIR}/vtkm/thirdparty/diy/vtkmdiy
)
if (NOT VTKm_SOURCE_DIR) if (NOT VTKm_SOURCE_DIR)
message(SEND_ERROR "VTKm_SOURCE_DIR not defined.") message(SEND_ERROR "VTKm_SOURCE_DIR not defined.")
endif (NOT VTKm_SOURCE_DIR) endif (NOT VTKm_SOURCE_DIR)
function(check_directory directory parent_CMakeLists_contents) function(check_directory directory parent_CMakeLists_contents)
foreach(exception IN LISTS DIRECTORY_EXCEPTIONS)
if(directory MATCHES "^${exception}$")
return()
endif()
endforeach(exception)
message("Checking directory ${directory}...") message("Checking directory ${directory}...")
get_filename_component(directory_name "${directory}" NAME) get_filename_component(directory_name "${directory}" NAME)
......
...@@ -221,11 +221,6 @@ find_package(Pyexpander) ...@@ -221,11 +221,6 @@ find_package(Pyexpander)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Add subdirectories # Add subdirectories
if(VTKm_ENABLE_MPI)
# This `if` is temporary and will be removed once `diy` supports building
# without MPI.
add_subdirectory(diy)
endif()
add_subdirectory(vtkm) add_subdirectory(vtkm)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
......
...@@ -20,4 +20,7 @@ ...@@ -20,4 +20,7 @@
list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
".*warning: ignoring loop annotation.*" ".*warning: ignoring loop annotation.*"
) ".*diy.include.diy.*WShadow.*" # exclude `diy` shadow warnings.
".*diy.include.diy.*note: shadowed.*" # exclude `diy` shadow warnings.
".*diy.include.diy.storage.hpp.*Wunused-result.*" # this is a TODO in DIY.
)
...@@ -35,6 +35,11 @@ target_link_libraries(CosmoHaloFinder_SERIAL PRIVATE ${VTKm_LIBRARIES}) ...@@ -35,6 +35,11 @@ target_link_libraries(CosmoHaloFinder_SERIAL PRIVATE ${VTKm_LIBRARIES})
target_compile_options(CosmoHaloFinder_SERIAL PRIVATE ${VTKm_COMPILE_OPTIONS}) target_compile_options(CosmoHaloFinder_SERIAL PRIVATE ${VTKm_COMPILE_OPTIONS})
if(VTKm_CUDA_FOUND) if(VTKm_CUDA_FOUND)
set(old_nvcc_flags ${CUDA_NVCC_FLAGS})
set(old_cxx_flags ${CMAKE_CXX_FLAGS})
vtkm_setup_nvcc_flags( old_nvcc_flags old_cxx_flags)
vtkm_disable_troublesome_thrust_warnings()
# Cuda compiles do not respect target_include_directories # Cuda compiles do not respect target_include_directories
cuda_include_directories(${VTKm_INCLUDE_DIRS}) cuda_include_directories(${VTKm_INCLUDE_DIRS})
...@@ -47,6 +52,9 @@ if(VTKm_CUDA_FOUND) ...@@ -47,6 +52,9 @@ if(VTKm_CUDA_FOUND)
target_include_directories(CosmoHaloFinder_CUDA PRIVATE ${VTKm_INCLUDE_DIRS}) target_include_directories(CosmoHaloFinder_CUDA PRIVATE ${VTKm_INCLUDE_DIRS})
target_link_libraries(CosmoHaloFinder_CUDA PRIVATE ${VTKm_LIBRARIES}) target_link_libraries(CosmoHaloFinder_CUDA PRIVATE ${VTKm_LIBRARIES})
target_compile_options(CosmoHaloFinder_CUDA PRIVATE ${VTKm_COMPILE_OPTIONS}) target_compile_options(CosmoHaloFinder_CUDA PRIVATE ${VTKm_COMPILE_OPTIONS})
set(CUDA_NVCC_FLAGS ${old_nvcc_flags})
set(CMAKE_CXX_FLAGS ${old_cxx_flags})
endif() endif()
if(VTKm_TBB_FOUND) if(VTKm_TBB_FOUND)
......
...@@ -28,6 +28,12 @@ find_package(VTKm QUIET REQUIRED ...@@ -28,6 +28,12 @@ find_package(VTKm QUIET REQUIRED
if(VTKm_OSMesa_FOUND AND VTKm_Rendering_FOUND) if(VTKm_OSMesa_FOUND AND VTKm_Rendering_FOUND)
if(VTKm_CUDA_FOUND) if(VTKm_CUDA_FOUND)
set(old_nvcc_flags ${CUDA_NVCC_FLAGS})
set(old_cxx_flags ${CMAKE_CXX_FLAGS})
vtkm_setup_nvcc_flags( old_nvcc_flags old_cxx_flags)
vtkm_disable_troublesome_thrust_warnings()
# Cuda compiles do not respect target_include_directories # Cuda compiles do not respect target_include_directories
cuda_include_directories(${VTKm_INCLUDE_DIRS}) cuda_include_directories(${VTKm_INCLUDE_DIRS})
cuda_add_executable(Demo Demo.cu) cuda_add_executable(Demo Demo.cu)
......
...@@ -29,7 +29,16 @@ find_package(VTKm REQUIRED ...@@ -29,7 +29,16 @@ find_package(VTKm REQUIRED
) )
if(VTKm_CUDA_FOUND) if(VTKm_CUDA_FOUND)
set(old_nvcc_flags ${CUDA_NVCC_FLAGS})
set(old_cxx_flags ${CMAKE_CXX_FLAGS})
vtkm_setup_nvcc_flags( old_nvcc_flags old_cxx_flags)
vtkm_disable_troublesome_thrust_warnings()
cuda_add_executable(GameOfLife GameOfLife.cu LoadShaders.h) cuda_add_executable(GameOfLife GameOfLife.cu LoadShaders.h)
set(CUDA_NVCC_FLAGS ${old_nvcc_flags})
set(CMAKE_CXX_FLAGS ${old_cxx_flags})
else() else()
add_executable(GameOfLife GameOfLife.cxx LoadShaders.h) add_executable(GameOfLife GameOfLife.cxx LoadShaders.h)
endif() endif()
......
...@@ -45,6 +45,9 @@ struct Bounds ...@@ -45,6 +45,9 @@ struct Bounds
VTKM_EXEC_CONT VTKM_EXEC_CONT
Bounds() {} Bounds() {}
VTKM_EXEC_CONT
Bounds(const Bounds&) = default;
VTKM_EXEC_CONT VTKM_EXEC_CONT
Bounds(const vtkm::Range& xRange, const vtkm::Range& yRange, const vtkm::Range& zRange) Bounds(const vtkm::Range& xRange, const vtkm::Range& yRange, const vtkm::Range& zRange)
: X(xRange) : X(xRange)
...@@ -89,13 +92,7 @@ struct Bounds ...@@ -89,13 +92,7 @@ struct Bounds
} }
VTKM_EXEC_CONT VTKM_EXEC_CONT
const vtkm::Bounds& operator=(const vtkm::Bounds& src) vtkm::Bounds& operator=(const vtkm::Bounds& src) = default;
{
this->X = src.X;
this->Y = src.Y;
this->Z = src.Z;
return *this;
}
/// \b Determine if the bounds are valid (i.e. has at least one valid point). /// \b Determine if the bounds are valid (i.e. has at least one valid point).
/// ///
......
...@@ -67,6 +67,11 @@ vtkm_declare_headers(${headers}) ...@@ -67,6 +67,11 @@ vtkm_declare_headers(${headers})
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
#first add all the components vtkm that are shared between control and exec #first add all the components vtkm that are shared between control and exec
if(VTKm_ENABLE_MPI)
# This `if` is temporary and will be removed once `diy` supports building
# without MPI.
add_subdirectory(thirdparty/diy)
endif()
add_subdirectory(testing) add_subdirectory(testing)
add_subdirectory(internal) add_subdirectory(internal)
......
...@@ -2347,7 +2347,12 @@ static inline VTKM_EXEC_CONT vtkm::Float32 RemainderQuotient(vtkm::Float32 numer ...@@ -2347,7 +2347,12 @@ static inline VTKM_EXEC_CONT vtkm::Float32 RemainderQuotient(vtkm::Float32 numer
QType& quotient) QType& quotient)
{ {
int iQuotient; int iQuotient;
vtkm::Float32 result = std::remquo(numerator, denominator, &iQuotient); #ifdef VTKM_CUDA
const vtkm::Float64 result =
VTKM_CUDA_MATH_FUNCTION_32(remquo)(numerator, denominator, &iQuotient);
#else
const vtkm::Float32 result = std::remquo(numerator, denominator, &iQuotient);
#endif
quotient = iQuotient; quotient = iQuotient;
return result; return result;
} }
...@@ -2357,7 +2362,12 @@ static inline VTKM_EXEC_CONT vtkm::Float64 RemainderQuotient(vtkm::Float64 numer ...@@ -2357,7 +2362,12 @@ static inline VTKM_EXEC_CONT vtkm::Float64 RemainderQuotient(vtkm::Float64 numer
QType& quotient) QType& quotient)
{ {
int iQuotient; int iQuotient;
vtkm::Float64 result = std::remquo(numerator, denominator, &iQuotient); #ifdef VTKM_CUDA
const vtkm::Float64 result =
VTKM_CUDA_MATH_FUNCTION_64(remquo)(numerator, denominator, &iQuotient);
#else
const vtkm::Float64 result = std::remquo(numerator, denominator, &iQuotient);
#endif
quotient = iQuotient; quotient = iQuotient;
return result; return result;
} }
......
...@@ -49,6 +49,9 @@ struct Range ...@@ -49,6 +49,9 @@ struct Range
{ {
} }
VTKM_EXEC_CONT
Range(const Range&) = default;
template <typename T1, typename T2> template <typename T1, typename T2>
VTKM_EXEC_CONT Range(const T1& min, const T2& max) VTKM_EXEC_CONT Range(const T1& min, const T2& max)
: Min(static_cast<vtkm::Float64>(min)) : Min(static_cast<vtkm::Float64>(min))
...@@ -57,12 +60,7 @@ struct Range ...@@ -57,12 +60,7 @@ struct Range
} }
VTKM_EXEC_CONT VTKM_EXEC_CONT
const vtkm::Range& operator=(const vtkm::Range& src) vtkm::Range& operator=(const vtkm::Range& src) = default;
{
this->Min = src.Min;
this->Max = src.Max;
return *this;
}
/// \b Determine if the range is valid (i.e. has at least one valid point). /// \b Determine if the range is valid (i.e. has at least one valid point).
/// ///
......
...@@ -516,22 +516,6 @@ public: ...@@ -516,22 +516,6 @@ public:
VTKM_EXEC_CONT VTKM_EXEC_CONT
bool operator!=(const DerivedClass& other) const { return !(this->operator==(other)); } bool operator!=(const DerivedClass& other) const { return !(this->operator==(other)); }
VTKM_EXEC_CONT
ComponentType Dot(const VecBaseCommon<ComponentType, DerivedClass>& other) const
{
// Why the static_cast here and below? Because * on small integers (char,
// short) promotes the result to a 32-bit int. After helpfully promoting
// the width of the result, some compilers then warn you about casting it
// back to the type you were expecting in the first place. The static_cast
// suppresses this warning.
ComponentType result = static_cast<ComponentType>(this->Component(0) * other.Component(0));
for (vtkm::IdComponent i = 1; i < this->NumComponents(); ++i)
{
result = static_cast<ComponentType>(result + this->Component(i) * other.Component(i));
}
return result;
}
#if (!(defined(VTKM_CUDA) && (__CUDACC_VER_MAJOR__ < 8))) #if (!(defined(VTKM_CUDA) && (__CUDACC_VER_MAJOR__ < 8)))
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) #if (defined(VTKM_GCC) || defined(VTKM_CLANG))
#pragma GCC diagnostic push #pragma GCC diagnostic push
...@@ -1241,46 +1225,85 @@ VTKM_EXEC_CONT static inline vtkm::VecCConst<T> make_VecC(const T* array, vtkm:: ...@@ -1241,46 +1225,85 @@ VTKM_EXEC_CONT static inline vtkm::VecCConst<T> make_VecC(const T* array, vtkm::
return vtkm::VecCConst<T>(array, size); return vtkm::VecCConst<T>(array, size);
} }
// A pre-declaration of vtkm::Pair so that classes templated on them can refer namespace detail
// to it. The actual implementation is in vtkm/Pair.h. {
template <typename U, typename V> template <typename T>
struct Pair; struct DotType
{
//results when < 32bit can be float if somehow we are using float16/float8, otherwise is
// int32 or uint32 depending on if it signed or not.
using float_type = vtkm::Float32;
using integer_type =
typename std::conditional<std::is_signed<T>::value, vtkm::Int32, vtkm::UInt32>::type;
using promote_type =
typename std::conditional<std::is_integral<T>::value, integer_type, float_type>::type;
using type =
typename std::conditional<(sizeof(T) < sizeof(vtkm::Float32)), promote_type, T>::type;
};
template <typename T>
static inline VTKM_EXEC_CONT typename DotType<typename T::ComponentType>::type vec_dot(const T& a,
const T& b)
{
using U = typename DotType<typename T::ComponentType>::type;
U result = a[0] * b[0];
for (vtkm::IdComponent i = 1; i < a.GetNumberOfComponents(); ++i)
{
result = result + a[i] * b[i];
}
return result;
}
template <typename T, vtkm::IdComponent Size> template <typename T, vtkm::IdComponent Size>
static inline VTKM_EXEC_CONT T dot(const vtkm::Vec<T, Size>& a, const vtkm::Vec<T, Size>& b) static inline VTKM_EXEC_CONT typename DotType<T>::type vec_dot(const vtkm::Vec<T, Size>& a,
const vtkm::Vec<T, Size>& b)
{ {
T result = T(a[0] * b[0]); using U = typename DotType<T>::type;
U result = a[0] * b[0];
for (vtkm::IdComponent i = 1; i < Size; ++i) for (vtkm::IdComponent i = 1; i < Size; ++i)
{ {
result = T(result + a[i] * b[i]); result = result + a[i] * b[i];
} }
return result; return result;
} }
}
template <typename T> template <typename T>
static inline VTKM_EXEC_CONT T dot(const vtkm::Vec<T, 2>& a, const vtkm::Vec<T, 2>& b) static inline VTKM_EXEC_CONT auto dot(const T& a, const T& b) -> decltype(detail::vec_dot(a, b))
{ {
return T((a[0] * b[0]) + (a[1] * b[1])); return detail::vec_dot(a, b);
} }
template <typename T> template <typename T>
static inline VTKM_EXEC_CONT T dot(const vtkm::Vec<T, 3>& a, const vtkm::Vec<T, 3>& b) static inline VTKM_EXEC_CONT typename detail::DotType<T>::type dot(const vtkm::Vec<T, 2>& a,
const vtkm::Vec<T, 2>& b)
{ {
return T((a[0] * b[0]) + (a[1] * b[1]) + (a[2] * b[2])); return (a[0] * b[0]) + (a[1] * b[1]);
} }
template <typename T> template <typename T>
static inline VTKM_EXEC_CONT T dot(const vtkm::Vec<T, 4>& a, const vtkm::Vec<T, 4>& b) static inline VTKM_EXEC_CONT typename detail::DotType<T>::type dot(const vtkm::Vec<T, 3>& a,
const vtkm::Vec<T, 3>& b)
{ {
return T((a[0] * b[0]) + (a[1] * b[1]) + (a[2] * b[2]) + (a[3] * b[3])); return (a[0] * b[0]) + (a[1] * b[1]) + (a[2] * b[2]);
} }
template <typename T>
template <typename T, typename VecType> static inline VTKM_EXEC_CONT typename detail::DotType<T>::type dot(const vtkm::Vec<T, 4>& a,
static inline VTKM_EXEC_CONT T dot(const vtkm::detail::VecBaseCommon<T, VecType>& a, const vtkm::Vec<T, 4>& b)
const vtkm::detail::VecBaseCommon<T, VecType>& b)
{ {
return a.Dot(b); return (a[0] * b[0]) + (a[1] * b[1]) + (a[2] * b[2]) + (a[3] * b[3]);
} }
// Integer types of a width less than an integer get implicitly casted to
// an integer when doing a multiplication.
#define VTK_M_SCALAR_DOT(stype) \
static inline VTKM_EXEC_CONT detail::DotType<stype>::type dot(stype a, stype b) { return a * b; }
VTK_M_SCALAR_DOT(vtkm::Int8)
VTK_M_SCALAR_DOT(vtkm::UInt8)
VTK_M_SCALAR_DOT(vtkm::Int16)
VTK_M_SCALAR_DOT(vtkm::UInt16)
VTK_M_SCALAR_DOT(vtkm::Int32)
VTK_M_SCALAR_DOT(vtkm::UInt32)
VTK_M_SCALAR_DOT(vtkm::Int64)
VTK_M_SCALAR_DOT(vtkm::UInt64)
VTK_M_SCALAR_DOT(vtkm::Float32)
VTK_M_SCALAR_DOT(vtkm::Float64)
template <typename T, vtkm::IdComponent Size> template <typename T, vtkm::IdComponent Size>
VTKM_EXEC_CONT T ReduceSum(const vtkm::Vec<T, Size>& a) VTKM_EXEC_CONT T ReduceSum(const vtkm::Vec<T, Size>& a)
...@@ -1340,22 +1363,10 @@ VTKM_EXEC_CONT T ReduceProduct(const vtkm::Vec<T, 4>& a) ...@@ -1340,22 +1363,10 @@ VTKM_EXEC_CONT T ReduceProduct(const vtkm::Vec<T, 4>& a)
return a[0] * a[1] * a[2] * a[3]; return a[0] * a[1] * a[2] * a[3];
} }
// Integer types of a width less than an integer get implicitly casted to // A pre-declaration of vtkm::Pair so that classes templated on them can refer
// an integer when doing a multiplication. // to it. The actual implementation is in vtkm/Pair.h.
#define VTK_M_INTEGER_PROMOTION_SCALAR_DOT(type) \ template <typename U, typename V>
static inline VTKM_EXEC_CONT type dot(type a, type b) { return static_cast<type>(a * b); } struct Pair;
VTK_M_INTEGER_PROMOTION_SCALAR_DOT(vtkm::Int8)
VTK_M_INTEGER_PROMOTION_SCALAR_DOT(vtkm::UInt8)
VTK_M_INTEGER_PROMOTION_SCALAR_DOT(vtkm::Int16)
VTK_M_INTEGER_PROMOTION_SCALAR_DOT(vtkm::UInt16)
#define VTK_M_SCALAR_DOT(type) \
static inline VTKM_EXEC_CONT type dot(type a, type b) { return a * b; }
VTK_M_SCALAR_DOT(vtkm::Int32)
VTK_M_SCALAR_DOT(vtkm::UInt32)
VTK_M_SCALAR_DOT(vtkm::Int64)
VTK_M_SCALAR_DOT(vtkm::UInt64)
VTK_M_SCALAR_DOT(vtkm::Float32)
VTK_M_SCALAR_DOT(vtkm::Float64)
} // End of namespace vtkm } // End of namespace vtkm
......
...@@ -80,8 +80,8 @@ struct MeasureCopySpeed ...@@ -80,8 +80,8 @@ struct MeasureCopySpeed
VTKM_CONT std::string Description() const VTKM_CONT std::string Description() const
{ {
vtkm::UInt64 actualSize = vtkm::UInt64 actualSize = sizeof(ValueType);
static_cast<vtkm::UInt64>(this->Source.GetNumberOfValues() * sizeof(ValueType)); actualSize *= static_cast<vtkm::UInt64>(this->Source.GetNumberOfValues());
std::ostringstream out; std::ostringstream out;
out << "Copying " << HumanSize(this->NumBytes) << " (actual=" << HumanSize(actualSize) out << "Copying " << HumanSize(this->NumBytes) << " (actual=" << HumanSize(actualSize)
<< ") of " << vtkm::testing::TypeName<ValueType>::Name() << "\n"; << ") of " << vtkm::testing::TypeName<ValueType>::Name() << "\n";
......
...@@ -108,7 +108,7 @@ struct BenchDevAlgoConfig ...@@ -108,7 +108,7 @@ struct BenchDevAlgoConfig
/// @note FixBytes and FixSizes are not mutually exclusive. If both are /// @note FixBytes and FixSizes are not mutually exclusive. If both are
/// specified, both will run. /// specified, both will run.
bool TestArraySizeValues{ false }; bool TestArraySizeValues{ false };
vtkm::Id ArraySizeValues{ 1 << 21 }; vtkm::UInt64 ArraySizeValues{ 1 << 21 };
/// If true, operations like "Unique" will test with a wider range of unique /// If true, operations like "Unique" will test with a wider range of unique
/// values (5%, 10%, 15%, 20%, 25%, 30%, 35%, 40%, 45%, 50%, 75%, 100% /// values (5%, 10%, 15%, 20%, 25%, 30%, 35%, 40%, 45%, 50%, 75%, 100%
...@@ -126,7 +126,7 @@ struct BenchDevAlgoConfig ...@@ -126,7 +126,7 @@ struct BenchDevAlgoConfig
{ {
return this->DoByteSizes return this->DoByteSizes
? static_cast<vtkm::Id>(this->ArraySizeBytes / static_cast<vtkm::UInt64>(sizeof(T))) ? static_cast<vtkm::Id>(this->ArraySizeBytes / static_cast<vtkm::UInt64>(sizeof(T)))
: this->ArraySizeValues; : static_cast<vtkm::Id>(this->ArraySizeValues);
} }
}; };
...@@ -291,8 +291,8 @@ private: ...@@ -291,8 +291,8 @@ private:
{ {
vtkm::Id arraySize = Config.ComputeSize<Value>(); vtkm::Id arraySize = Config.ComputeSize<Value>();
std::stringstream description; std::stringstream description;
description << "Copy " << arraySize << " values (" << HumanSize(arraySize * sizeof(Value)) description << "Copy " << arraySize << " values ("
<< ")"; << HumanSize(static_cast<vtkm::UInt64>(arraySize) * sizeof(Value)) << ")";
return description.str(); return description.str();
} }
}; };
...@@ -337,8 +337,8 @@ private: ...@@ -337,8 +337,8 @@ private:
vtkm::Id arraySize = Config.ComputeSize<Value>(); vtkm::Id arraySize = Config.ComputeSize<Value>();
std::stringstream description; std::stringstream description;
description << "CopyIf on " << arraySize << " values (" description << "CopyIf on " << arraySize << " values ("
<< HumanSize(arraySize * sizeof(Value)) << ") with " << PERCENT_VALID << HumanSize(static_cast<vtkm::UInt64>(arraySize) * sizeof(Value)) << ") with "
<< "% valid values"; << PERCENT_VALID << "% valid values";
return description.str(); return description.str();
} }
}; };
...@@ -393,8 +393,8 @@ private: ...@@ -393,8 +393,8 @@ private:
vtkm::Id arraySize = Config.ComputeSize<Value>(); vtkm::Id arraySize = Config.ComputeSize<Value>();
std::stringstream description; std::stringstream description;
description << "LowerBounds on " << arraySize << " input values (" description << "LowerBounds on " << arraySize << " input values ("
<< "(" << HumanSize(arraySize * sizeof(Value)) << ") (" << PERCENT_VALUES << "(" << HumanSize(static_cast<vtkm::UInt64>(arraySize) * sizeof(Value)) << ") ("
<< "% configuration)"; << PERCENT_VALUES << "% configuration)";
return description.str(); return description.str();
} }
}; };
...@@ -451,7 +451,7 @@ private: ...@@ -451,7 +451,7 @@ private:
vtkm::Id arraySize = Config.ComputeSize<Value>(); vtkm::Id arraySize = Config.ComputeSize<Value>();
std::stringstream description; std::stringstream description;
description << "Reduce on " << arraySize << " values (" description << "Reduce on " << arraySize << " values ("
<< HumanSize(arraySize * sizeof(Value)) << ")"; << HumanSize(static_cast<vtkm::UInt64>(arraySize) * sizeof(Value)) << ")";
return description.str(); return description.str();
} }
}; };
...@@ -496,8 +496,8 @@ private: ...@@ -496,8 +496,8 @@ private:
vtkm::Id arraySize = Config.ComputeSize<Value>(); vtkm::Id arraySize = Config.ComputeSize<Value>();
std::stringstream description; std::stringstream description;
description << "ReduceByKey on " << arraySize << " values (" description << "ReduceByKey on " << arraySize << " values ("
<< HumanSize(arraySize * sizeof(Value)) << ") with " << N_KEYS << " (" << HumanSize(static_cast<vtkm::UInt64>(arraySize) * sizeof(Value)) << ") with "
<< PERCENT_KEYS << "%) distinct vtkm::Id keys"; << N_KEYS << " (" << PERCENT_KEYS << "%) distinct vtkm::Id keys";
return description.str(); return description.str();
} }
}; };
...@@ -543,7 +543,7 @@ private: ...@@ -543,7 +543,7 @@ private:
vtkm::Id arraySize = Config.ComputeSize<Value>(); vtkm::Id arraySize = Config.ComputeSize<Value>();
std::stringstream description; std::stringstream description;
description << "ScanInclusive on " << arraySize << " values (" description << "ScanInclusive on " << arraySize << " values ("
<< HumanSize(arraySize * sizeof(Value)) << ")"; << HumanSize(static_cast<vtkm::UInt64>(arraySize) * sizeof(Value)) << ")";
return description.str(); return description.str();