Commit 03e2e721 authored by Robert Maynard's avatar Robert Maynard Committed by Kitware Robot
Browse files

Merge topic 'correct_ppp2_compile_failures'

a423cf05 TestBuild header paths are shorter to make windows happy.
e49e21ae

 Cleanup more of contourtree_augmented to make windows builders happy
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland's avatarKenneth Moreland <kmorel@sandia.gov>
Merge-request: !1424
parents c597bab5 a423cf05
......@@ -95,6 +95,13 @@ endfunction()
function(vtkm_add_header_build_test name dir_prefix use_cuda)
set(hfiles ${ARGN})
#only attempt to add a test build executable if we have any headers to
#test. this might not happen when everything depends on thrust.
list(LENGTH hfiles num_srcs)
if (${num_srcs} EQUAL 0)
return()
endif()
set(ext "cxx")
if(use_cuda)
set(ext "cu")
......@@ -104,10 +111,9 @@ function(vtkm_add_header_build_test name dir_prefix use_cuda)
foreach (header ${hfiles})
get_source_file_property(cant_be_tested ${header} VTKm_CANT_BE_HEADER_TESTED)
if( NOT cant_be_tested )
get_filename_component(headername ${header} NAME_WE)
get_filename_component(headerextension ${header} EXT)
string(SUBSTRING ${headerextension} 1 -1 headerextension)
set(src ${CMAKE_CURRENT_BINARY_DIR}/TB_${headername}_${headerextension}.${ext})
string(REPLACE "/" "_" headername "${header}")
string(REPLACE "." "_" headername "${headername}")
set(src ${CMAKE_CURRENT_BINARY_DIR}/TB_${headername}.${ext})
#By using file generate we will not trigger CMake execution when
#a header gets touched
......@@ -118,9 +124,10 @@ function(vtkm_add_header_build_test name dir_prefix use_cuda)
//This is used by headers that include thrust to properly define a proper
//device backend / system
#define VTKM_TEST_HEADER_BUILD
#include <${dir_prefix}/${headername}.${headerextension}>
#include <${dir_prefix}/${header}>
int ${headername}_${headerextension}_testbuild_symbol;"
)
list(APPEND srcs ${src})
endif()
endforeach()
......@@ -129,13 +136,6 @@ int ${headername}_${headerextension}_testbuild_symbol;"
PROPERTIES HEADER_FILE_ONLY TRUE
)
#only attempt to add a test build executable if we have any headers to
#test. this might not happen when everything depends on thrust.
list(LENGTH srcs num_srcs)
if (${num_srcs} EQUAL 0)
return()
endif()
if(TARGET TestBuild_${name})
#If the target already exists just add more sources to it
target_sources(TestBuild_${name} PRIVATE ${srcs})
......@@ -206,6 +206,7 @@ function(vtkm_generate_export_header lib_name)
endfunction(vtkm_generate_export_header)
#-----------------------------------------------------------------------------
function(vtkm_install_headers dir_prefix)
if(NOT VTKm_INSTALL_ONLY_LIBRARIES)
set(hfiles ${ARGN})
......
......@@ -556,7 +556,7 @@ void ActiveGraph::TransferRegularPoints()
// compacts the active vertex list
void ActiveGraph::CompactActiveVertices()
{ // CompactActiveVertices()
typedef vtkm::cont::ArrayHandlePermutation<IdArrayType, IdArrayType> PermuteIndexType;
using PermuteIndexType = vtkm::cont::ArrayHandlePermutation<IdArrayType, IdArrayType>;
// create a temporary array the same size
vtkm::cont::ArrayHandle<vtkm::Id> newActiveVertices;
......@@ -803,7 +803,7 @@ struct SuperNodeSort
// uses active graph to set superarcs & hyperparents in merge tree
void ActiveGraph::SetSuperArcs(MergeTree& tree)
{ // SetSuperArcs()
typedef vtkm::cont::ArrayHandlePermutation<IdArrayType, IdArrayType> PermutedIdArrayType;
using PermutedIdArrayType = vtkm::cont::ArrayHandlePermutation<IdArrayType, IdArrayType>;
// 1. set the hyperparents
// allocate space for the hyperparents
......@@ -914,7 +914,7 @@ struct SuperArcSort
// uses active graph to set arcs in merge tree
void ActiveGraph::SetArcs(MergeTree& tree, MeshExtrema& meshExtrema)
{ // SetArcs()
typedef vtkm::cont::ArrayHandlePermutation<IdArrayType, IdArrayType> PermuteIndexType;
using PermuteIndexType = vtkm::cont::ArrayHandlePermutation<IdArrayType, IdArrayType>;
// reference to the correct array in the extrema
const IdArrayType& extrema = isJoinGraph ? meshExtrema.peaks : meshExtrema.pits;
......
......@@ -89,9 +89,9 @@ void permuteArray(vtkm::cont::DeviceAdapterId device,
IdArrayType& permute,
ArrayType& output)
{ // permuteValues()
typedef vtkm::cont::ArrayHandleTransform<IdArrayType, MaskedIndexFunctor<ValueType>>
transform_type;
typedef vtkm::cont::ArrayHandlePermutation<transform_type, ArrayType> permute_type;
using transform_type =
vtkm::cont::ArrayHandleTransform<IdArrayType, MaskedIndexFunctor<ValueType>>;
using permute_type = vtkm::cont::ArrayHandlePermutation<transform_type, ArrayType>;
// resize the output, i.e., output.resize(permute.size());
vtkm::Id permNumValues = permute.GetNumberOfValues();
......
......@@ -869,7 +869,7 @@ void ContourTreeMaker::CompressActiveSupernodes()
void ContourTreeMaker::FindDegrees()
{ // ContourTreeMaker::FindDegrees()
typedef vtkm::cont::ArrayHandlePermutation<IdArrayType, IdArrayType> PermuteIndexArray;
using PermuteIndexArray = vtkm::cont::ArrayHandlePermutation<IdArrayType, IdArrayType>;
// retrieve the size to register for speed
vtkm::Id nActiveSupernodes = activeSupernodes.GetNumberOfValues();
......
......@@ -95,7 +95,7 @@
//Define namespace alias for the freudenthal types to make the code a bit more readable
namespace mesh_dem_inc_ns = vtkm::worklet::contourtree_augmented::mesh_dem_inc;
namespace mesh_dem_ns = vtkm::worklet::contourtree_augmented::mesh_dem;
namespace vtkm
{
......@@ -149,7 +149,7 @@ public:
vtkm::Id nRows, nCols;
// Maximum outdegree
static const int MAX_OUTDEGREE = 3;
static constexpr int MAX_OUTDEGREE = 3;
// empty constructor
Mesh_DEM_Triangulation_2D()
......@@ -188,7 +188,7 @@ public:
vtkm::Id nRows, nCols, nSlices;
// Maximum outdegree
static const int MAX_OUTDEGREE = 6; // True for Freudenthal and Marching Cubes
static constexpr int MAX_OUTDEGREE = 6; // True for Freudenthal and Marching Cubes
// empty constructor
Mesh_DEM_Triangulation_3D()
......@@ -237,7 +237,7 @@ struct SortBySimplicityIndex
nVertices); // create linear sequence of numbers 0, 1, .. nVertices
vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>::Copy(initVertexIds, sortOrder);
mesh_dem_inc::SimulatedSimplicityIndexComparator<T, S, DeviceAdapter> valueComparator(
mesh_dem::SimulatedSimplicityIndexComparator<T, S, DeviceAdapter> valueComparator(
values.PrepareForInput(device));
vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>::Sort(sortOrder, valueComparator);
return true;
......@@ -252,7 +252,7 @@ void Mesh_DEM_Triangulation<T, StorageType>::SortData(
const vtkm::cont::ArrayHandle<T, StorageType>& values)
{
// Define namespace alias for mesh dem worklets
namespace mesh_dem_worklets = vtkm::worklet::contourtree_augmented::mesh_dem_inc;
namespace mesh_dem_worklets = vtkm::worklet::contourtree_augmented::mesh_dem;
// Make sure that the values have the correct size
assert(values.GetNumberOfValues() == nVertices);
......
......@@ -85,7 +85,7 @@ class PointerDoubling : public vtkm::worklet::WorkletMapField
public:
typedef void ControlSignature(FieldIn<IdType> vertexID, WholeArrayInOut<IdType> chains);
typedef void ExecutionSignature(_1, _2);
typedef _1 InputDomain;
using InputDomain = _1;
// Constructor
VTKM_EXEC_CONT
......
......@@ -491,7 +491,7 @@ void ProcessContourTree::ComputeVolumeBranchDecomposition(
IdArrayType& branchSaddle,
IdArrayType& branchParent)
{ // ComputeVolumeBranchDecomposition()
typedef typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter> DeviceAlgorithm;
using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
auto superarcsPortal = contourTree.superarcs.GetPortalConstControl();
auto superarcDependentWeightPortal = superarcDependentWeight.GetPortalConstControl();
......
......@@ -85,11 +85,10 @@ constexpr vtkm::Id INDEX_MASK = std::numeric_limits<vtkm::Id>::max() / 16; //0x0
constexpr vtkm::Id CV_OTHER_FLAG = std::numeric_limits<vtkm::Id>::max() / 8 + 1; //0x10000000 || 0x1000000000000000
// clang-format on
typedef vtkm::cont::ArrayHandle<vtkm::Id> IdArrayType;
using IdArrayType = vtkm::cont::ArrayHandle<vtkm::Id>;
typedef typename vtkm::Pair<vtkm::Id, vtkm::Id>
EdgePair; // here EdgePair.first=low and EdgePair.second=high
typedef typename vtkm::cont::ArrayHandle<EdgePair> EdgePairArray; // Array of edge pairs
using EdgePair = vtkm::Pair<vtkm::Id, vtkm::Id>; // here EdgePair.first=low and EdgePair.second=high
using EdgePairArray = vtkm::cont::ArrayHandle<EdgePair>; // Array of edge pairs
// inline functions for retrieving flags or index
VTKM_EXEC_CONT
......
......@@ -82,7 +82,7 @@ public:
typedef void ControlSignature(FieldIn<IdType> activeVertices, // (input) activeVertices
WholeArrayInOut<IdType> hyperacrcs); // (input/output) hyperarcs
typedef void ExecutionSignature(_1, InputIndex, _2);
typedef _1 InputDomain;
using InputDomain = _1;
// Default Constructor
VTKM_EXEC_CONT
......
......@@ -83,7 +83,7 @@ public:
typedef void ControlSignature(FieldIn<IdType> activeVertices, // (input) activeVertices
WholeArrayInOut<IdType> hyperacrs); // (input/output) hyperarcs
typedef void ExecutionSignature(_1, InputIndex, _2);
typedef _1 InputDomain;
using InputDomain = _1;
// Default Constructor
VTKM_EXEC_CONT
......
......@@ -89,7 +89,7 @@ public:
WholeArrayInOut<IdType> hyperarcs,
FieldOut<IdType> newOutdegree);
typedef _7 ExecutionSignature(_1, InputIndex, _2, _3, _4, _5, _6);
typedef _1 InputDomain;
using InputDomain = _1;
// Default Constructor
VTKM_EXEC_CONT
......
......@@ -90,7 +90,7 @@ public:
WholeArrayInOut<IdType> outdegree,
WholeArrayInOut<IdType> hyperarcs);
typedef void ExecutionSignature(_1, InputIndex, _2, _3, _4, _5, _6, _7, _8, _9);
typedef _1 InputDomain;
using InputDomain = _1;
// Default Constructor
VTKM_EXEC_CONT
......
......@@ -81,9 +81,8 @@ template <typename DeviceAdapter>
class EdgePeakComparator
{
public:
typedef
typename vtkm::cont::ArrayHandle<vtkm::Id>::template ExecutionTypes<DeviceAdapter>::PortalConst
IdPortalType;
using IdPortalType =
typename vtkm::cont::ArrayHandle<vtkm::Id>::template ExecutionTypes<DeviceAdapter>::PortalConst;
IdPortalType edgeFarPortal;
IdPortalType edgeNearPortal;
......
......@@ -89,7 +89,7 @@ public:
WholeArrayOut<IdType> hyperarcs, // (output) hyperarcs
WholeArrayOut<IdType> outdegree); // (output) outdegree
typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6);
typedef _1 InputDomain;
using InputDomain = _1;
// Default Constructor
VTKM_EXEC_CONT
......
......@@ -89,7 +89,7 @@ public:
WholeArrayOut<IdType> treeSupernodes // (output) supernodes of the tree
); // (input/output) hyperarcs
typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, _7);
typedef _1 InputDomain;
using InputDomain = _1;
// Default Constructor
VTKM_EXEC_CONT
......
......@@ -81,8 +81,8 @@ template <typename DeviceAdapter>
class HyperArcSuperNodeComparator
{
public:
typedef
typename IdArrayType::template ExecutionTypes<DeviceAdapter>::PortalConst IdArrayPortalType;
using IdArrayPortalType =
typename IdArrayType::template ExecutionTypes<DeviceAdapter>::PortalConst;
IdArrayPortalType treeHyperparentsPortal;
IdArrayPortalType graphSuperIDPortal;
......
......@@ -99,7 +99,7 @@ public:
WholeArrayOut<IdType> edgeFar, // (output) edgeFar
WholeArrayOut<IdType> activeEdges); // (output) activeEdges
typedef void ExecutionSignature(_1, InputIndex, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11);
typedef _1 InputDomain;
using InputDomain = _1;
// Default Constructor
VTKM_EXEC_CONT
......
......@@ -91,7 +91,7 @@ public:
WholeArrayOut<IdType> hyperarcs, // (output) hyperacrs
WholeArrayOut<IdType> activeVertices); // (output) activeVertices
typedef void ExecutionSignature(_1, _2, _3, _4, InputIndex, _5, _6, _7, _8, _9);
typedef _1 InputDomain;
using InputDomain = _1;
// Default Constructor
VTKM_EXEC_CONT
......
......@@ -86,7 +86,7 @@ public:
WholeArrayIn<IdType> extrema, // (input) extremum
WholeArrayIn<IdType> activeIndices); // (input) activeIndices
typedef void ExecutionSignature(_1, InputIndex, _2, _3);
typedef _1 InputDomain;
using InputDomain = _1;
// Default Constructor
VTKM_EXEC_CONT
......
......@@ -84,7 +84,7 @@ public:
typedef void ControlSignature(WholeArrayInOut<IdType> hyperarcs, // (input/output) hyperacrs
WholeArrayIn<IdType> activeIndices); // (input) activeIndices
typedef void ExecutionSignature(_1, InputIndex, _2);
typedef _1 InputDomain;
using InputDomain = _1;
// Default Constructor
VTKM_EXEC_CONT
......
Supports Markdown
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