Commit d4f94d4e authored by Sujin Philip's avatar Sujin Philip

Fix Vec <T, sizeof...(Ts)> warnings

Several "conversion to ‘int’ from ‘long unsigned int’" are produced in gcc.
parent cc82f533
......@@ -1008,9 +1008,10 @@ VTKM_EXEC_CONT vtkm::Vec<T, Size> make_Vec(std::initializer_list<T> values)
/// same type or compile issues will occur.
///
template <typename T, typename... Ts>
VTKM_EXEC_CONT vtkm::Vec<T, sizeof...(Ts) + 1> make_Vec(const T& value0, const Ts&... values)
VTKM_EXEC_CONT vtkm::Vec<T, vtkm::IdComponent(sizeof...(Ts) + 1)> make_Vec(const T& value0,
const Ts&... values)
{
return vtkm::Vec<T, sizeof...(Ts) + 1>({ value0, values... });
return vtkm::Vec<T, vtkm::IdComponent(sizeof...(Ts) + 1)>({ value0, values... });
}
/// \brief A Vec-like representation for short arrays.
......
......@@ -388,7 +388,7 @@ VTKM_CONT ArrayHandleSwizzle<ArrayHandleType, OutSize> make_ArrayHandleSwizzle(
}
template <typename ArrayHandleType, typename... SwizzleIndexTypes>
VTKM_CONT ArrayHandleSwizzle<ArrayHandleType, sizeof...(SwizzleIndexTypes) + 1>
VTKM_CONT ArrayHandleSwizzle<ArrayHandleType, vtkm::IdComponent(sizeof...(SwizzleIndexTypes) + 1)>
make_ArrayHandleSwizzle(const ArrayHandleType& array,
vtkm::IdComponent swizzleIndex0,
SwizzleIndexTypes... swizzleIndices)
......
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