Commit 18ece6dc authored by Dave Pugmire's avatar Dave Pugmire
Browse files

Better type signatures.

parent 2537a1cf
......@@ -35,8 +35,10 @@ public:
typedef void ControlSignature(FieldIn<VecAll>, FieldIn<VecAll>, FieldOut<VecAll>);
typedef void ExecutionSignature(_1, _2, _3);
template <typename T, typename T2>
VTKM_EXEC void operator()(const T& vec1, const T& vec2, T2& outVec) const
template <typename T>
VTKM_EXEC void operator()(const vtkm::Vec<T, 3>& vec1,
const vtkm::Vec<T, 3>& vec2,
vtkm::Vec<T, 3>& outVec) const
{
outVec = vtkm::Cross(vec1, vec2);
}
......
......@@ -35,8 +35,10 @@ public:
typedef void ControlSignature(FieldIn<VecAll>, FieldIn<VecAll>, FieldOut<Scalar>);
typedef void ExecutionSignature(_1, _2, _3);
template <typename T, typename T2>
VTKM_EXEC void operator()(const T& v1, const T& v2, T2& outValue) const
template <typename T, vtkm::IdComponent Size>
VTKM_EXEC void operator()(const vtkm::Vec<T, Size>& v1,
const vtkm::Vec<T, Size>& v2,
T& outValue) const
{
outValue = vtkm::dot(v1, v2);
}
......
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