Fix errors and warnings caused by recent changes to device adapter tag logic

This commit is contained in:
Sujin Philip 2015-11-02 16:22:35 -05:00
parent 5c886b1927
commit fd244c4142
6 changed files with 36 additions and 20 deletions

@ -26,6 +26,7 @@
#include <vtkm/cont/cuda/DeviceAdapterCuda.h>
#include <vtkm/cont/tbb/DeviceAdapterTBB.h>
#include <vtkm/cont/DeviceAdapterSerial.h>
struct GenerateSurfaceWorklet : public vtkm::worklet::WorkletMapField
{

@ -18,6 +18,10 @@
// this software.
//============================================================================
#ifndef VTKM_DEVICE_ADAPTER
#define VTKM_DEVICE_ADAPTER VTKM_DEVICE_ADAPTER_SERIAL
#endif
#include <vtkm/worklet/TetrahedralizeExplicitGrid.h>
#include <vtkm/worklet/DispatcherMapField.h>
#include <vtkm/Math.h>
@ -135,7 +139,7 @@ vtkm::cont::DataSet MakeTetrahedralizeExplicitDataSet()
return dataSet;
}
//
//
// Functor to retrieve vertex locations from the CoordinateSystem
// Actually need a static cast to ArrayHandle from DynamicArrayHandleCoordinateSystem
// but haven't been able to figure out what that is
@ -210,14 +214,14 @@ void displayCall()
qrot.getRotMat(rotationMatrix);
glMultMatrixf(rotationMatrix);
glTranslatef(-0.5f, -0.5f, -0.5f);
// Get cell set and the number of cells and vertices
vtkm::cont::CellSetSingleType<> cellSet =
vtkm::cont::CellSetSingleType<> cellSet =
outDataSet.GetCellSet(0).CastTo<vtkm::cont::CellSetSingleType<> >();
vtkm::Id numberOfCells = cellSet.GetNumberOfCells();
// Get the coordinate system and coordinate data
const vtkm::cont::DynamicArrayHandleCoordinateSystem coordArray =
const vtkm::cont::DynamicArrayHandleCoordinateSystem coordArray =
outDataSet.GetCoordinateSystem(0).GetData();
// Need the actual vertex points from a static cast of the dynamic array but can't get it right
@ -312,7 +316,7 @@ void mouseCall(int button, int state, int x, int y)
int main(int argc, char* argv[])
{
std::cout << "TetrahedralizeExplicitGrid Example" << std::endl;
// Create the input explicit cell set
vtkm::cont::DataSet inDataSet = MakeTetrahedralizeExplicitDataSet();
vtkm::cont::CellSetExplicit<> &inCellSet =

@ -18,6 +18,10 @@
// this software.
//============================================================================
#ifndef VTKM_DEVICE_ADAPTER
#define VTKM_DEVICE_ADAPTER VTKM_DEVICE_ADAPTER_SERIAL
#endif
#include <vtkm/worklet/TetrahedralizeUniformGrid.h>
#include <vtkm/worklet/DispatcherMapField.h>
#include <vtkm/Math.h>
@ -87,7 +91,7 @@ vtkm::cont::DataSet MakeTetrahedralizeTestDataSet(vtkm::Id3 dim)
return dataSet;
}
//
//
// Functor to retrieve vertex locations from the CoordinateSystem
// Actually need a static cast to ArrayHandle from DynamicArrayHandleCoordinateSystem
// but haven't been able to figure out what that is
@ -163,10 +167,10 @@ void displayCall()
qrot.getRotMat(rotationMatrix);
glMultMatrixf(rotationMatrix);
glTranslatef(-0.5f, -0.5f, -0.5f);
// Get the cell set, coordinate system and coordinate data
vtkm::cont::CellSetSingleType<> &cellSet = tetDataSet.GetCellSet(0).CastTo<vtkm::cont::CellSetSingleType<> >();
const vtkm::cont::DynamicArrayHandleCoordinateSystem &coordArray =
const vtkm::cont::DynamicArrayHandleCoordinateSystem &coordArray =
tetDataSet.GetCoordinateSystem(0).GetData();
// Need the actual vertex points from a static cast of the dynamic array but can't get it right
@ -271,7 +275,7 @@ int main(int argc, char* argv[])
{
std::cout << "TetrahedralizeUniformGrid Example" << std::endl;
std::cout << "Parameters are [xdim ydim zdim [# of cellsToDisplay]]" << std::endl << std::endl;
// Set the problem size and number of cells to display from command line
if (argc >= 4)
{

@ -18,6 +18,10 @@
// this software.
//============================================================================
#ifndef VTKM_DEVICE_ADAPTER
#define VTKM_DEVICE_ADAPTER VTKM_DEVICE_ADAPTER_SERIAL
#endif
#include <vtkm/worklet/TetrahedralizeExplicitGrid.h>
#include <vtkm/cont/CellSetExplicit.h>
#include <vtkm/cont/DataSet.h>
@ -140,7 +144,7 @@ vtkm::cont::DataSet MakeTriangulateExplicitDataSet()
return dataSet;
}
//
//
// Functor to retrieve vertex locations from the CoordinateSystem
// Actually need a static cast to ArrayHandle from DynamicArrayHandleCoordinateSystem
// but haven't been able to figure out what that is
@ -187,12 +191,12 @@ void displayCall()
glLineWidth(3.0f);
// Get cell set and the number of cells and vertices
vtkm::cont::CellSetSingleType<> cellSet =
vtkm::cont::CellSetSingleType<> cellSet =
outDataSet.GetCellSet(0).CastTo<vtkm::cont::CellSetSingleType<> >();
vtkm::Id numberOfCells = cellSet.GetNumberOfCells();
// Get the coordinate system and coordinate data
const vtkm::cont::DynamicArrayHandleCoordinateSystem coordArray =
const vtkm::cont::DynamicArrayHandleCoordinateSystem coordArray =
outDataSet.GetCoordinateSystem(0).GetData();
// Need the actual vertex points from a static cast of the dynamic array but can't get it right
@ -236,7 +240,7 @@ void displayCall()
int main(int argc, char* argv[])
{
std::cout << "TrianguleExplicitGrid Example" << std::endl;
// Create the input uniform cell set
vtkm::cont::DataSet inDataSet = MakeTriangulateExplicitDataSet();
vtkm::cont::CellSetExplicit<> &inCellSet =

@ -18,6 +18,10 @@
// this software.
//============================================================================
#ifndef VTKM_DEVICE_ADAPTER
#define VTKM_DEVICE_ADAPTER VTKM_DEVICE_ADAPTER_SERIAL
#endif
#include <vtkm/worklet/TetrahedralizeUniformGrid.h>
#include <vtkm/worklet/DispatcherMapField.h>
#include <vtkm/Math.h>
@ -80,7 +84,7 @@ vtkm::cont::DataSet MakeTriangulateTestDataSet(vtkm::Id2 dim)
return dataSet;
}
//
//
// Functor to retrieve vertex locations from the CoordinateSystem
// Actually need a static cast to ArrayHandle from DynamicArrayHandleCoordinateSystem
// but haven't been able to figure out what that is
@ -128,7 +132,7 @@ void displayCall()
// Get the cellset, coordinate system and coordinate data
vtkm::cont::CellSetSingleType<> &cellSet = tetDataSet.GetCellSet(0).CastTo<vtkm::cont::CellSetSingleType<> >();
const vtkm::cont::DynamicArrayHandleCoordinateSystem &coordArray =
const vtkm::cont::DynamicArrayHandleCoordinateSystem &coordArray =
tetDataSet.GetCoordinateSystem(0).GetData();
// Need the actual vertex points from a static cast of the dynamic array but can't get it right
@ -181,7 +185,7 @@ int main(int argc, char* argv[])
{
std::cout << "TrianguleUniformGrid Example" << std::endl;
std::cout << "Parameters are [xdim ydim [# of cellsToDisplay]]" << std::endl << std::endl;
// Set the problem size and number of cells to display from command line
if (argc >= 3)
{

@ -18,12 +18,11 @@
// Laboratory (LANL), the U.S. Government retains certain rights in
// this software.
//============================================================================
#ifndef vtk_m_cont_cuda_internal_DeviceAdapterThrust_h
#define vtk_m_cont_cuda_internal_DeviceAdapterThrust_h
#ifndef vtk_m_cont_cuda_internal_DeviceAdapterAlgorithmThrust_h
#define vtk_m_cont_cuda_internal_DeviceAdapterAlgorithmThrust_h
#include <vtkm/cont/ArrayHandle.h>
#include <vtkm/cont/ErrorExecution.h>
#include <vtkm/cont/Timer.h>
#include <vtkm/Types.h>
#include <vtkm/TypeTraits.h>
#include <vtkm/UnaryPredicates.h>
@ -1285,4 +1284,4 @@ public:
}
} // namespace vtkm::cont::cuda::internal
#endif //vtk_m_cont_cuda_internal_DeviceAdapterThrust_h
#endif //vtk_m_cont_cuda_internal_DeviceAdapterAlgorithmThrust_h