mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
Fix compiler warnings and test errors before merge.
This commit is contained in:
parent
851dfc094b
commit
9548441565
@ -64,8 +64,6 @@
|
||||
// Proceedings of the IEEE Symposium on Large Data Analysis and Visualization
|
||||
// (LDAV), October 2016, Baltimore, Maryland.
|
||||
|
||||
// We first check if VTKM_DEVICE_ADAPTER is defined, so that when TBB and CUDA
|
||||
// includes this file we use the device adapter that they have set.
|
||||
#ifndef VTKM_DEVICE_ADAPTER
|
||||
#define VTKM_DEVICE_ADAPTER VTKM_DEVICE_ADAPTER_SERIAL
|
||||
#endif
|
||||
|
@ -64,8 +64,6 @@
|
||||
// Proceedings of the IEEE Symposium on Large Data Analysis and Visualization
|
||||
// (LDAV), October 2016, Baltimore, Maryland.
|
||||
|
||||
// We first check if VTKM_DEVICE_ADAPTER is defined, so that when TBB and CUDA
|
||||
// includes this file we use the device adapter that they have set.
|
||||
#ifndef VTKM_DEVICE_ADAPTER
|
||||
#define VTKM_DEVICE_ADAPTER VTKM_DEVICE_ADAPTER_SERIAL
|
||||
#endif
|
||||
|
@ -19,9 +19,53 @@
|
||||
##============================================================================
|
||||
|
||||
set(headers
|
||||
# Mesh2D_DEM_VertexOutdegreeStarter.h
|
||||
ActiveEdgeTransferrer.h
|
||||
ChainDoubler.h
|
||||
ChainGraph.h
|
||||
ContourTree.h
|
||||
CopyJoinSplit.h
|
||||
CopyNeighbors.h
|
||||
CopySupernodes.h
|
||||
DegreeDelta.h
|
||||
DegreeSubrangeOffset.h
|
||||
EdgePeakComparator.h
|
||||
FillSupernodes.h
|
||||
FindLeaves.h
|
||||
GoverningSaddleFinder.h
|
||||
JoinArcConnector.h
|
||||
JoinSuperArcFinder.h
|
||||
JoinTreeTransferrer.h
|
||||
LinkComponentCaseTable2D.h
|
||||
LinkComponentCaseTable3D.h
|
||||
MergeTree.h
|
||||
Mesh2D_DEM_SaddleStarter.h
|
||||
Mesh2D_DEM_Triangulation.h
|
||||
Mesh2D_DEM_Triangulation_Macros.h
|
||||
Mesh2D_DEM_VertexOutdegreeStarter.h
|
||||
Mesh2D_DEM_VertexStarter.h
|
||||
# ActiveEdgeTransferrer.h
|
||||
Mesh3D_DEM_SaddleStarter.h
|
||||
Mesh3D_DEM_Triangulation.h
|
||||
Mesh3D_DEM_Triangulation_Macros.h
|
||||
Mesh3D_DEM_VertexOutdegreeStarter.h
|
||||
Mesh3D_DEM_VertexStarter.h
|
||||
PrintVectors.h
|
||||
RegularPointTransferrer.h
|
||||
RegularToCandidate.h
|
||||
RegularToCriticalDown.h
|
||||
RegularToCriticalUp.h
|
||||
ResetDegrees.h
|
||||
SaddleAscentFunctor.h
|
||||
SaddleAscentTransferrer.h
|
||||
SetJoinAndSplitArcs.h
|
||||
SetSupernodeInward.h
|
||||
SkipVertex.h
|
||||
SubrangeOffset.h
|
||||
TrunkBuilder.h
|
||||
Types.h
|
||||
UpdateOutbound.h
|
||||
VertexDegreeUpdater.h
|
||||
VertexMergeComparator.h
|
||||
VertexValueComparator.h
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
@ -83,6 +83,9 @@
|
||||
#ifndef vtkm_worklet_contourtree_chain_doubler_h
|
||||
#define vtkm_worklet_contourtree_chain_doubler_h
|
||||
|
||||
#include <vtkm/worklet/WorkletMapField.h>
|
||||
#include <vtkm/exec/ExecutionWholeArray.h>
|
||||
|
||||
namespace vtkm {
|
||||
namespace worklet {
|
||||
namespace contourtree {
|
||||
|
@ -92,7 +92,9 @@
|
||||
#include <vtkm/worklet/contourtree/SaddleAscentTransferrer.h>
|
||||
#include <vtkm/worklet/contourtree/TrunkBuilder.h>
|
||||
#include <vtkm/worklet/contourtree/JoinTreeTransferrer.h>
|
||||
|
||||
#include <vtkm/cont/ArrayHandlePermutation.h>
|
||||
#include <vtkm/worklet/DispatcherMapField.h>
|
||||
|
||||
#define DEBUG_PRINT 1
|
||||
//#define DEBUG_FUNCTION_ENTRY 1
|
||||
@ -358,9 +360,6 @@ void ChainGraph<T,StorageType,DeviceAdapter>::TransferRegularPoints()
|
||||
cout << "=======================" << endl;
|
||||
cout << endl;
|
||||
#endif
|
||||
|
||||
vtkm::Id nActiveVertices = activeVertices.GetNumberOfValues();
|
||||
|
||||
RegularPointTransferrer<T> regularPointTransferrer(isJoinGraph);
|
||||
vtkm::worklet::DispatcherMapField<RegularPointTransferrer<T> >
|
||||
regularPointTransferrerDispatcher(regularPointTransferrer);
|
||||
@ -391,9 +390,6 @@ void ChainGraph<T,StorageType,DeviceAdapter>::CompactActiveVertices()
|
||||
typedef vtkm::cont::ArrayHandle<vtkm::Id> IdArrayType;
|
||||
typedef vtkm::cont::ArrayHandlePermutation<IdArrayType, IdArrayType> PermuteIndexType;
|
||||
|
||||
// retrieve the logical number of vertices
|
||||
vtkm::Id nActiveVertices = activeVertices.GetNumberOfValues();
|
||||
|
||||
// create a temporary array the same size
|
||||
vtkm::cont::ArrayHandle<vtkm::Id> newActiveVertices;
|
||||
|
||||
|
@ -82,6 +82,8 @@
|
||||
#ifndef vtkm_worklet_contourtree_edge_peak_comparator_h
|
||||
#define vtkm_worklet_contourtree_edge_peak_comparator_h
|
||||
|
||||
#include <vtkm/cont/ArrayHandle.h>
|
||||
|
||||
namespace vtkm {
|
||||
namespace worklet {
|
||||
namespace contourtree {
|
||||
|
@ -17,17 +17,53 @@
|
||||
// Laboratory (LANL), the U.S. Government retains certain rights in
|
||||
// this software.
|
||||
//============================================================================
|
||||
// Copyright (c) 2016, Los Alamos National Security, LLC
|
||||
// All rights reserved.
|
||||
//
|
||||
// Copyright 2016. Los Alamos National Security, LLC.
|
||||
// This software was produced under U.S. Government contract DE-AC52-06NA25396
|
||||
// for Los Alamos National Laboratory (LANL), which is operated by
|
||||
// Los Alamos National Security, LLC for the U.S. Department of Energy.
|
||||
// The U.S. Government has rights to use, reproduce, and distribute this
|
||||
// software. NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC
|
||||
// MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE
|
||||
// USE OF THIS SOFTWARE. If software is modified to produce derivative works,
|
||||
// such modified software should be clearly marked, so as not to confuse it
|
||||
// with the version available from LANL.
|
||||
//
|
||||
// Additionally, redistribution and use in source and binary forms, with or
|
||||
// without modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of Los Alamos National Security, LLC, Los Alamos
|
||||
// National Laboratory, LANL, the U.S. Government, nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY LOS ALAMOS NATIONAL SECURITY, LLC AND
|
||||
// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL LOS ALAMOS
|
||||
// NATIONAL SECURITY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//============================================================================
|
||||
|
||||
// This code is based on the algorithm presented in the paper:
|
||||
// “Parallel Peak Pruning for Scalable SMP Contour Tree Computation.”
|
||||
// Hamish Carr, Gunther Weber, Christopher Sewell, and James Ahrens.
|
||||
// Proceedings of the IEEE Symposium on Large Data Analysis and Visualization
|
||||
// (LDAV), October 2016, Baltimore, Maryland.
|
||||
|
||||
//=======================================================================================
|
||||
//
|
||||
// Second Attempt to Compute Contour Tree in Data-Parallel Mode
|
||||
//
|
||||
// Started August 19, 2015
|
||||
//
|
||||
// Copyright Hamish Carr, University of Leeds
|
||||
//
|
||||
// JoinSuperArcFinder.h - functor that searches through the superarcs to assign each vertex
|
||||
//
|
||||
//=======================================================================================
|
||||
//
|
||||
// COMMENTS:
|
||||
|
@ -67,6 +67,7 @@
|
||||
#ifndef vtkm_worklet_contourtree_link_component_case_table_2d_h
|
||||
#define vtkm_worklet_contourtree_link_component_case_table_2d_h
|
||||
|
||||
#include <vtkm/Types.h>
|
||||
#include <vtkm/worklet/contourtree/Mesh2D_DEM_Triangulation_Macros.h>
|
||||
|
||||
namespace vtkm {
|
||||
|
@ -122,6 +122,8 @@
|
||||
//#define DEBUG_FUNCTION_ENTRY 1
|
||||
//#define DEBUG_TIMING 1
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace vtkm {
|
||||
namespace worklet {
|
||||
namespace contourtree {
|
||||
|
@ -171,7 +171,7 @@ Mesh2D_DEM_Triangulation<T,StorageType,DeviceAdapter>::Mesh2D_DEM_Triangulation(
|
||||
|
||||
// compute the number of log-jumping steps (i.e. lg_2 (nVertices))
|
||||
nLogSteps = 1;
|
||||
for (signed long shifter = nVertices; shifter > 0; shifter >>= 1)
|
||||
for (vtkm::Id shifter = nVertices; shifter > 0; shifter >>= 1)
|
||||
nLogSteps++;
|
||||
}
|
||||
|
||||
|
@ -159,7 +159,7 @@ Mesh3D_DEM_Triangulation<T,StorageType,DeviceAdapter>::Mesh3D_DEM_Triangulation(
|
||||
|
||||
// compute the number of log-jumping steps (i.e. lg_2 (nVertices))
|
||||
nLogSteps = 1;
|
||||
for (signed long shifter = nVertices; shifter > 0; shifter >>= 1)
|
||||
for (vtkm::Id shifter = nVertices; shifter > 0; shifter >>= 1)
|
||||
nLogSteps++;
|
||||
|
||||
linkComponentCaseTable3D =
|
||||
|
@ -72,8 +72,15 @@
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
|
||||
#include <vtkm/Types.h>
|
||||
#include <vtkm/cont/ArrayHandle.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace vtkm {
|
||||
namespace worklet {
|
||||
namespace contourtree {
|
||||
|
||||
// debug value for number of columns to print
|
||||
vtkm::Id printCols = 10;
|
||||
|
||||
@ -227,4 +234,8 @@ void printLabelledBlock(string label, const vtkm::cont::ArrayHandle<T, StorageTy
|
||||
cout << endl;
|
||||
} // printLabelledBlock()
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -79,6 +79,8 @@
|
||||
#ifndef vtkm_worklet_contourtree_vertex_merge_comparator_h
|
||||
#define vtkm_worklet_contourtree_vertex_merge_comparator_h
|
||||
|
||||
#include <vtkm/cont/ArrayHandle.h>
|
||||
|
||||
namespace vtkm {
|
||||
namespace worklet {
|
||||
namespace contourtree {
|
||||
@ -103,14 +105,14 @@ public:
|
||||
IdPortalType extrema;
|
||||
bool isJoinTree;
|
||||
|
||||
VTKM_CONT
|
||||
VTKM_EXEC_CONT
|
||||
VertexMergeComparator(ValuePortalType Values,
|
||||
IdPortalType Extrema,
|
||||
bool IsJoinTree)
|
||||
: values(Values), extrema(Extrema), isJoinTree(IsJoinTree)
|
||||
{}
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
VTKM_EXEC
|
||||
bool operator() (const vtkm::Id& i, const vtkm::Id& j) const
|
||||
{
|
||||
// retrieve the pseudo-extremum the vertex belongs to
|
||||
|
@ -79,6 +79,9 @@
|
||||
#ifndef vtkm_worklet_contourtree_vertex_value_comparator_h
|
||||
#define vtkm_worklet_contourtree_vertex_value_comparator_h
|
||||
|
||||
#include <vtkm/Types.h>
|
||||
#include <vtkm/internal/ExportMacros.h>
|
||||
|
||||
namespace vtkm {
|
||||
namespace worklet {
|
||||
namespace contourtree {
|
||||
@ -89,10 +92,10 @@ class VertexValueComparator
|
||||
public:
|
||||
const InFieldPortalType& values;
|
||||
|
||||
VTKM_CONT
|
||||
VTKM_EXEC_CONT
|
||||
VertexValueComparator(const InFieldPortalType& Values) : values(Values) {}
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
VTKM_EXEC
|
||||
bool operator () (const vtkm::Id &i, const vtkm::Id &j, bool ascending)
|
||||
{
|
||||
if (values.Get(i) < values.Get(j))
|
||||
|
Loading…
Reference in New Issue
Block a user