Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Sudhanshu Sane
VTK-m
Commits
d07c696b
Commit
d07c696b
authored
Jan 09, 2018
by
Robert Maynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vtkMath.h now opts out of clang-format to make updates through pyexpander easy
parent
cda85450
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
vtkm/Math.h
vtkm/Math.h
+4
-4
vtkm/Math.h.in
vtkm/Math.h.in
+7
-5
No files found.
vtkm/Math.h
View file @
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
vtkm/Math.h.in
View file @
d07c696b
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment