Commit d07c696b authored by Robert Maynard's avatar Robert Maynard
Browse files

vtkMath.h now opts out of clang-format to make updates through pyexpander easy

parent cda85450
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
#define VTKM_CUDA_MATH_FUNCTION_32(func) func##f #define VTKM_CUDA_MATH_FUNCTION_32(func) func##f
#define VTKM_CUDA_MATH_FUNCTION_64(func) func #define VTKM_CUDA_MATH_FUNCTION_64(func) func
// clang-format off
namespace vtkm namespace vtkm
{ {
...@@ -92,10 +93,8 @@ template <typename T> ...@@ -92,10 +93,8 @@ template <typename T>
struct FloatingPointReturnType struct FloatingPointReturnType
{ {
using ctype = typename vtkm::VecTraits<T>::ComponentType; using ctype = typename vtkm::VecTraits<T>::ComponentType;
using representable_as_float_type = using representable_as_float_type = std::integral_constant<bool,
std::integral_constant<bool, ((sizeof(ctype) < sizeof(float)) || std::is_same<ctype, vtkm::Float32>::value)>;
((sizeof(ctype) < sizeof(float)) ||
std::is_same<ctype, vtkm::Float32>::value)>;
using Type = typename std::conditional<representable_as_float_type::value, using Type = typename std::conditional<representable_as_float_type::value,
vtkm::Float32, vtkm::Float32,
vtkm::Float64>::type; vtkm::Float64>::type;
...@@ -2438,5 +2437,6 @@ static inline VTKM_EXEC_CONT vtkm::Vec<T, N> CopySign(const vtkm::Vec<T, N>& x, ...@@ -2438,5 +2437,6 @@ static inline VTKM_EXEC_CONT vtkm::Vec<T, N> CopySign(const vtkm::Vec<T, N>& x,
} }
} // namespace vtkm } // namespace vtkm
// clang-format on
#endif //vtk_m_Math_h #endif //vtk_m_Math_h
...@@ -197,6 +197,7 @@ $extend(unary_template_function_no_vec)\ ...@@ -197,6 +197,7 @@ $extend(unary_template_function_no_vec)\
$extend(binary_math_function)\ $extend(binary_math_function)\
$extend(binary_template_function)\ $extend(binary_template_function)\
\ \
// clang-format off
namespace vtkm namespace vtkm
{ {
...@@ -241,11 +242,11 @@ template <typename T> ...@@ -241,11 +242,11 @@ template <typename T>
struct FloatingPointReturnType struct FloatingPointReturnType
{ {
using ctype = typename vtkm::VecTraits<T>::ComponentType; using ctype = typename vtkm::VecTraits<T>::ComponentType;
using representable_as_float_type = using representable_as_float_type = std::integral_constant<bool,
std::integral_constant<bool, ((sizeof(ctype) < sizeof(float)) || std::is_same<ctype, vtkm::Float32>::value)>;
((sizeof(ctype) < sizeof(float)) || std::is_same<ctype, vtkm::Float32>::value)>; using Type = typename std::conditional<representable_as_float_type::value,
using Type = vtkm::Float32,
typename std::conditional<representable_as_float_type::value, vtkm::Float32, vtkm::Float64>::type; vtkm::Float64>::type;
}; };
} // namespace detail } // namespace detail
...@@ -1063,5 +1064,6 @@ static inline VTKM_EXEC_CONT vtkm::Vec<T, N> CopySign(const vtkm::Vec<T, N>& x, ...@@ -1063,5 +1064,6 @@ static inline VTKM_EXEC_CONT vtkm::Vec<T, N> CopySign(const vtkm::Vec<T, N>& x,
} }
} // namespace vtkm } // namespace vtkm
// clang-format on
#endif //vtk_m_Math_h #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