Commit d1a59aad authored by Utkarsh Ayachit's avatar Utkarsh Ayachit
Browse files

Fixes for CrossProduct and DotProduct.

parent 4fd3203b
......@@ -43,15 +43,16 @@ inline VTKM_CONT vtkm::filter::Result CrossProduct::DoExecute(
const vtkm::filter::PolicyBase<DerivedPolicy>& policy,
const DeviceAdapter&)
{
vtkm::cont::ArrayHandle<vtkm::Vec<T, 3>, StorageType> outArray;
vtkm::cont::ArrayHandle<vtkm::Vec<T, 3>> outArray;
vtkm::worklet::DispatcherMapField<vtkm::worklet::CrossProduct, DeviceAdapter> dispatcher(
this->Worklet);
vtkm::cont::ArrayHandle<vtkm::Vec<T, 3>, StorageType> secondaryField;
vtkm::cont::ArrayHandle<vtkm::Vec<T, 3>> secondaryField;
try
{
vtkm::filter::ApplyPolicy(inDataSet.GetField(SecondaryFieldName), policy)
using Traits = vtkm::filter::FilterTraits<CrossProduct>;
vtkm::filter::ApplyPolicy(inDataSet.GetField(SecondaryFieldName), policy, Traits())
.CopyTo(secondaryField);
}
catch (const vtkm::cont::Error&)
......
......@@ -43,15 +43,16 @@ inline VTKM_CONT vtkm::filter::Result DotProduct::DoExecute(
const vtkm::filter::PolicyBase<DerivedPolicy>& policy,
const DeviceAdapter&)
{
vtkm::cont::ArrayHandle<T, StorageType> outArray;
vtkm::cont::ArrayHandle<T> outArray;
vtkm::worklet::DispatcherMapField<vtkm::worklet::DotProduct, DeviceAdapter> dispatcher(
this->Worklet);
vtkm::cont::ArrayHandle<vtkm::Vec<T, 3>, StorageType> secondaryField;
vtkm::cont::ArrayHandle<vtkm::Vec<T, 3>> secondaryField;
try
{
vtkm::filter::ApplyPolicy(inDataSet.GetField(SecondaryFieldName), policy)
using Traits = vtkm::filter::FilterTraits<DotProduct>;
vtkm::filter::ApplyPolicy(inDataSet.GetField(SecondaryFieldName), policy, Traits())
.CopyTo(secondaryField);
}
catch (const vtkm::cont::Error&)
......
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