2014-02-10 19:53:03 +00:00
|
|
|
##============================================================================
|
|
|
|
## Copyright (c) Kitware, Inc.
|
|
|
|
## All rights reserved.
|
|
|
|
## See LICENSE.txt for details.
|
2019-04-15 23:24:21 +00:00
|
|
|
##
|
2014-02-10 19:53:03 +00:00
|
|
|
## This software is distributed WITHOUT ANY WARRANTY; without even
|
|
|
|
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
## PURPOSE. See the above copyright notice for more information.
|
|
|
|
##============================================================================
|
|
|
|
|
|
|
|
set(headers
|
2017-11-29 15:44:37 +00:00
|
|
|
Algorithm.h
|
2017-09-25 22:28:44 +00:00
|
|
|
ArrayCopy.h
|
2019-08-20 21:28:19 +00:00
|
|
|
ArrayGetValues.h
|
2014-02-10 19:53:03 +00:00
|
|
|
ArrayHandle.h
|
2020-04-22 19:58:59 +00:00
|
|
|
ArrayHandleBasic.h
|
2019-03-07 21:45:21 +00:00
|
|
|
ArrayHandleBitField.h
|
2015-12-22 17:41:30 +00:00
|
|
|
ArrayHandleCartesianProduct.h
|
2018-12-11 13:56:08 +00:00
|
|
|
ArrayHandleCast.h
|
2014-05-05 15:24:03 +00:00
|
|
|
ArrayHandleCompositeVector.h
|
2018-12-11 13:56:08 +00:00
|
|
|
ArrayHandleConcatenate.h
|
2015-05-13 20:24:51 +00:00
|
|
|
ArrayHandleConstant.h
|
2014-04-03 19:17:14 +00:00
|
|
|
ArrayHandleCounting.h
|
2019-09-06 22:24:27 +00:00
|
|
|
ArrayHandleDecorator.h
|
2017-02-07 17:53:53 +00:00
|
|
|
ArrayHandleDiscard.h
|
2018-12-11 13:56:08 +00:00
|
|
|
ArrayHandleExtractComponent.h
|
2019-06-06 18:43:53 +00:00
|
|
|
ArrayHandleExtrudeCoords.h
|
|
|
|
ArrayHandleExtrudeField.h
|
2015-09-28 23:19:38 +00:00
|
|
|
ArrayHandleGroupVec.h
|
2016-10-28 03:14:29 +00:00
|
|
|
ArrayHandleGroupVecVariable.h
|
2015-02-13 06:24:43 +00:00
|
|
|
ArrayHandleImplicit.h
|
2015-09-15 04:11:09 +00:00
|
|
|
ArrayHandleIndex.h
|
2019-07-15 04:51:28 +00:00
|
|
|
ArrayHandleMultiplexer.h
|
2015-04-24 00:45:24 +00:00
|
|
|
ArrayHandlePermutation.h
|
2017-05-08 17:49:18 +00:00
|
|
|
ArrayHandleReverse.h
|
2020-06-17 21:48:09 +00:00
|
|
|
ArrayHandleRandomStandardNormal.h
|
2020-03-18 22:03:47 +00:00
|
|
|
ArrayHandleRandomUniformBits.h
|
2020-06-02 17:58:57 +00:00
|
|
|
ArrayHandleRandomUniformReal.h
|
2019-08-06 00:15:21 +00:00
|
|
|
ArrayHandleSOA.h
|
2017-07-28 18:55:37 +00:00
|
|
|
ArrayHandleSwizzle.h
|
2015-04-13 20:43:18 +00:00
|
|
|
ArrayHandleTransform.h
|
2014-05-01 23:19:54 +00:00
|
|
|
ArrayHandleUniformPointCoordinates.h
|
2018-08-29 20:54:31 +00:00
|
|
|
ArrayHandleView.h
|
2015-04-23 17:20:03 +00:00
|
|
|
ArrayHandleZip.h
|
2014-02-10 19:53:03 +00:00
|
|
|
ArrayPortal.h
|
2014-09-04 17:56:15 +00:00
|
|
|
ArrayPortalToIterators.h
|
2016-08-05 20:05:32 +00:00
|
|
|
ArrayRangeCompute.h
|
2019-09-02 14:38:47 +00:00
|
|
|
AssignerPartitionedDataSet.h
|
2018-06-07 21:08:02 +00:00
|
|
|
AtomicArray.h
|
2019-03-05 21:47:09 +00:00
|
|
|
BitField.h
|
2018-04-05 21:12:20 +00:00
|
|
|
BoundsCompute.h
|
|
|
|
BoundsGlobalCompute.h
|
2019-04-03 18:15:26 +00:00
|
|
|
CastAndCall.h
|
2018-06-05 03:04:38 +00:00
|
|
|
CellLocator.h
|
2018-07-12 21:34:29 +00:00
|
|
|
CellLocatorBoundingIntervalHierarchy.h
|
2019-03-29 17:28:27 +00:00
|
|
|
CellLocatorGeneral.h
|
2019-01-07 01:18:23 +00:00
|
|
|
CellLocatorRectilinearGrid.h
|
2020-09-21 21:35:30 +00:00
|
|
|
CellLocatorTwoLevel.h
|
2019-03-28 14:00:32 +00:00
|
|
|
CellLocatorUniformBins.h
|
2018-08-29 21:19:31 +00:00
|
|
|
CellLocatorUniformGrid.h
|
2015-05-29 14:49:57 +00:00
|
|
|
CellSet.h
|
|
|
|
CellSetExplicit.h
|
2019-06-06 18:43:53 +00:00
|
|
|
CellSetExtrude.h
|
2019-12-05 21:38:41 +00:00
|
|
|
CellSetList.h
|
2015-07-27 16:13:27 +00:00
|
|
|
CellSetListTag.h
|
2018-12-11 13:56:08 +00:00
|
|
|
CellSetPermutation.h
|
2015-09-28 17:15:26 +00:00
|
|
|
CellSetSingleType.h
|
2015-05-29 14:49:57 +00:00
|
|
|
CellSetStructured.h
|
2018-01-18 18:55:15 +00:00
|
|
|
ColorTable.h
|
2020-09-14 22:39:51 +00:00
|
|
|
ColorTableMap.h
|
2018-01-18 18:55:15 +00:00
|
|
|
ColorTableSamples.h
|
2015-05-29 14:49:57 +00:00
|
|
|
CoordinateSystem.h
|
2015-01-27 22:02:03 +00:00
|
|
|
DataSet.h
|
2015-12-22 17:41:30 +00:00
|
|
|
DataSetBuilderExplicit.h
|
|
|
|
DataSetBuilderRectilinear.h
|
2016-01-19 22:54:05 +00:00
|
|
|
DataSetBuilderUniform.h
|
2015-12-22 17:41:30 +00:00
|
|
|
DataSetFieldAdd.h
|
2014-02-11 17:34:56 +00:00
|
|
|
DeviceAdapter.h
|
2014-11-25 14:14:04 +00:00
|
|
|
DeviceAdapterAlgorithm.h
|
2019-12-05 21:38:41 +00:00
|
|
|
DeviceAdapterList.h
|
2016-08-15 23:15:17 +00:00
|
|
|
DeviceAdapterListTag.h
|
2019-04-03 20:28:31 +00:00
|
|
|
DeviceAdapterTag.h
|
2015-07-27 16:13:27 +00:00
|
|
|
DynamicCellSet.h
|
2017-12-14 01:30:04 +00:00
|
|
|
EnvironmentTracker.h
|
2014-02-10 19:53:03 +00:00
|
|
|
Error.h
|
2017-01-09 21:15:32 +00:00
|
|
|
ErrorBadAllocation.h
|
2017-12-22 15:01:09 +00:00
|
|
|
ErrorBadDevice.h
|
2017-01-09 21:15:32 +00:00
|
|
|
ErrorBadType.h
|
|
|
|
ErrorBadValue.h
|
2014-02-10 19:53:03 +00:00
|
|
|
ErrorExecution.h
|
2018-12-11 13:56:08 +00:00
|
|
|
ErrorFilterExecution.h
|
2017-01-09 21:15:32 +00:00
|
|
|
ErrorInternal.h
|
2018-09-08 17:07:06 +00:00
|
|
|
ExecutionAndControlObjectBase.h
|
2018-05-10 23:53:39 +00:00
|
|
|
ExecutionObjectBase.h
|
2015-05-29 14:49:57 +00:00
|
|
|
Field.h
|
2018-04-05 01:13:44 +00:00
|
|
|
FieldRangeCompute.h
|
|
|
|
FieldRangeGlobalCompute.h
|
2017-10-23 13:38:33 +00:00
|
|
|
ImplicitFunctionHandle.h
|
2018-12-06 18:33:31 +00:00
|
|
|
Initialize.h
|
2019-07-31 17:50:23 +00:00
|
|
|
Invoker.h
|
2018-08-30 17:29:36 +00:00
|
|
|
Logging.h
|
2020-06-18 18:54:18 +00:00
|
|
|
ParticleArrayCopy.h
|
2019-09-02 14:38:47 +00:00
|
|
|
PartitionedDataSet.h
|
2018-06-05 03:04:38 +00:00
|
|
|
PointLocator.h
|
2017-10-19 17:44:36 +00:00
|
|
|
PointLocatorUniformGrid.h
|
2020-09-21 20:49:03 +00:00
|
|
|
PointLocatorSparseGrid.h
|
2015-12-23 19:54:41 +00:00
|
|
|
RuntimeDeviceInformation.h
|
2017-02-22 20:33:52 +00:00
|
|
|
RuntimeDeviceTracker.h
|
2018-06-08 15:56:40 +00:00
|
|
|
Serialization.h
|
2014-06-23 23:33:04 +00:00
|
|
|
Storage.h
|
2019-06-06 18:43:53 +00:00
|
|
|
StorageExtrude.h
|
2019-12-05 21:38:41 +00:00
|
|
|
StorageList.h
|
2014-06-23 23:33:04 +00:00
|
|
|
StorageListTag.h
|
2014-06-10 18:53:34 +00:00
|
|
|
Timer.h
|
2020-01-15 04:47:11 +00:00
|
|
|
Token.h
|
2016-08-15 23:15:17 +00:00
|
|
|
TryExecute.h
|
2019-02-28 18:15:27 +00:00
|
|
|
SerializableTypeString.h
|
2020-08-05 12:42:33 +00:00
|
|
|
UncertainArrayHandle.h
|
2020-08-05 03:16:29 +00:00
|
|
|
UnknownArrayHandle.h
|
2018-12-11 13:56:08 +00:00
|
|
|
VariantArrayHandle.h
|
2017-10-23 13:38:33 +00:00
|
|
|
VirtualObjectHandle.h
|
2014-02-10 19:53:03 +00:00
|
|
|
)
|
|
|
|
|
2017-09-25 12:47:47 +00:00
|
|
|
set(template_sources
|
2016-12-16 22:04:58 +00:00
|
|
|
ArrayHandle.hxx
|
2018-01-10 21:34:56 +00:00
|
|
|
ArrayRangeCompute.hxx
|
2017-08-10 20:13:58 +00:00
|
|
|
CellSetExplicit.hxx
|
2019-06-06 18:43:53 +00:00
|
|
|
CellSetExtrude.hxx
|
2016-12-16 22:04:58 +00:00
|
|
|
CellSetStructured.hxx
|
2018-04-05 01:13:44 +00:00
|
|
|
FieldRangeCompute.hxx
|
|
|
|
FieldRangeGlobalCompute.hxx
|
2020-07-21 01:15:46 +00:00
|
|
|
ParticleArrayCopy.hxx
|
2019-01-29 19:28:19 +00:00
|
|
|
VirtualObjectHandle.hxx
|
2016-12-16 22:04:58 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set(sources
|
|
|
|
ArrayHandle.cxx
|
2020-04-22 19:58:59 +00:00
|
|
|
ArrayHandleBasic.cxx
|
2020-08-26 13:58:59 +00:00
|
|
|
ArrayHandleImplicit.cxx
|
2019-08-06 00:15:21 +00:00
|
|
|
ArrayHandleSOA.cxx
|
2020-08-24 21:26:57 +00:00
|
|
|
BitField.cxx
|
2018-10-30 17:42:10 +00:00
|
|
|
ColorTablePresets.cxx
|
2019-04-17 17:59:49 +00:00
|
|
|
DeviceAdapterTag.cxx
|
2017-12-14 01:30:04 +00:00
|
|
|
EnvironmentTracker.cxx
|
2018-08-08 18:53:28 +00:00
|
|
|
ErrorBadDevice.cxx
|
2018-11-06 16:20:30 +00:00
|
|
|
ErrorBadType.cxx
|
2020-03-26 23:34:18 +00:00
|
|
|
internal/Buffer.cxx
|
|
|
|
internal/DeviceAdapterMemoryManager.cxx
|
|
|
|
internal/DeviceAdapterMemoryManagerShared.cxx
|
2018-11-06 16:20:30 +00:00
|
|
|
internal/TransferInfo.cxx
|
2018-07-18 13:11:10 +00:00
|
|
|
internal/VirtualObjectTransfer.cxx
|
2018-12-06 18:33:31 +00:00
|
|
|
Initialize.cxx
|
2018-08-30 17:29:36 +00:00
|
|
|
Logging.cxx
|
2018-07-19 16:59:34 +00:00
|
|
|
RuntimeDeviceTracker.cxx
|
2020-01-15 04:47:11 +00:00
|
|
|
Token.cxx
|
2018-07-19 16:59:34 +00:00
|
|
|
TryExecute.cxx
|
2016-12-16 22:04:58 +00:00
|
|
|
)
|
|
|
|
|
2019-04-17 17:59:49 +00:00
|
|
|
# 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
|
2017-02-24 00:12:14 +00:00
|
|
|
ArrayRangeCompute.cxx
|
2019-09-02 14:38:47 +00:00
|
|
|
AssignerPartitionedDataSet.cxx
|
2019-03-13 17:58:35 +00:00
|
|
|
BoundsCompute.cxx
|
|
|
|
BoundsGlobalCompute.cxx
|
2019-04-17 17:59:49 +00:00
|
|
|
CellLocator.cxx
|
2019-03-20 21:28:08 +00:00
|
|
|
CellLocatorBoundingIntervalHierarchy.cxx
|
2019-03-29 17:28:27 +00:00
|
|
|
CellLocatorGeneral.cxx
|
2019-03-20 23:38:50 +00:00
|
|
|
CellLocatorRectilinearGrid.cxx
|
2020-09-21 21:35:30 +00:00
|
|
|
CellLocatorTwoLevel.cxx
|
2019-03-20 23:38:50 +00:00
|
|
|
CellLocatorUniformGrid.cxx
|
2019-03-13 17:58:35 +00:00
|
|
|
CellSet.cxx
|
2017-08-14 14:19:34 +00:00
|
|
|
CellSetExplicit.cxx
|
2019-06-06 18:43:53 +00:00
|
|
|
CellSetExtrude.cxx
|
2019-03-13 17:58:35 +00:00
|
|
|
CellSetStructured.cxx
|
|
|
|
ColorTable.cxx
|
2017-12-12 19:26:23 +00:00
|
|
|
CoordinateSystem.cxx
|
2019-03-13 17:58:35 +00:00
|
|
|
DataSet.cxx
|
|
|
|
DataSetBuilderExplicit.cxx
|
|
|
|
DataSetBuilderRectilinear.cxx
|
|
|
|
DataSetBuilderUniform.cxx
|
|
|
|
Field.cxx
|
|
|
|
FieldRangeCompute.cxx
|
|
|
|
FieldRangeGlobalCompute.cxx
|
2019-09-02 14:38:47 +00:00
|
|
|
PartitionedDataSet.cxx
|
2019-04-24 20:06:38 +00:00
|
|
|
PointLocator.cxx
|
2020-09-21 20:49:03 +00:00
|
|
|
PointLocatorSparseGrid.cxx
|
2019-03-29 18:45:10 +00:00
|
|
|
RuntimeDeviceInformation.cxx
|
2019-01-09 16:11:49 +00:00
|
|
|
Timer.cxx
|
2020-08-05 03:16:29 +00:00
|
|
|
UnknownArrayHandle.cxx
|
2017-02-22 23:18:23 +00:00
|
|
|
)
|
|
|
|
|
2020-09-03 19:54:24 +00:00
|
|
|
if (NOT VTKm_NO_DEPRECATED_VIRTUAL)
|
|
|
|
set(headers ${headers}
|
|
|
|
ArrayHandleVirtual.h
|
|
|
|
ArrayHandleVirtualCoordinates.h
|
|
|
|
StorageVirtual.h
|
|
|
|
)
|
|
|
|
|
|
|
|
set(template_sources ${template_sources}
|
|
|
|
ArrayHandleVirtual.hxx
|
|
|
|
StorageVirtual.hxx
|
|
|
|
)
|
|
|
|
|
|
|
|
set(device_sources ${device_sources}
|
|
|
|
ArrayHandleVirtual.cxx
|
|
|
|
StorageVirtual.cxx
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2014-02-10 19:53:03 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
2020-03-17 23:22:35 +00:00
|
|
|
# Set up default types, which can be custom configured by other build systems.
|
|
|
|
vtkm_get_kit_name(kit_name kit_dir)
|
|
|
|
|
|
|
|
# Some custom types included with VTK-m
|
2020-04-01 12:52:07 +00:00
|
|
|
vtkm_option(VTKm_USE_DEFAULT_TYPES_FOR_VTK "Compile VTK-m algorithms for use with types from VTK." OFF)
|
2020-03-17 23:22:35 +00:00
|
|
|
if (VTKm_USE_DEFAULT_TYPES_FOR_VTK)
|
|
|
|
set(VTKm_DEFAULT_TYPES_HEADER "internal/DefaultTypesVTK.h.in")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
mark_as_advanced(VTKm_USE_DEFAULT_TYPES_FOR_VTK)
|
|
|
|
|
|
|
|
if (VTKm_DEFAULT_TYPES_HEADER)
|
|
|
|
set(VTK_M_HAS_DEFAULT_TYPES_HEADER TRUE)
|
|
|
|
get_filename_component(VTKm_DEFAULT_TYPES_HEADER_FILENAME ${VTKm_DEFAULT_TYPES_HEADER} NAME_WE)
|
|
|
|
set(VTKm_DEFAULT_TYPES_HEADER_FILENAME "${VTKm_DEFAULT_TYPES_HEADER_FILENAME}.h")
|
|
|
|
configure_file(${VTKm_DEFAULT_TYPES_HEADER}
|
|
|
|
${VTKm_BINARY_INCLUDE_DIR}/${kit_dir}/internal/${VTKm_DEFAULT_TYPES_HEADER_FILENAME}
|
|
|
|
@ONLY
|
|
|
|
)
|
|
|
|
vtkm_install_headers(vtkm/cont/internal
|
|
|
|
${VTKm_BINARY_INCLUDE_DIR}/${kit_dir}/internal/${VTKm_DEFAULT_TYPES_HEADER_FILENAME}
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/DefaultTypes.h.in
|
|
|
|
${VTKm_BINARY_INCLUDE_DIR}/${kit_dir}/DefaultTypes.h
|
|
|
|
@ONLY
|
|
|
|
)
|
|
|
|
vtkm_install_headers(vtkm/cont
|
|
|
|
${VTKm_BINARY_INCLUDE_DIR}/${kit_dir}/DefaultTypes.h
|
|
|
|
)
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
2018-01-17 22:13:50 +00:00
|
|
|
vtkm_library( NAME vtkm_cont
|
|
|
|
SOURCES ${sources}
|
|
|
|
TEMPLATE_SOURCES ${template_sources}
|
|
|
|
HEADERS ${headers}
|
2019-07-08 18:09:09 +00:00
|
|
|
DEVICE_SOURCES ${device_sources}
|
2018-01-17 22:13:50 +00:00
|
|
|
)
|
2018-08-16 20:34:44 +00:00
|
|
|
|
2014-02-10 19:53:03 +00:00
|
|
|
add_subdirectory(internal)
|
2014-10-14 16:44:48 +00:00
|
|
|
add_subdirectory(arg)
|
2016-09-28 15:38:31 +00:00
|
|
|
add_subdirectory(serial)
|
2016-09-12 14:30:03 +00:00
|
|
|
add_subdirectory(tbb)
|
2018-03-01 21:20:31 +00:00
|
|
|
add_subdirectory(openmp)
|
2018-01-17 22:13:50 +00:00
|
|
|
add_subdirectory(cuda)
|
2020-06-16 12:54:01 +00:00
|
|
|
add_subdirectory(kokkos)
|
2018-01-17 22:13:50 +00:00
|
|
|
|
|
|
|
set(backends )
|
2017-12-29 18:16:52 +00:00
|
|
|
if(TARGET vtkm::tbb)
|
2017-10-05 17:24:47 +00:00
|
|
|
list(APPEND backends vtkm::tbb)
|
2016-09-12 14:30:03 +00:00
|
|
|
endif()
|
2017-12-29 18:16:52 +00:00
|
|
|
if(TARGET vtkm::cuda)
|
2017-10-05 17:24:47 +00:00
|
|
|
list(APPEND backends vtkm::cuda)
|
2017-03-06 14:41:40 +00:00
|
|
|
endif()
|
2018-03-01 21:20:31 +00:00
|
|
|
if(TARGET vtkm::openmp)
|
|
|
|
list(APPEND backends vtkm::openmp)
|
|
|
|
endif()
|
2020-06-16 12:54:01 +00:00
|
|
|
if(TARGET vtkm::kokkos)
|
|
|
|
list(APPEND backends vtkm::kokkos)
|
|
|
|
endif()
|
2019-06-18 19:20:24 +00:00
|
|
|
|
|
|
|
target_link_libraries(vtkm_cont PUBLIC vtkm_compiler_flags ${backends})
|
2020-01-30 17:07:59 +00:00
|
|
|
target_link_libraries(vtkm_cont PUBLIC Threads::Threads)
|
2020-03-04 22:26:09 +00:00
|
|
|
target_link_libraries(vtkm_cont PUBLIC vtkm_optionparser vtkm_diy vtkm_lcl)
|
2019-06-19 13:52:43 +00:00
|
|
|
if(TARGET vtkm_loguru)
|
|
|
|
target_link_libraries(vtkm_cont PRIVATE vtkm_loguru)
|
|
|
|
endif()
|
2017-11-28 21:04:15 +00:00
|
|
|
|
2014-02-10 19:53:03 +00:00
|
|
|
#-----------------------------------------------------------------------------
|
2016-10-21 19:10:49 +00:00
|
|
|
add_subdirectory(testing)
|