Commit 662caef3 authored by Robert Maynard's avatar Robert Maynard Committed by Kitware Robot

Merge topic 'sync_Math_pyexpander'

d07c696b vtkMath.h now opts out of clang-format to make updates through pyexpander easy
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland's avatarKenneth Moreland <kmorel@sandia.gov>
Merge-request: !1052
parents cda85450 d07c696b
......@@ -48,6 +48,7 @@
#define VTKM_CUDA_MATH_FUNCTION_32(func) func##f
#define VTKM_CUDA_MATH_FUNCTION_64(func) func
// clang-format off
namespace vtkm
{
......@@ -92,10 +93,8 @@ template <typename T>
struct FloatingPointReturnType
{
using ctype = typename vtkm::VecTraits<T>::ComponentType;
using representable_as_float_type =
std::integral_constant<bool,
((sizeof(ctype) < sizeof(float)) ||
std::is_same<ctype, vtkm::Float32>::value)>;
using representable_as_float_type = std::integral_constant<bool,
((sizeof(ctype) < sizeof(float)) || std::is_same<ctype, vtkm::Float32>::value)>;
using Type = typename std::conditional<representable_as_float_type::value,
vtkm::Float32,
vtkm::Float64>::type;
......@@ -2438,5 +2437,6 @@ static inline VTKM_EXEC_CONT vtkm::Vec<T, N> CopySign(const vtkm::Vec<T, N>& x,
}
} // namespace vtkm
// clang-format on
#endif //vtk_m_Math_h
......@@ -197,6 +197,7 @@ $extend(unary_template_function_no_vec)\
$extend(binary_math_function)\
$extend(binary_template_function)\
\
// clang-format off
namespace vtkm
{
......@@ -241,11 +242,11 @@ template <typename T>
struct FloatingPointReturnType
{
using ctype = typename vtkm::VecTraits<T>::ComponentType;
using representable_as_float_type =
std::integral_constant<bool,
((sizeof(ctype) < sizeof(float)) || std::is_same<ctype, vtkm::Float32>::value)>;
using Type =
typename std::conditional<representable_as_float_type::value, vtkm::Float32, vtkm::Float64>::type;
using representable_as_float_type = std::integral_constant<bool,
((sizeof(ctype) < sizeof(float)) || std::is_same<ctype, vtkm::Float32>::value)>;
using Type = typename std::conditional<representable_as_float_type::value,
vtkm::Float32,
vtkm::Float64>::type;
};
} // namespace detail
......@@ -1063,5 +1064,6 @@ static inline VTKM_EXEC_CONT vtkm::Vec<T, N> CopySign(const vtkm::Vec<T, N>& x,
}
} // namespace vtkm
// clang-format on
#endif //vtk_m_Math_h
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment