Fixed some of the compiler warning from CDash.
This commit is contained in:
parent
d7d7cdd5b1
commit
18caed60e3
@ -113,10 +113,12 @@ public:
|
||||
cont::ArrayHandle<Id> next;
|
||||
|
||||
vtkm::cont::ArrayCopy(
|
||||
vtkm::cont::make_ArrayHandle(std::vector<Id>(superarcs.GetNumberOfValues(), NO_SUCH_ELEMENT)),
|
||||
vtkm::cont::make_ArrayHandle(std::vector<Id>(
|
||||
static_cast<unsigned long>(superarcs.GetNumberOfValues()), NO_SUCH_ELEMENT)),
|
||||
first);
|
||||
vtkm::cont::ArrayCopy(
|
||||
vtkm::cont::make_ArrayHandle(std::vector<Id>(edges.GetNumberOfValues(), NO_SUCH_ELEMENT)),
|
||||
vtkm::cont::make_ArrayHandle(
|
||||
std::vector<Id>(static_cast<unsigned long>(edges.GetNumberOfValues()), NO_SUCH_ELEMENT)),
|
||||
next);
|
||||
|
||||
//
|
||||
@ -132,8 +134,8 @@ public:
|
||||
succ.Allocate(edges.GetNumberOfValues());
|
||||
|
||||
vtkm::worklet::contourtree_augmented::process_contourtree_inc::ComputeEulerTourList
|
||||
eulerTourListWorklet(edges);
|
||||
this->Invoke(eulerTourListWorklet, next, first, succ);
|
||||
eulerTourListWorklet;
|
||||
this->Invoke(eulerTourListWorklet, next, first, edges, succ);
|
||||
}
|
||||
|
||||
// Reroot the euler tour at a different root (O(n) for finding the first occurence of the new root and O(1) for rerouting and O(n) for returning it as an array)
|
||||
@ -144,8 +146,8 @@ public:
|
||||
//
|
||||
// Reroot at the global min/max
|
||||
//
|
||||
int i = 0;
|
||||
int start = -1;
|
||||
Id i = 0;
|
||||
Id start = NO_SUCH_ELEMENT;
|
||||
do
|
||||
{
|
||||
if (edgesPortal.Get(i)[0] == root)
|
||||
|
@ -866,22 +866,24 @@ public:
|
||||
long long index;
|
||||
};
|
||||
|
||||
std::vector<VertexData> vertexData(supernodes.GetNumberOfValues(), { -1, -1 });
|
||||
for (unsigned int i = 0; i < vertexData.size(); i++)
|
||||
std::vector<VertexData> vertexData(static_cast<unsigned long>(supernodes.GetNumberOfValues()),
|
||||
{ -1, -1 });
|
||||
for (unsigned long i = 0; i < vertexData.size(); i++)
|
||||
{
|
||||
vertexData[i].index = i;
|
||||
}
|
||||
|
||||
parents.Set(root, root);
|
||||
vertexData[root].distance = 0;
|
||||
vertexData[static_cast<unsigned long>(root)].distance = 0;
|
||||
|
||||
for (int i = 0; i < tourEdges.GetNumberOfValues(); i++)
|
||||
{
|
||||
const Vec<Id, 2> e = tourEdges.Get(i);
|
||||
if (-1 == vertexData[e[1]].distance)
|
||||
if (-1 == vertexData[static_cast<unsigned long>(e[1])].distance)
|
||||
{
|
||||
parents.Set(e[1], e[0]);
|
||||
vertexData[e[1]].distance = vertexData[e[0]].distance + 1;
|
||||
vertexData[static_cast<unsigned long>(e[1])].distance =
|
||||
vertexData[static_cast<unsigned long>(e[0])].distance + 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -896,7 +898,7 @@ public:
|
||||
|
||||
for (unsigned int i = 0; i < vertexData.size(); i++)
|
||||
{
|
||||
Id vertex = vertexData[i].index;
|
||||
Id vertex = static_cast<Id>(vertexData[i].index);
|
||||
Id parent = parents.Get(vertex);
|
||||
|
||||
Id vertexValue = maskedIndex(supernodes.Get(minMaxIndex.Get(vertex)));
|
||||
|
@ -76,39 +76,34 @@ namespace process_contourtree_inc
|
||||
class ComputeEulerTourList : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
public:
|
||||
typedef void ControlSignature(WholeArrayIn next, WholeArrayIn first, WholeArrayOut succ);
|
||||
typedef void ControlSignature(WholeArrayIn next,
|
||||
WholeArrayIn first,
|
||||
WholeArrayIn edges,
|
||||
WholeArrayOut succ);
|
||||
|
||||
typedef void ExecutionSignature(InputIndex, _1, _2, _3);
|
||||
typedef void ExecutionSignature(InputIndex, _1, _2, _3, _4);
|
||||
using InputDomain = _1;
|
||||
|
||||
vtkm::cont::ArrayHandle<Vec<Id, 2>> edges;
|
||||
|
||||
// Default Constructor
|
||||
VTKM_EXEC_CONT ComputeEulerTourList(vtkm::cont::ArrayHandle<Vec<Id, 2>> _edges)
|
||||
: edges(_edges)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename NextArrayPortalType,
|
||||
typename FirstArrayPortalType,
|
||||
typename EdgesArrayPortalType,
|
||||
typename OutputArrayPortalType>
|
||||
VTKM_EXEC void operator()(const vtkm::Id i,
|
||||
const NextArrayPortalType& next,
|
||||
const FirstArrayPortalType& first,
|
||||
const EdgesArrayPortalType& edges,
|
||||
const OutputArrayPortalType& succ) const
|
||||
{
|
||||
// For edge (a, b) find the opposite edge (b, a) in the sorted list of edges
|
||||
// This relies on the fact that in the contour tree nodes have bounded degree.
|
||||
// This comes from the fact that vertices in a 2D/3D mesh have a bounded degree.
|
||||
auto edgesPortal = edges.GetPortalConstControl();
|
||||
|
||||
auto currentEdge = edgesPortal.Get(i);
|
||||
auto currentEdge = edges.Get(i);
|
||||
auto oppositeIndex = first.Get(currentEdge[1]);
|
||||
|
||||
while (oppositeIndex < edges.GetNumberOfValues() &&
|
||||
currentEdge[1] == edgesPortal.Get(oppositeIndex)[0])
|
||||
currentEdge[1] == edges.Get(oppositeIndex)[0])
|
||||
{
|
||||
if (currentEdge[0] == edgesPortal.Get(oppositeIndex)[1])
|
||||
if (currentEdge[0] == edges.Get(oppositeIndex)[1])
|
||||
{
|
||||
break;
|
||||
}
|
||||
@ -118,7 +113,7 @@ public:
|
||||
|
||||
if (NO_SUCH_ELEMENT == next.Get(oppositeIndex))
|
||||
{
|
||||
succ.Set(i, first.Get(edges.GetPortalConstControl().Get(i)[1]));
|
||||
succ.Set(i, first.Get(edges.Get(i)[1]));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -108,7 +108,7 @@ public:
|
||||
{
|
||||
Id optimal = tourEdges.Get(firstLast.Get(i).first)[1];
|
||||
|
||||
for (int j = firstLast.Get(i).first; j < firstLast.Get(i).second; j++)
|
||||
for (Id j = firstLast.Get(i).first; j < firstLast.Get(i).second; j++)
|
||||
{
|
||||
Id vertex = tourEdges.Get(j)[1];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user