Commit ed297b4c authored by Sujin Philip's avatar Sujin Philip Committed by Kitware Robot

Merge topic 'fix-dashboard-warnings'

7d4d734e OpenMP compiler flags were not being set properly
50248aec Fix implicit conversion loses floating-point precision warning
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard's avatarRobert Maynard <robert.maynard@kitware.com>
Merge-request: !1281
parents 94bf457d 7d4d734e
......@@ -91,13 +91,13 @@ if(VTKm_ENABLE_OPENMP AND NOT TARGET vtkm::openmp)
add_library(vtkm::openmp INTERFACE IMPORTED GLOBAL)
if(OpenMP_CXX_FLAGS)
set_target_properties(vtkm::openmp PROPERTIES
INTERFACE_COMPILE_OPTIONS $<$<COMPILE_LANGUAGE:CXX>:${OpenMP_CXX_FLAGS}>)
set_property(TARGET vtkm::openmp
APPEND PROPERTY INTERFACE_COMPILE_OPTIONS $<$<COMPILE_LANGUAGE:CXX>:${OpenMP_CXX_FLAGS}>)
if(VTKm_ENABLE_CUDA)
string(REPLACE ";" "," openmp_cuda_flags "-Xcompiler=${OpenMP_CXX_FLAGS}")
set_target_properties(vtkm::openmp PROPERTIES
INTERFACE_COMPILE_OPTIONS $<$<COMPILE_LANGUAGE:CUDA>:${openmp_cuda_flags}>)
set_property(TARGET vtkm::openmp
APPEND PROPERTY INTERFACE_COMPILE_OPTIONS $<$<COMPILE_LANGUAGE:CUDA>:${openmp_cuda_flags}>)
endif()
endif()
if(OpenMP_CXX_LIBRARIES)
......
......@@ -850,7 +850,8 @@ VTKM_EXEC vtkm::Vec<typename FieldVecType::ComponentType, 3> CellDerivative(
using T = typename FieldVecType::ComponentType;
using VecT = vtkm::Vec<T, 2>;
VecT pc(static_cast<T>(pcoords[0]), static_cast<T>(pcoords[1]));
VecT pc(static_cast<typename vtkm::VecTraits<T>::ComponentType>(pcoords[0]),
static_cast<typename vtkm::VecTraits<T>::ComponentType>(pcoords[1]));
VecT rc = VecT(T(1)) - pc;
VecT sum = field[0] * VecT(-rc[1], -rc[0]);
......@@ -1043,7 +1044,9 @@ VTKM_EXEC vtkm::Vec<typename FieldVecType::ComponentType, 3> CellDerivative(
using T = typename FieldVecType::ComponentType;
using VecT = vtkm::Vec<T, 3>;
VecT pc(static_cast<T>(pcoords[0]), static_cast<T>(pcoords[1]), static_cast<T>(pcoords[2]));
VecT pc(static_cast<typename vtkm::VecTraits<T>::ComponentType>(pcoords[0]),
static_cast<typename vtkm::VecTraits<T>::ComponentType>(pcoords[1]),
static_cast<typename vtkm::VecTraits<T>::ComponentType>(pcoords[2]));
VecT rc = VecT(T(1)) - pc;
VecT sum = field[0] * VecT(-rc[1] * rc[2], -rc[0] * rc[2], -rc[0] * rc[1]);
......
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