Commit 5c797169 authored by Haocheng LIU's avatar Haocheng LIU

Use the strong typed enums for vtkm::cont::Field

Since Field association is used either when creating or working
with 'vtkm::cont::Field', it's put in the class itself.
parent 87e25dc7
# Use the strong typed enums for vtkm::cont::Field
By doing so, the compiler would not convert these enums into `int`s
which can cause some unexpected behavior.
......@@ -119,11 +119,11 @@ int main(int argc, char* argv[])
bool isCellField;
switch (inField.GetAssociation())
{
case vtkm::cont::Field::ASSOC_POINTS:
case vtkm::cont::Field::Association::POINTS:
isCellField = false;
break;
case vtkm::cont::Field::ASSOC_CELL_SET:
case vtkm::cont::Field::Association::CELL_SET:
isCellField = true;
break;
......
......@@ -150,7 +150,7 @@ public:
const vtkm::cont::DynamicCellSet& cells = input.GetCellSet(this->GetActiveCellSetIndex());
//get the previous state of the game
input.GetField("state", vtkm::cont::Field::ASSOC_POINTS).GetData().CopyTo(prevstate);
input.GetField("state", vtkm::cont::Field::Association::POINTS).GetData().CopyTo(prevstate);
//Update the game state
DispatcherType().Invoke(vtkm::filter::ApplyPolicy(cells, policy), prevstate, state, colors);
......@@ -160,10 +160,10 @@ public:
output.AddCellSet(input.GetCellSet(this->GetActiveCellSetIndex()));
output.AddCoordinateSystem(input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex()));
vtkm::cont::Field colorField("colors", vtkm::cont::Field::ASSOC_POINTS, colors);
vtkm::cont::Field colorField("colors", vtkm::cont::Field::Association::POINTS, colors);
output.AddField(colorField);
vtkm::cont::Field stateField("state", vtkm::cont::Field::ASSOC_POINTS, state);
vtkm::cont::Field stateField("state", vtkm::cont::Field::Association::POINTS, state);
output.AddField(stateField);
return output;
......@@ -240,7 +240,8 @@ struct RenderGameOfLife
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
vtkm::Int32 arraySize = (vtkm::Int32)data.GetCoordinateSystem().GetData().GetNumberOfValues();
UploadData task(&this->ColorState, data.GetField("colors", vtkm::cont::Field::ASSOC_POINTS));
UploadData task(&this->ColorState,
data.GetField("colors", vtkm::cont::Field::Association::POINTS));
vtkm::cont::TryExecute(task, DevicesToTry());
vtkm::Float32 mvp[16] = { 1.f, 0.f, 0.f, 0.f, 0.f, 1.f, 0.f, 0.f,
......@@ -367,7 +368,8 @@ int main(int argc, char** argv)
vtkm::cont::DataSetBuilderUniform builder;
vtkm::cont::DataSet data = builder.Create(vtkm::Id2(x, y));
auto stateField = vtkm::cont::make_Field("state", vtkm::cont::Field::ASSOC_POINTS, input_state);
auto stateField =
vtkm::cont::make_Field("state", vtkm::cont::Field::Association::POINTS, input_state);
data.AddField(stateField);
GameOfLife filter;
......
......@@ -153,7 +153,7 @@ inline VTKM_CONT vtkm::cont::DataSet HistogramMPI::DoExecute(
this->BinDelta = static_cast<vtkm::Float64>(delta);
vtkm::cont::DataSet output;
vtkm::cont::Field rfield(
this->GetOutputFieldName(), vtkm::cont::Field::ASSOC_WHOLE_MESH, binArray);
this->GetOutputFieldName(), vtkm::cont::Field::Association::WHOLE_MESH, binArray);
output.AddField(rfield);
return output;
}
......@@ -195,7 +195,7 @@ inline VTKM_CONT void HistogramMPI::PostExecute(const vtkm::cont::MultiBlock&,
vtkm::cont::DataSet output;
vtkm::cont::Field rfield(this->GetOutputFieldName(),
vtkm::cont::Field::ASSOC_WHOLE_MESH,
vtkm::cont::Field::Association::WHOLE_MESH,
helper.ReduceAll(this->NumberOfBins));
output.AddField(rfield);
......
......@@ -130,7 +130,8 @@ vtkm::cont::DataSet MakeIsosurfaceTestDataSet(vtkm::Id3 dims)
vtkm::cont::ArrayHandleUniformPointCoordinates coordinates(vdims, origin, spacing);
dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates));
dataSet.AddField(vtkm::cont::Field("nodevar", vtkm::cont::Field::ASSOC_POINTS, fieldArray));
dataSet.AddField(
vtkm::cont::Field("nodevar", vtkm::cont::Field::Association::POINTS, fieldArray));
static const vtkm::IdComponent ndim = 3;
vtkm::cont::CellSetStructured<ndim> cellSet("cells");
......
......@@ -97,7 +97,7 @@ void multiblock_processing(TaskQueue<vtkm::cont::MultiBlock>& queue)
// block.PrintSummary(std::cout);
try
{
const auto& field = block.GetField("Gradients", vtkm::cont::Field::ASSOC_POINTS);
const auto& field = block.GetField("Gradients", vtkm::cont::Field::Association::POINTS);
(void)field;
}
catch (vtkm::cont::ErrorBadValue)
......
......@@ -254,7 +254,8 @@ int main(int argc, char* argv[])
vtkm::cont::DataSet inDataSet;
vtkm::cont::ArrayHandleUniformPointCoordinates coordinates(vdims);
inDataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates));
inDataSet.AddField(vtkm::cont::Field("vecData", vtkm::cont::Field::ASSOC_POINTS, fieldArray));
inDataSet.AddField(
vtkm::cont::Field("vecData", vtkm::cont::Field::Association::POINTS, fieldArray));
vtkm::cont::CellSetStructured<3> inCellSet("cells");
inCellSet.SetPointDimensions(vtkm::make_Vec(vdims[0], vdims[1], vdims[2]));
......
......@@ -149,7 +149,7 @@ vtkm::cont::DataSet CreateTestDataSet(vtkm::Id3 dims)
tangleFieldDispatcher.Invoke(vertexCountImplicitArray, scalarVar);
dataSet.AddField(
vtkm::cont::Field(std::string("scalar"), vtkm::cont::Field::ASSOC_POINTS, scalarVar));
vtkm::cont::Field(std::string("scalar"), vtkm::cont::Field::Association::POINTS, scalarVar));
return dataSet;
}
......@@ -456,7 +456,7 @@ int main(int argc, char** argv)
vtkm::cont::DataSet ds;
vtkm::cont::ArrayHandleUniformPointCoordinates coordinates(vdims);
ds.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates));
ds.AddField(vtkm::cont::Field("vec", vtkm::cont::Field::ASSOC_POINTS, fieldArray));
ds.AddField(vtkm::cont::Field("vec", vtkm::cont::Field::Association::POINTS, fieldArray));
vtkm::cont::CellSetStructured<3> inCellSet("cells");
inCellSet.SetPointDimensions(vtkm::make_Vec(vdims[0], vdims[1], vdims[2]));
......
......@@ -107,7 +107,8 @@ vtkm::cont::DataSet MakeIsosurfaceTestDataSet(vtkm::Id3 dims)
vtkm::cont::ArrayHandleUniformPointCoordinates coordinates(vdims, origin, spacing);
dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates));
dataSet.AddField(vtkm::cont::Field("nodevar", vtkm::cont::Field::ASSOC_POINTS, fieldArray));
dataSet.AddField(
vtkm::cont::Field("nodevar", vtkm::cont::Field::Association::POINTS, fieldArray));
static const vtkm::IdComponent ndim = 3;
vtkm::cont::CellSetStructured<ndim> cellSet("cells");
......
......@@ -39,7 +39,7 @@ VTKM_CONT CoordinateSystem::CoordinateSystem()
VTKM_CONT CoordinateSystem::CoordinateSystem(
std::string name,
const vtkm::cont::ArrayHandleVirtualCoordinates::Superclass& data)
: Superclass(name, ASSOC_POINTS, data)
: Superclass(name, Association::POINTS, data)
{
}
......@@ -51,7 +51,7 @@ CoordinateSystem::CoordinateSystem(std::string name,
vtkm::Vec<vtkm::FloatDefault, 3> origin,
vtkm::Vec<vtkm::FloatDefault, 3> spacing)
: Superclass(name,
ASSOC_POINTS,
Association::POINTS,
vtkm::cont::ArrayHandleVirtualCoordinates(
vtkm::cont::ArrayHandleUniformPointCoordinates(dimensions, origin, spacing)))
{
......
......@@ -64,14 +64,14 @@ template <typename TypeList, typename StorageList>
VTKM_CONT CoordinateSystem::CoordinateSystem(
std::string name,
const vtkm::cont::DynamicArrayHandleBase<TypeList, StorageList>& data)
: Superclass(name, ASSOC_POINTS, detail::MakeArrayHandleVirtualCoordinates(data))
: Superclass(name, Association::POINTS, detail::MakeArrayHandleVirtualCoordinates(data))
{
}
template <typename T, typename Storage>
VTKM_CONT CoordinateSystem::CoordinateSystem(std::string name,
const vtkm::cont::ArrayHandle<T, Storage>& data)
: Superclass(name, ASSOC_POINTS, vtkm::cont::ArrayHandleVirtualCoordinates(data))
: Superclass(name, Association::POINTS, vtkm::cont::ArrayHandleVirtualCoordinates(data))
{
}
......
......@@ -48,8 +48,7 @@ const vtkm::cont::Field& DataSet::GetField(vtkm::Id index) const
return this->Fields[static_cast<std::size_t>(index)];
}
vtkm::Id DataSet::GetFieldIndex(const std::string& name,
vtkm::cont::Field::AssociationEnum assoc) const
vtkm::Id DataSet::GetFieldIndex(const std::string& name, vtkm::cont::Field::Association assoc) const
{
bool found;
vtkm::Id index = this->FindFieldIndex(name, assoc, found);
......@@ -120,12 +119,12 @@ void DataSet::PrintSummary(std::ostream& out) const
}
vtkm::Id DataSet::FindFieldIndex(const std::string& name,
vtkm::cont::Field::AssociationEnum association,
vtkm::cont::Field::Association association,
bool& found) const
{
for (std::size_t index = 0; index < this->Fields.size(); ++index)
{
if ((association == vtkm::cont::Field::ASSOC_ANY ||
if ((association == vtkm::cont::Field::Association::ANY ||
association == this->Fields[index].GetAssociation()) &&
this->Fields[index].GetName() == name)
{
......
......@@ -49,7 +49,7 @@ public:
VTKM_CONT
bool HasField(const std::string& name,
vtkm::cont::Field::AssociationEnum assoc = vtkm::cont::Field::ASSOC_ANY) const
vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::ANY) const
{
bool found;
this->FindFieldIndex(name, assoc, found);
......@@ -59,12 +59,12 @@ public:
VTKM_CONT
vtkm::Id GetFieldIndex(
const std::string& name,
vtkm::cont::Field::AssociationEnum assoc = vtkm::cont::Field::ASSOC_ANY) const;
vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::ANY) const;
VTKM_CONT
const vtkm::cont::Field& GetField(
const std::string& name,
vtkm::cont::Field::AssociationEnum assoc = vtkm::cont::Field::ASSOC_ANY) const
vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::ANY) const
{
return this->GetField(this->GetFieldIndex(name, assoc));
}
......@@ -72,13 +72,13 @@ public:
VTKM_CONT
const vtkm::cont::Field& GetCellField(const std::string& name) const
{
return this->GetField(name, vtkm::cont::Field::ASSOC_CELL_SET);
return this->GetField(name, vtkm::cont::Field::Association::CELL_SET);
}
VTKM_CONT
const vtkm::cont::Field& GetPointField(const std::string& name) const
{
return this->GetField(name, vtkm::cont::Field::ASSOC_POINTS);
return this->GetField(name, vtkm::cont::Field::Association::POINTS);
}
VTKM_CONT
......@@ -174,7 +174,7 @@ private:
VTKM_CONT
vtkm::Id FindFieldIndex(const std::string& name,
vtkm::cont::Field::AssociationEnum association,
vtkm::cont::Field::Association association,
bool& found) const;
VTKM_CONT
......
......@@ -40,7 +40,7 @@ public:
const std::string& fieldName,
const vtkm::cont::DynamicArrayHandle& field)
{
dataSet.AddField(Field(fieldName, vtkm::cont::Field::ASSOC_POINTS, field));
dataSet.AddField(Field(fieldName, vtkm::cont::Field::Association::POINTS, field));
}
template <typename T, typename Storage>
......@@ -48,7 +48,7 @@ public:
const std::string& fieldName,
const vtkm::cont::ArrayHandle<T, Storage>& field)
{
dataSet.AddField(Field(fieldName, vtkm::cont::Field::ASSOC_POINTS, field));
dataSet.AddField(Field(fieldName, vtkm::cont::Field::Association::POINTS, field));
}
template <typename T>
......@@ -57,7 +57,7 @@ public:
const std::vector<T>& field)
{
dataSet.AddField(
make_Field(fieldName, vtkm::cont::Field::ASSOC_POINTS, field, vtkm::CopyFlag::On));
make_Field(fieldName, vtkm::cont::Field::Association::POINTS, field, vtkm::CopyFlag::On));
}
template <typename T>
......@@ -67,7 +67,7 @@ public:
const vtkm::Id& n)
{
dataSet.AddField(
make_Field(fieldName, vtkm::cont::Field::ASSOC_POINTS, field, n, vtkm::CopyFlag::On));
make_Field(fieldName, vtkm::cont::Field::Association::POINTS, field, n, vtkm::CopyFlag::On));
}
//Cell centered field
......@@ -77,7 +77,8 @@ public:
const vtkm::cont::DynamicArrayHandle& field,
const std::string& cellSetName)
{
dataSet.AddField(Field(fieldName, vtkm::cont::Field::ASSOC_CELL_SET, cellSetName, field));
dataSet.AddField(
Field(fieldName, vtkm::cont::Field::Association::CELL_SET, cellSetName, field));
}
template <typename T, typename Storage>
......@@ -86,7 +87,8 @@ public:
const vtkm::cont::ArrayHandle<T, Storage>& field,
const std::string& cellSetName)
{
dataSet.AddField(Field(fieldName, vtkm::cont::Field::ASSOC_CELL_SET, cellSetName, field));
dataSet.AddField(
Field(fieldName, vtkm::cont::Field::Association::CELL_SET, cellSetName, field));
}
template <typename T>
......@@ -96,7 +98,7 @@ public:
const std::string& cellSetName)
{
dataSet.AddField(make_Field(
fieldName, vtkm::cont::Field::ASSOC_CELL_SET, cellSetName, field, vtkm::CopyFlag::On));
fieldName, vtkm::cont::Field::Association::CELL_SET, cellSetName, field, vtkm::CopyFlag::On));
}
template <typename T>
......@@ -106,8 +108,12 @@ public:
const vtkm::Id& n,
const std::string& cellSetName)
{
dataSet.AddField(make_Field(
fieldName, vtkm::cont::Field::ASSOC_CELL_SET, cellSetName, field, n, vtkm::CopyFlag::On));
dataSet.AddField(make_Field(fieldName,
vtkm::cont::Field::Association::CELL_SET,
cellSetName,
field,
n,
vtkm::CopyFlag::On));
}
VTKM_CONT
......
......@@ -32,19 +32,19 @@ void Field::PrintSummary(std::ostream& out) const
out << " assoc= ";
switch (this->GetAssociation())
{
case ASSOC_ANY:
case Association::ANY:
out << "Any ";
break;
case ASSOC_WHOLE_MESH:
case Association::WHOLE_MESH:
out << "Mesh ";
break;
case ASSOC_POINTS:
case Association::POINTS:
out << "Points ";
break;
case ASSOC_CELL_SET:
case Association::CELL_SET:
out << "Cells ";
break;
case ASSOC_LOGICAL_DIM:
case Association::LOGICAL_DIM:
out << "LogicalDim ";
break;
}
......
......@@ -64,113 +64,113 @@ private:
class VTKM_CONT_EXPORT Field
{
public:
enum AssociationEnum
enum struct Association
{
ASSOC_ANY,
ASSOC_WHOLE_MESH,
ASSOC_POINTS,
ASSOC_CELL_SET,
ASSOC_LOGICAL_DIM
ANY,
WHOLE_MESH,
POINTS,
CELL_SET,
LOGICAL_DIM
};
/// constructors for points / whole mesh
VTKM_CONT
Field(std::string name, AssociationEnum association, const vtkm::cont::DynamicArrayHandle& data)
Field(std::string name, Association association, const vtkm::cont::DynamicArrayHandle& data)
: Name(name)
, Association(association)
, FieldAssociation(association)
, AssocCellSetName()
, AssocLogicalDim(-1)
, Data(data)
, Range()
, ModifiedFlag(true)
{
VTKM_ASSERT(this->Association == ASSOC_WHOLE_MESH || this->Association == ASSOC_POINTS);
VTKM_ASSERT(this->FieldAssociation == Association::WHOLE_MESH ||
this->FieldAssociation == Association::POINTS);
}
template <typename T, typename Storage>
VTKM_CONT Field(std::string name,
AssociationEnum association,
const ArrayHandle<T, Storage>& data)
VTKM_CONT Field(std::string name, Association association, const ArrayHandle<T, Storage>& data)
: Name(name)
, Association(association)
, FieldAssociation(association)
, AssocCellSetName()
, AssocLogicalDim(-1)
, Data(data)
, Range()
, ModifiedFlag(true)
{
VTKM_ASSERT((this->Association == ASSOC_WHOLE_MESH) || (this->Association == ASSOC_POINTS));
VTKM_ASSERT((this->FieldAssociation == Association::WHOLE_MESH) ||
(this->FieldAssociation == Association::POINTS));
}
/// constructors for cell set associations
VTKM_CONT
Field(std::string name,
AssociationEnum association,
Association association,
const std::string& cellSetName,
const vtkm::cont::DynamicArrayHandle& data)
: Name(name)
, Association(association)
, FieldAssociation(association)
, AssocCellSetName(cellSetName)
, AssocLogicalDim(-1)
, Data(data)
, Range()
, ModifiedFlag(true)
{
VTKM_ASSERT(this->Association == ASSOC_CELL_SET);
VTKM_ASSERT(this->FieldAssociation == Association::CELL_SET);
}
template <typename T, typename Storage>
VTKM_CONT Field(std::string name,
AssociationEnum association,
Association association,
const std::string& cellSetName,
const vtkm::cont::ArrayHandle<T, Storage>& data)
: Name(name)
, Association(association)
, FieldAssociation(association)
, AssocCellSetName(cellSetName)
, AssocLogicalDim(-1)
, Data(data)
, Range()
, ModifiedFlag(true)
{
VTKM_ASSERT(this->Association == ASSOC_CELL_SET);
VTKM_ASSERT(this->FieldAssociation == Association::CELL_SET);
}
/// constructors for logical dimension associations
VTKM_CONT
Field(std::string name,
AssociationEnum association,
Association association,
vtkm::IdComponent logicalDim,
const vtkm::cont::DynamicArrayHandle& data)
: Name(name)
, Association(association)
, FieldAssociation(association)
, AssocCellSetName()
, AssocLogicalDim(logicalDim)
, Data(data)
, Range()
, ModifiedFlag(true)
{
VTKM_ASSERT(this->Association == ASSOC_LOGICAL_DIM);
VTKM_ASSERT(this->FieldAssociation == Association::LOGICAL_DIM);
}
template <typename T, typename Storage>
VTKM_CONT Field(std::string name,
AssociationEnum association,
Association association,
vtkm::IdComponent logicalDim,
const vtkm::cont::ArrayHandle<T, Storage>& data)
: Name(name)
, Association(association)
, FieldAssociation(association)
, AssocLogicalDim(logicalDim)
, Data(data)
, Range()
, ModifiedFlag(true)
{
VTKM_ASSERT(this->Association == ASSOC_LOGICAL_DIM);
VTKM_ASSERT(this->FieldAssociation == Association::LOGICAL_DIM);
}
VTKM_CONT
Field()
: Name()
, Association(ASSOC_ANY)
, FieldAssociation(Association::ANY)
, AssocCellSetName()
, AssocLogicalDim()
, Data()
......@@ -190,7 +190,7 @@ public:
const std::string& GetName() const { return this->Name; }
VTKM_CONT
AssociationEnum GetAssociation() const { return this->Association; }
Association GetAssociation() const { return this->FieldAssociation; }
VTKM_CONT
std::string GetAssocCellSet() const { return this->AssocCellSetName; }
......@@ -279,7 +279,7 @@ public:
private:
std::string Name; ///< name of field
AssociationEnum Association;
Association FieldAssociation;
std::string AssocCellSetName; ///< only populate if assoc is cells
vtkm::IdComponent AssocLogicalDim; ///< only populate if assoc is logical dim
......@@ -314,7 +314,7 @@ void CastAndCall(const vtkm::cont::Field& field, Functor&& f, Args&&... args)
/// Convenience functions to build fields from C style arrays and std::vector
template <typename T>
vtkm::cont::Field make_Field(std::string name,
Field::AssociationEnum association,
Field::Association association,
const T* data,
vtkm::Id size,
vtkm::CopyFlag copy = vtkm::CopyFlag::Off)
......@@ -324,7 +324,7 @@ vtkm::cont::Field make_Field(std::string name,
template <typename T>
vtkm::cont::Field make_Field(std::string name,
Field::AssociationEnum association,
Field::Association association,
const std::vector<T>& data,
vtkm::CopyFlag copy = vtkm::CopyFlag::Off)
{
......@@ -333,7 +333,7 @@ vtkm::cont::Field make_Field(std::string name,
template <typename T>
vtkm::cont::Field make_Field(std::string name,
Field::AssociationEnum association,
Field::Association association,
const std::string& cellSetName,
const T* data,
vtkm::Id size,
......@@ -345,7 +345,7 @@ vtkm::cont::Field make_Field(std::string name,
template <typename T>
vtkm::cont::Field make_Field(std::string name,
Field::AssociationEnum association,
Field::Association association,
const std::string& cellSetName,
const std::vector<T>& data,
vtkm::CopyFlag copy = vtkm::CopyFlag::Off)
......@@ -356,7 +356,7 @@ vtkm::cont::Field make_Field(std::string name,
template <typename T>
vtkm::cont::Field make_Field(std::string name,
Field::AssociationEnum association,
Field::Association association,
vtkm::IdComponent logicalDim,
const T* data,
vtkm::Id size,
......@@ -368,7 +368,7 @@ vtkm::cont::Field make_Field(std::string name,
template <typename T>
vtkm::cont::Field make_Field(std::string name,
Field::AssociationEnum association,
Field::Association association,
vtkm::IdComponent logicalDim,
const std::vector<T>& data,
vtkm::CopyFlag copy = vtkm::CopyFlag::Off)
......
......@@ -31,7 +31,7 @@ namespace cont
VTKM_CONT
vtkm::cont::ArrayHandle<vtkm::Range> FieldRangeCompute(const vtkm::cont::DataSet& dataset,
const std::string& name,
vtkm::cont::Field::AssociationEnum assoc)
vtkm::cont::Field::Association assoc)
{
return vtkm::cont::detail::FieldRangeComputeImpl(
dataset, name, assoc, VTKM_DEFAULT_TYPE_LIST_TAG(), VTKM_DEFAULT_STORAGE_LIST_TAG());
......@@ -41,7 +41,7 @@ vtkm::cont::ArrayHandle<vtkm::Range> FieldRangeCompute(const vtkm::cont::DataSet
VTKM_CONT
vtkm::cont::ArrayHandle<vtkm::Range> FieldRangeCompute(const vtkm::cont::MultiBlock& multiblock,
const std::string& name,
vtkm::cont::Field::AssociationEnum assoc)
vtkm::cont::Field::Association assoc)
{
return vtkm::cont::detail::FieldRangeComputeImpl(
multiblock, name, assoc, VTKM_DEFAULT_TYPE_LIST_TAG(), VTKM_DEFAULT_STORAGE_LIST_TAG());
......
......@@ -45,13 +45,13 @@ VTKM_CONT
vtkm::cont::ArrayHandle<vtkm::Range> FieldRangeCompute(
const vtkm::cont::DataSet& dataset,
const std::string& name,
vtkm::cont::Field::AssociationEnum assoc = vtkm::cont::Field::ASSOC_ANY);
vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::ANY);
template <typename TypeList, typename StorageList>
VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Range> FieldRangeCompute(
const vtkm::cont::DataSet& dataset,
const std::string& name,
vtkm::cont::Field::AssociationEnum assoc,
vtkm::cont::Field::Association assoc,
TypeList,
StorageList)
{
......@@ -65,7 +65,7 @@ template <typename TypeList>
VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Range> FieldRangeCompute(
const vtkm::cont::DataSet& dataset,
const std::string& name,
vtkm::cont::Field::AssociationEnum assoc,
vtkm::cont::Field::Association assoc,
TypeList)
{
VTKM_IS_LIST_TAG(TypeList);
......@@ -86,13 +86,13 @@ VTKM_CONT
vtkm::cont::ArrayHandle<vtkm::Range> FieldRangeCompute(
const vtkm::cont::MultiBlock& multiblock,
const std::string& name,
vtkm::cont::Field::AssociationEnum assoc = vtkm::cont::Field::ASSOC_ANY);
vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::ANY);
template <typename TypeList, typename StorageList>
VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Range> FieldRangeCompute(
const vtkm::cont::MultiBlock& multiblock,
const std::string& name,
vtkm::cont::Field::AssociationEnum assoc,
vtkm::cont::Field::Association assoc,
TypeList,
StorageList)
{
......@@ -107,7 +107,7 @@ template <typename TypeList>
VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Range> FieldRangeCompute(
const vtkm::cont::MultiBlock& multiblock,
const std::string& name,
vtkm::cont::Field::AssociationEnum assoc,
vtkm::cont::Field::Association assoc,
TypeList)
{
VTKM_IS_LIST_TAG(TypeList);
......
......@@ -33,7 +33,7 @@ template <typename TypeList, typename StorageList>
VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Range> FieldRangeComputeImpl(
const vtkm::cont::DataSet& dataset,
const std::string& name,
vtkm::cont::Field::AssociationEnum assoc,
vtkm::cont::Field::Association assoc,
TypeList,
StorageList)
{
......@@ -55,7 +55,7 @@ template <typename TypeList, typename StorageList>
VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Range> FieldRangeComputeImpl(
const vtkm::cont::MultiBlock& multiblock,
const std::string& name,
vtkm::cont::Field::AssociationEnum assoc,
vtkm::cont::Field::Association assoc,
TypeList,
StorageList)
{
......
......@@ -41,10 +41,9 @@ namespace cont
//-----------------------------------------------------------------------------
VTKM_CONT
vtkm::cont::ArrayHandle<vtkm::Range> FieldRangeGlobalCompute(
const vtkm::cont::DataSet& dataset,
const std::string& name,
vtkm::cont::Field::AssociationEnum assoc)
vtkm::cont::ArrayHandle<vtkm::Range> FieldRangeGlobalCompute(const vtkm::cont::DataSet& dataset,
const std::string& name,
vtkm::cont::Field::Association assoc)
{
return detail::FieldRangeGlobalComputeImpl(
dataset, name, assoc, VTKM_DEFAULT_TYPE_LIST_TAG(), VTKM_DEFAULT_STORAGE_LIST_TAG());
......@@ -55,7 +54,7 @@ VTKM_CONT
vtkm::cont::ArrayHandle<vtkm::Range> FieldRangeGlobalCompute(
const vtkm::cont::MultiBlock& multiblock,
const std::string& name,
vtkm::cont::Field::AssociationEnum assoc)
vtkm::cont::Field::Association assoc)
{
return detail::FieldRangeGlobalComputeImpl(