diff --git a/vtkm/filter/DataSetFilter.hxx b/vtkm/filter/DataSetFilter.hxx index 6cb12a070..7d0412e57 100644 --- a/vtkm/filter/DataSetFilter.hxx +++ b/vtkm/filter/DataSetFilter.hxx @@ -126,7 +126,7 @@ bool DataSetFilter::MapFieldOntoOutput(DataSetResult& result, valid); typedef vtkm::filter::FilterTraits< Derived > Traits; - vtkm::filter::Convert(field, policy, Traits()).CastAndCall(functor); + vtkm::filter::ApplyPolicy(field, policy, Traits()).CastAndCall(functor); } //the bool valid will be modified by the map algorithm to hold if the diff --git a/vtkm/filter/DataSetWithFieldFilter.hxx b/vtkm/filter/DataSetWithFieldFilter.hxx index 8911caa74..cabd0ea56 100644 --- a/vtkm/filter/DataSetWithFieldFilter.hxx +++ b/vtkm/filter/DataSetWithFieldFilter.hxx @@ -129,7 +129,7 @@ DataSetResult DataSetWithFieldFilter::PrepareForExecution(const vtkm::c result); typedef vtkm::filter::FilterTraits< Derived > Traits; - vtkm::filter::Convert(field, policy, Traits()).CastAndCall(functor); + vtkm::filter::ApplyPolicy(field, policy, Traits()).CastAndCall(functor); return result; } @@ -156,7 +156,7 @@ DataSetResult DataSetWithFieldFilter::PrepareForExecution(const vtkm::c result); typedef vtkm::filter::FilterTraits< Derived > Traits; - vtkm::filter::Convert(field, policy, Traits()).CastAndCall(functor); + vtkm::filter::ApplyPolicy(field, policy, Traits()).CastAndCall(functor); return result; } @@ -189,7 +189,7 @@ bool DataSetWithFieldFilter::MapFieldOntoOutput(DataSetResult& result, valid); typedef vtkm::filter::FilterTraits< Derived > Traits; - vtkm::filter::Convert(field, policy, Traits()).CastAndCall(functor); + vtkm::filter::ApplyPolicy(field, policy, Traits()).CastAndCall(functor); } //the bool valid will be modified by the map algorithm to hold if the diff --git a/vtkm/filter/ExternalFaces.hxx b/vtkm/filter/ExternalFaces.hxx index 7f799f3da..e8a61497d 100644 --- a/vtkm/filter/ExternalFaces.hxx +++ b/vtkm/filter/ExternalFaces.hxx @@ -105,7 +105,7 @@ vtkm::filter::DataSetResult ExternalFaces::DoExecute(const vtkm::cont::DataSet& vtkm::cont::DataSet output; bool workletRan = false; ExternalFacesWorkletWrapper wrapper(output, workletRan); - vtkm::filter::Convert(cells,policy).CastAndCall( wrapper ); + vtkm::filter::ApplyPolicy(cells,policy).CastAndCall( wrapper ); if(!workletRan) { diff --git a/vtkm/filter/FieldFilter.hxx b/vtkm/filter/FieldFilter.hxx index b532bf3a6..45997b8ed 100644 --- a/vtkm/filter/FieldFilter.hxx +++ b/vtkm/filter/FieldFilter.hxx @@ -147,7 +147,7 @@ FieldResult FieldFilter::PrepareForExecution(const vtkm::cont::DataSet result); typedef vtkm::filter::FilterTraits< Derived > Traits; - vtkm::filter::Convert(field, policy, Traits()).CastAndCall(functor); + vtkm::filter::ApplyPolicy(field, policy, Traits()).CastAndCall(functor); return result; } @@ -173,7 +173,7 @@ FieldResult FieldFilter::PrepareForExecution(const vtkm::cont::DataSet result); typedef vtkm::filter::FilterTraits< Derived > Traits; - vtkm::filter::Convert(field, policy, Traits()).CastAndCall(functor); + vtkm::filter::ApplyPolicy(field, policy, Traits()).CastAndCall(functor); return result; } diff --git a/vtkm/filter/MarchingCubes.hxx b/vtkm/filter/MarchingCubes.hxx index f40c6ec0d..c4bdcee2e 100644 --- a/vtkm/filter/MarchingCubes.hxx +++ b/vtkm/filter/MarchingCubes.hxx @@ -326,7 +326,7 @@ vtkm::filter::DataSetResult MarchingCubes::DoExecute(const vtkm::cont::DataSet& vtkm::cont::ArrayHandle numOutputTrisPerCell; classifyCellDispatcher.Invoke(field, - vtkm::filter::Convert(cells, policy), + vtkm::filter::ApplyPolicy(cells, policy), numOutputTrisPerCell, this->NumTrianglesTable); @@ -342,10 +342,10 @@ vtkm::filter::DataSetResult MarchingCubes::DoExecute(const vtkm::cont::DataSet& GenerateDispatcher edgeDispatcher(weightGenerate); edgeDispatcher.Invoke( - vtkm::filter::Convert(cells, policy), + vtkm::filter::ApplyPolicy(cells, policy), //cast to a scalar field if not one, as cellderivative only works on those make_ScalarField(field), - vtkm::filter::Convert(coords, policy), + vtkm::filter::ApplyPolicy(coords, policy), vtkm::cont::make_ArrayHandleGroupVec<3>(normals), vtkm::cont::make_ArrayHandleGroupVec<3>(this->InterpolationWeights), vtkm::cont::make_ArrayHandleGroupVec<3>(this->InterpolationIds), @@ -410,7 +410,8 @@ vtkm::filter::DataSetResult MarchingCubes::DoExecute(const vtkm::cont::DataSet& Algorithm::LowerBounds(unqiueIds, this->InterpolationIds, connectivity); - vtkm::cont::CellSetSingleType< > outputCells( (vtkm::CellShapeTagTriangle()) ); + CellShapeTagTriangle triangleTag; + vtkm::cont::CellSetSingleType< > outputCells( triangleTag ); outputCells.Fill( connectivity ); output.AddCellSet( outputCells ); } @@ -422,13 +423,14 @@ vtkm::filter::DataSetResult MarchingCubes::DoExecute(const vtkm::cont::DataSet& applyFieldDispatcher.Invoke(this->InterpolationIds, this->InterpolationWeights, - vtkm::filter::Convert(coords, policy), + vtkm::filter::ApplyPolicy(coords, policy), vertices); //when we don't merge points, the connectivity array can be represented //by a counting array typedef typename vtkm::cont::ArrayHandleIndex::StorageTag IndexStorageTag; - vtkm::cont::CellSetSingleType< IndexStorageTag > outputCells( (vtkm::CellShapeTagTriangle()) ); + CellShapeTagTriangle triangleTag; + vtkm::cont::CellSetSingleType< IndexStorageTag > outputCells( triangleTag ); vtkm::cont::ArrayHandleIndex connectivity(vertices.GetNumberOfValues()); outputCells.Fill( connectivity ); output.AddCellSet( outputCells ); diff --git a/vtkm/filter/PolicyBase.h b/vtkm/filter/PolicyBase.h index 1889ecdb5..ff803885c 100644 --- a/vtkm/filter/PolicyBase.h +++ b/vtkm/filter/PolicyBase.h @@ -45,8 +45,8 @@ vtkm::cont::DynamicArrayHandleBase< typename DerivedPolicy::FieldTypeList, typename DerivedPolicy::FieldStorageList > -Convert(const vtkm::cont::Field& field, - const vtkm::filter::PolicyBase&) +ApplyPolicy(const vtkm::cont::Field& field, + const vtkm::filter::PolicyBase&) { typedef typename DerivedPolicy::FieldTypeList TypeList; typedef typename DerivedPolicy::FieldStorageList StorageList; @@ -60,9 +60,9 @@ vtkm::cont::DynamicArrayHandleBase< typename vtkm::filter::FilterTraits::InputFieldTypeList, typename DerivedPolicy::FieldStorageList > -Convert(const vtkm::cont::Field& field, - const vtkm::filter::PolicyBase&, - const vtkm::filter::FilterTraits&) +ApplyPolicy(const vtkm::cont::Field& field, + const vtkm::filter::PolicyBase&, + const vtkm::filter::FilterTraits&) { //todo: we need to intersect the policy field type list and the //filter traits to the get smallest set of valid types @@ -79,8 +79,8 @@ vtkm::cont::DynamicArrayHandleBase< typename DerivedPolicy::CoordinateTypeList, typename DerivedPolicy::CoordinateStorageList > -Convert(const vtkm::cont::CoordinateSystem& coordinates, - const vtkm::filter::PolicyBase&) +ApplyPolicy(const vtkm::cont::CoordinateSystem& coordinates, + const vtkm::filter::PolicyBase&) { typedef typename DerivedPolicy::CoordinateTypeList TypeList; typedef typename DerivedPolicy::CoordinateStorageList StorageList; @@ -94,9 +94,9 @@ vtkm::cont::DynamicArrayHandleBase< typename vtkm::filter::FilterTraits::InputFieldTypeList, typename DerivedPolicy::CoordinateStorageList > -Convert(const vtkm::cont::CoordinateSystem& coordinates, - const vtkm::filter::PolicyBase&, - const vtkm::filter::FilterTraits&) +ApplyPolicy(const vtkm::cont::CoordinateSystem& coordinates, + const vtkm::filter::PolicyBase&, + const vtkm::filter::FilterTraits&) { //todo: we need to intersect the policy field type list and the //filter traits to the get smallest set of valid types @@ -110,8 +110,8 @@ Convert(const vtkm::cont::CoordinateSystem& coordinates, template VTKM_CONT_EXPORT vtkm::cont::DynamicCellSetBase< typename DerivedPolicy::CellSetList > -Convert(const vtkm::cont::DynamicCellSet& cellset, - const vtkm::filter::PolicyBase&) +ApplyPolicy(const vtkm::cont::DynamicCellSet& cellset, + const vtkm::filter::PolicyBase&) { typedef typename DerivedPolicy::CellSetList CellSetList; return cellset.ResetCellSetList(CellSetList()); diff --git a/vtkm/filter/Threshold.hxx b/vtkm/filter/Threshold.hxx index 45c4729c5..f14da34c6 100644 --- a/vtkm/filter/Threshold.hxx +++ b/vtkm/filter/Threshold.hxx @@ -114,7 +114,7 @@ vtkm::filter::DataSetResult Threshold::DoExecute(const vtkm::cont::DataSet& inpu typedef Worklets::ThresholdByPointField< ThresholdRange > ThresholdWorklet; ThresholdWorklet worklet(predicate); vtkm::worklet::DispatcherMapTopology dispatcher(worklet); - dispatcher.Invoke(vtkm::filter::Convert(cells, policy), field, passFlags); + dispatcher.Invoke(vtkm::filter::ApplyPolicy(cells, policy), field, passFlags); } else if(fieldMeta.IsCellField()) { @@ -122,7 +122,7 @@ vtkm::filter::DataSetResult Threshold::DoExecute(const vtkm::cont::DataSet& inpu typedef Worklets::ThresholdByCellField< ThresholdRange > ThresholdWorklet; ThresholdWorklet worklet(predicate); vtkm::worklet::DispatcherMapTopology dispatcher(worklet); - dispatcher.Invoke(vtkm::filter::Convert(cells, policy), field, passFlags); + dispatcher.Invoke(vtkm::filter::ApplyPolicy(cells, policy), field, passFlags); } else { @@ -145,7 +145,7 @@ vtkm::filter::DataSetResult Threshold::DoExecute(const vtkm::cont::DataSet& inpu //can use to reduce code duplication, and make it easier to write filters //that return complex dataset types. AddPermutationCellSet addCellSet(output, this->ValidCellIds); - vtkm::filter::Convert(cells, policy).CastAndCall(addCellSet); + vtkm::filter::ApplyPolicy(cells, policy).CastAndCall(addCellSet); //todo: We need to generate a new output policy that replaces //the original storage tag with a new storage tag where everything is diff --git a/vtkm/filter/VertexClustering.hxx b/vtkm/filter/VertexClustering.hxx index f6fef079a..dacb89ab9 100644 --- a/vtkm/filter/VertexClustering.hxx +++ b/vtkm/filter/VertexClustering.hxx @@ -62,8 +62,8 @@ vtkm::filter::DataSetResult VertexClustering::DoExecute(const vtkm::cont::DataSe vtkm::Float64 bounds[6]; compute_bounds(input.GetCoordinateSystem(), bounds, policy, tag); - vtkm::cont::DataSet outDataSet = clustering.Run(vtkm::filter::Convert(input.GetCellSet(), policy), - vtkm::filter::Convert(input.GetCoordinateSystem(), policy), + vtkm::cont::DataSet outDataSet = clustering.Run(vtkm::filter::ApplyPolicy(input.GetCellSet(), policy), + vtkm::filter::ApplyPolicy(input.GetCoordinateSystem(), policy), bounds, this->GetNumberOfDivisions(), tag);