mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-05 01:49:02 +00:00
Compile more sources without device compiler
We have been doing a better job at hiding device code (and moving code into libraries). Smoke out source that no longer needs to be compiled by device compilers.
This commit is contained in:
parent
385ea820be
commit
a2ab460f5d
@ -141,12 +141,28 @@ set(sources
|
||||
ArrayHandleSOA.cxx
|
||||
ArrayHandleStride.cxx
|
||||
ArrayHandleUniformPointCoordinates.cxx
|
||||
AssignerPartitionedDataSet.cxx
|
||||
BitField.cxx
|
||||
BoundsCompute.cxx
|
||||
BoundsGlobalCompute.cxx
|
||||
CellLocatorGeneral.cxx
|
||||
CellLocatorRectilinearGrid.cxx
|
||||
CellLocatorUniformGrid.cxx
|
||||
CellSet.cxx
|
||||
CellSetStructured.cxx
|
||||
ColorTablePresets.cxx
|
||||
CoordinateSystem.cxx
|
||||
DataSet.cxx
|
||||
DataSetBuilderCurvilinear.cxx
|
||||
DataSetBuilderExplicit.cxx
|
||||
DataSetBuilderRectilinear.cxx
|
||||
DataSetBuilderUniform.cxx
|
||||
DeviceAdapterTag.cxx
|
||||
EnvironmentTracker.cxx
|
||||
ErrorBadDevice.cxx
|
||||
ErrorBadType.cxx
|
||||
FieldRangeCompute.cxx
|
||||
FieldRangeGlobalCompute.cxx
|
||||
internal/Buffer.cxx
|
||||
internal/DeviceAdapterMemoryManager.cxx
|
||||
internal/DeviceAdapterMemoryManagerShared.cxx
|
||||
@ -156,9 +172,11 @@ set(sources
|
||||
Initialize.cxx
|
||||
Logging.cxx
|
||||
RuntimeDeviceTracker.cxx
|
||||
PartitionedDataSet.cxx
|
||||
Storage.cxx
|
||||
Token.cxx
|
||||
TryExecute.cxx
|
||||
UnknownArrayHandle.cxx
|
||||
UnknownCellSet.cxx
|
||||
)
|
||||
|
||||
@ -168,35 +186,17 @@ set(device_sources
|
||||
ArrayCopy.cxx
|
||||
ArrayGetValues.cxx
|
||||
ArrayRangeCompute.cxx
|
||||
AssignerPartitionedDataSet.cxx
|
||||
BoundsCompute.cxx
|
||||
BoundsGlobalCompute.cxx
|
||||
CellLocatorBoundingIntervalHierarchy.cxx
|
||||
CellLocatorGeneral.cxx
|
||||
CellLocatorRectilinearGrid.cxx
|
||||
CellLocatorTwoLevel.cxx
|
||||
CellLocatorUniformGrid.cxx
|
||||
CellSet.cxx
|
||||
CellSetExplicit.cxx
|
||||
CellSetExtrude.cxx
|
||||
CellSetStructured.cxx
|
||||
ColorTable.cxx
|
||||
ConvertNumComponentsToOffsets.cxx
|
||||
CoordinateSystem.cxx
|
||||
DataSet.cxx
|
||||
DataSetBuilderCurvilinear.cxx
|
||||
DataSetBuilderExplicit.cxx
|
||||
DataSetBuilderRectilinear.cxx
|
||||
DataSetBuilderUniform.cxx
|
||||
Field.cxx
|
||||
FieldRangeCompute.cxx
|
||||
FieldRangeGlobalCompute.cxx
|
||||
MergePartitionedDataSet.cxx
|
||||
PartitionedDataSet.cxx
|
||||
PointLocatorSparseGrid.cxx
|
||||
RuntimeDeviceInformation.cxx
|
||||
Timer.cxx
|
||||
UnknownArrayHandle.cxx
|
||||
)
|
||||
|
||||
if (NOT VTKm_NO_DEPRECATED_VIRTUAL)
|
||||
|
@ -27,6 +27,8 @@
|
||||
#include <vtkm/worklet/WorkletMapField.h>
|
||||
#include <vtkm/worklet/WorkletMapTopology.h>
|
||||
|
||||
#include <vtkm/worklet/spatialstructure/BoundingIntervalHierarchy.h>
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
namespace cont
|
||||
|
@ -22,8 +22,6 @@
|
||||
#include <vtkm/exec/CellLocatorBoundingIntervalHierarchy.h>
|
||||
#include <vtkm/exec/CellLocatorMultiplexer.h>
|
||||
|
||||
#include <vtkm/worklet/spatialstructure/BoundingIntervalHierarchy.h>
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
namespace cont
|
||||
|
@ -8,7 +8,6 @@
|
||||
// PURPOSE. See the above copyright notice for more information.
|
||||
//============================================================================
|
||||
|
||||
#include <vtkm/cont/Algorithm.h>
|
||||
#include <vtkm/cont/ArrayHandleUniformPointCoordinates.h>
|
||||
#include <vtkm/cont/CellLocatorUniformGrid.h>
|
||||
#include <vtkm/cont/CellSetStructured.h>
|
||||
|
@ -14,7 +14,6 @@
|
||||
#include <vtkm/cont/ColorTable.h>
|
||||
#include <vtkm/cont/ColorTableMap.h>
|
||||
#include <vtkm/cont/ErrorBadType.h>
|
||||
#include <vtkm/cont/TryExecute.h>
|
||||
|
||||
|
||||
namespace
|
||||
|
@ -14,7 +14,6 @@
|
||||
#include <vtkm/cont/ArrayHandleTransform.h>
|
||||
#include <vtkm/cont/ColorTable.h>
|
||||
#include <vtkm/cont/ColorTableSamples.h>
|
||||
#include <vtkm/cont/TryExecute.h>
|
||||
|
||||
#include <vtkm/cont/Invoker.h>
|
||||
#include <vtkm/worklet/colorconversion/LookupTable.h>
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
#include <vtkm/cont/ArrayHandle.h>
|
||||
#include <vtkm/cont/CoordinateSystem.h>
|
||||
#include <vtkm/cont/DeviceAdapterAlgorithm.h>
|
||||
#include <vtkm/cont/DynamicCellSet.h>
|
||||
#include <vtkm/cont/ErrorBadValue.h>
|
||||
#include <vtkm/cont/Field.h>
|
||||
|
@ -9,7 +9,9 @@
|
||||
//============================================================================
|
||||
#include <vtkm/cont/FieldRangeCompute.h>
|
||||
|
||||
#include <vtkm/cont/Algorithm.h>
|
||||
#include <algorithm>
|
||||
#include <numeric>
|
||||
#include <vector>
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
|
@ -9,10 +9,8 @@
|
||||
//============================================================================
|
||||
|
||||
#include <vtkm/StaticAssert.h>
|
||||
#include <vtkm/cont/ArrayCopy.h>
|
||||
#include <vtkm/cont/ArrayHandle.h>
|
||||
#include <vtkm/cont/DataSet.h>
|
||||
#include <vtkm/cont/DeviceAdapterAlgorithm.h>
|
||||
#include <vtkm/cont/EnvironmentTracker.h>
|
||||
#include <vtkm/cont/ErrorBadValue.h>
|
||||
#include <vtkm/cont/Field.h>
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
#include <vtkm/cont/ArrayHandle.h>
|
||||
#include <vtkm/cont/DataSet.h>
|
||||
#include <vtkm/cont/DeviceAdapterAlgorithm.h>
|
||||
#include <vtkm/cont/Field.h>
|
||||
|
||||
namespace vtkm
|
||||
|
@ -19,6 +19,12 @@
|
||||
//============================================================================
|
||||
#include <vtkm/cont/PointLocatorSparseGrid.h>
|
||||
|
||||
#include <vtkm/cont/Algorithm.h>
|
||||
#include <vtkm/cont/ArrayCopy.h>
|
||||
#include <vtkm/cont/ArrayHandleCounting.h>
|
||||
#include <vtkm/cont/Invoker.h>
|
||||
#include <vtkm/worklet/WorkletMapField.h>
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
namespace cont
|
||||
@ -85,8 +91,8 @@ void PointLocatorSparseGrid::Build()
|
||||
// bin points into cells and give each of them the cell id.
|
||||
vtkm::cont::ArrayHandle<vtkm::Id> cellIds;
|
||||
BinPointsWorklet cellIdWorklet(rmin, rmax, this->Dims);
|
||||
vtkm::worklet::DispatcherMapField<BinPointsWorklet> dispatchCellId(cellIdWorklet);
|
||||
dispatchCellId.Invoke(this->GetCoordinates(), cellIds);
|
||||
vtkm::cont::Invoker invoke;
|
||||
invoke(cellIdWorklet, this->GetCoordinates(), cellIds);
|
||||
|
||||
// Group points of the same cell together by sorting them according to the cell ids
|
||||
vtkm::cont::Algorithm::SortByKey(cellIds, this->PointIds);
|
||||
|
@ -10,12 +10,6 @@
|
||||
#ifndef vtk_m_cont_PointLocatorSparseGrid_h
|
||||
#define vtk_m_cont_PointLocatorSparseGrid_h
|
||||
|
||||
#include <vtkm/cont/Algorithm.h>
|
||||
#include <vtkm/cont/ArrayCopy.h>
|
||||
#include <vtkm/cont/ArrayHandleCounting.h>
|
||||
#include <vtkm/worklet/DispatcherMapField.h>
|
||||
#include <vtkm/worklet/WorkletMapField.h>
|
||||
|
||||
#include <vtkm/cont/internal/PointLocatorBase.h>
|
||||
#include <vtkm/exec/PointLocatorSparseGrid.h>
|
||||
|
||||
|
@ -104,7 +104,6 @@ set(library_sources
|
||||
)
|
||||
|
||||
set(library_sources_device
|
||||
TestEqualArrayHandles.cxx # Really doesn't need device, but currently includes device headers
|
||||
)
|
||||
|
||||
vtkm_library(
|
||||
|
@ -17,6 +17,8 @@
|
||||
|
||||
#include <vtkm/cont/PointLocatorSparseGrid.h>
|
||||
|
||||
#include <vtkm/worklet/WorkletMapField.h>
|
||||
|
||||
////brute force method /////
|
||||
template <typename CoordiVecT, typename CoordiPortalT, typename CoordiT>
|
||||
VTKM_EXEC_CONT vtkm::Id NNSVerify3D(CoordiVecT qc, CoordiPortalT coordiPortal, CoordiT& dis2)
|
||||
@ -91,7 +93,6 @@ template <typename DeviceAdapter>
|
||||
class TestingPointLocatorSparseGrid
|
||||
{
|
||||
public:
|
||||
using Algorithm = vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
|
||||
void TestTest() const
|
||||
{
|
||||
vtkm::Int32 nTrainingPoints = 5;
|
||||
|
@ -11,8 +11,6 @@
|
||||
#define vtk_m_exec_PointLocatorSparseGrid_h
|
||||
|
||||
#include <vtkm/cont/CoordinateSystem.h>
|
||||
#include <vtkm/worklet/DispatcherMapField.h>
|
||||
#include <vtkm/worklet/WorkletMapField.h>
|
||||
|
||||
#include <vtkm/Deprecated.h>
|
||||
#include <vtkm/VectorAnalysis.h>
|
||||
|
@ -19,6 +19,8 @@
|
||||
#include <vtkm/io/ImageWriterPNG.h>
|
||||
#include <vtkm/io/ImageWriterPNM.h>
|
||||
|
||||
#include <vtkm/cont/ErrorBadValue.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace vtkm
|
||||
@ -48,7 +50,7 @@ vtkm::cont::DataSet ReadImageFile(const std::string& fullPath, const std::string
|
||||
std::ifstream check(fullPath.c_str());
|
||||
if (!check.good())
|
||||
{
|
||||
throw vtkm::cont::ErrorExecution("File does not exist: " + fullPath);
|
||||
throw vtkm::cont::ErrorBadValue("File does not exist: " + fullPath);
|
||||
}
|
||||
|
||||
std::unique_ptr<vtkm::io::ImageReaderBase> reader;
|
||||
|
@ -31,4 +31,4 @@ if(VTKm_ENABLE_RENDERING)
|
||||
list(APPEND unit_test_libraries vtkm_rendering)
|
||||
endif()
|
||||
|
||||
vtkm_unit_tests(SOURCES ${unit_tests} ALL_BACKENDS LIBRARIES ${unit_test_libraries})
|
||||
vtkm_unit_tests(SOURCES ${unit_tests} LIBRARIES ${unit_test_libraries})
|
||||
|
@ -65,31 +65,43 @@ set(headers
|
||||
)
|
||||
|
||||
set(sources
|
||||
Actor.cxx
|
||||
AxisAnnotation.cxx
|
||||
AxisAnnotation2D.cxx
|
||||
AxisAnnotation3D.cxx
|
||||
BitmapFont.cxx
|
||||
BitmapFontFactory.cxx
|
||||
|
||||
BoundingBoxAnnotation.cxx
|
||||
Camera.cxx
|
||||
Color.cxx
|
||||
ColorBarAnnotation.cxx
|
||||
ColorLegendAnnotation.cxx
|
||||
LineRenderer.cxx
|
||||
Mapper.cxx
|
||||
MapperConnectivity.cxx
|
||||
Scene.cxx
|
||||
TextAnnotation.cxx
|
||||
TextAnnotationBillboard.cxx
|
||||
TextAnnotationScreen.cxx
|
||||
TextRenderer.cxx
|
||||
View.cxx
|
||||
View1D.cxx
|
||||
View2D.cxx
|
||||
View3D.cxx
|
||||
WorldAnnotator.cxx
|
||||
|
||||
raytracing/Logger.cxx
|
||||
raytracing/MeshConnectivityContainers.cxx
|
||||
raytracing/TriangleExtractor.cxx
|
||||
)
|
||||
|
||||
# This list of sources has code that uses devices and so might need to be
|
||||
# compiled with a device-specific compiler (like CUDA).
|
||||
set(device_sources
|
||||
Actor.cxx
|
||||
AxisAnnotation.cxx
|
||||
AxisAnnotation2D.cxx
|
||||
AxisAnnotation3D.cxx
|
||||
BoundingBoxAnnotation.cxx
|
||||
Canvas.cxx
|
||||
CanvasRayTracer.cxx
|
||||
ColorBarAnnotation.cxx
|
||||
ColorLegendAnnotation.cxx
|
||||
ConnectivityProxy.cxx
|
||||
LineRenderer.cxx
|
||||
LineRendererBatcher.cxx
|
||||
Mapper.cxx
|
||||
MapperConnectivity.cxx
|
||||
MapperCylinder.cxx
|
||||
MapperPoint.cxx
|
||||
MapperQuad.cxx
|
||||
@ -97,19 +109,10 @@ set(device_sources
|
||||
MapperVolume.cxx
|
||||
MapperWireframer.cxx
|
||||
ScalarRenderer.cxx
|
||||
Scene.cxx
|
||||
TextAnnotation.cxx
|
||||
TextAnnotationBillboard.cxx
|
||||
TextAnnotationScreen.cxx
|
||||
TextRenderer.cxx
|
||||
TextRendererBatcher.cxx
|
||||
View.cxx
|
||||
View1D.cxx
|
||||
View2D.cxx
|
||||
View3D.cxx
|
||||
WorldAnnotator.cxx
|
||||
|
||||
internal/RunTriangulator.cxx
|
||||
|
||||
raytracing/BoundingVolumeHierarchy.cxx
|
||||
raytracing/Camera.cxx
|
||||
raytracing/ChannelBuffer.cxx
|
||||
@ -117,16 +120,14 @@ set(device_sources
|
||||
raytracing/CylinderExtractor.cxx
|
||||
raytracing/CylinderIntersector.cxx
|
||||
raytracing/MeshConnectivityBuilder.cxx
|
||||
raytracing/MeshConnectivityContainers.cxx
|
||||
raytracing/QuadExtractor.cxx
|
||||
raytracing/QuadIntersector.cxx
|
||||
raytracing/RayTracer.cxx
|
||||
raytracing/RayOperations.cxx
|
||||
raytracing/RayTracer.cxx
|
||||
raytracing/ScalarRenderer.cxx
|
||||
raytracing/ShapeIntersector.cxx
|
||||
raytracing/SphereExtractor.cxx
|
||||
raytracing/SphereIntersector.cxx
|
||||
raytracing/TriangleExtractor.cxx
|
||||
raytracing/TriangleIntersector.cxx
|
||||
raytracing/VolumeRendererStructured.cxx
|
||||
)
|
||||
|
@ -13,8 +13,6 @@
|
||||
#include <vtkm/Transform3D.h>
|
||||
#include <vtkm/cont/TryExecute.h>
|
||||
#include <vtkm/rendering/LineRendererBatcher.h>
|
||||
#include <vtkm/worklet/DispatcherMapField.h>
|
||||
#include <vtkm/worklet/WorkletMapField.h>
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
|
@ -13,8 +13,6 @@
|
||||
#include <vtkm/Transform3D.h>
|
||||
#include <vtkm/cont/TryExecute.h>
|
||||
#include <vtkm/rendering/TextRendererBatcher.h>
|
||||
#include <vtkm/worklet/DispatcherMapField.h>
|
||||
#include <vtkm/worklet/WorkletMapField.h>
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
|
@ -11,7 +11,6 @@
|
||||
#ifndef vtk_m_rendering_Texture2D_h
|
||||
#define vtk_m_rendering_Texture2D_h
|
||||
|
||||
#include <vtkm/cont/Algorithm.h>
|
||||
#include <vtkm/cont/ArrayHandle.h>
|
||||
#include <vtkm/cont/ExecutionObjectBase.h>
|
||||
|
||||
@ -65,7 +64,7 @@ public:
|
||||
// We do not know the lifetime of the underlying data source of input `data`. Since it might
|
||||
// be from a shallow copy of the data source, we make a deep copy of the input data and keep
|
||||
// it's portal. The copy operation is very fast.
|
||||
vtkm::cont::Algorithm::Copy(data, Data);
|
||||
this->Data.DeepCopyFrom(data);
|
||||
}
|
||||
|
||||
VTKM_CONT
|
||||
|
@ -13,9 +13,7 @@
|
||||
#include <vtkm/cont/ArrayHandle.h>
|
||||
#include <vtkm/cont/ArrayHandleCast.h>
|
||||
#include <vtkm/cont/ArrayHandleCompositeVector.h>
|
||||
#include <vtkm/cont/DeviceAdapter.h>
|
||||
#include <vtkm/rendering/raytracing/ChannelBuffer.h>
|
||||
#include <vtkm/rendering/raytracing/Worklets.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
// PURPOSE. See the above copyright notice for more information.
|
||||
//============================================================================
|
||||
#include <vtkm/rendering/raytracing/ShapeIntersector.h>
|
||||
#include <vtkm/worklet/DispatcherMapField.h>
|
||||
#include <vtkm/worklet/WorkletMapField.h>
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include <vtkm/exec/CellInterpolate.h>
|
||||
#include <vtkm/exec/ParametricCoordinates.h>
|
||||
#include <vtkm/io/VTKDataSetReader.h>
|
||||
#include <vtkm/worklet/WorkletMapField.h>
|
||||
#include <vtkm/worklet/WorkletMapTopology.h>
|
||||
|
||||
namespace
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user