Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Sudhanshu Sane
VTK-m
Commits
c062f2e2
Commit
c062f2e2
authored
Dec 03, 2018
by
Abhishek Yenpure
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://gitlab.kitware.com/vtk/vtk-m
into code_sprint_locator_fixes
parents
0fa73352
bc137642
Changes
611
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
75 changed files
with
2371 additions
and
1276 deletions
+2371
-1276
CMake/VTKmCompilerDynamicAnalysisFlags.cmake
CMake/VTKmCompilerDynamicAnalysisFlags.cmake
+42
-0
CMake/VTKmCompilerFlags.cmake
CMake/VTKmCompilerFlags.cmake
+16
-16
CMake/VTKmDeviceAdapters.cmake
CMake/VTKmDeviceAdapters.cmake
+19
-3
CMake/VTKmWrappers.cmake
CMake/VTKmWrappers.cmake
+77
-49
CMakeLists.txt
CMakeLists.txt
+7
-1
README.md
README.md
+11
-9
Utilities/DynamicAnalysis/lsan.supp
Utilities/DynamicAnalysis/lsan.supp
+1
-0
Utilities/DynamicAnalysis/sanitizer_blacklist.txt.in
Utilities/DynamicAnalysis/sanitizer_blacklist.txt.in
+2
-0
benchmarking/BenchmarkDeviceAdapter.cxx
benchmarking/BenchmarkDeviceAdapter.cxx
+3
-2
benchmarking/BenchmarkFilters.cxx
benchmarking/BenchmarkFilters.cxx
+3
-0
benchmarking/BenchmarkRayTracing.cxx
benchmarking/BenchmarkRayTracing.cxx
+14
-5
benchmarking/Benchmarker.h
benchmarking/Benchmarker.h
+1
-1
docs/changelog/0-sample-topic.md
docs/changelog/0-sample-topic.md
+7
-0
docs/changelog/1.3/release-notes.md
docs/changelog/1.3/release-notes.md
+1509
-0
docs/changelog/add-float-version-functions-pi.md
docs/changelog/add-float-version-functions-pi.md
+0
-5
docs/changelog/add-unload-execution-resources-to-cellsets.md
docs/changelog/add-unload-execution-resources-to-cellsets.md
+0
-5
docs/changelog/add_tryexecuteondevice_function.md
docs/changelog/add_tryexecuteondevice_function.md
+0
-31
docs/changelog/agorithms_support_runtime_device.md
docs/changelog/agorithms_support_runtime_device.md
+0
-26
docs/changelog/allow-CoordinateSystem-to-unload-execution-resources.md
...g/allow-CoordinateSystem-to-unload-execution-resources.md
+0
-10
docs/changelog/allow-custom-range-in-histogram-filter.md
docs/changelog/allow-custom-range-in-histogram-filter.md
+0
-4
docs/changelog/allow-disabling-enabling-cuda-managed-memory.md
...changelog/allow-disabling-enabling-cuda-managed-memory.md
+0
-6
docs/changelog/array-handle-memory-ownership.md
docs/changelog/array-handle-memory-ownership.md
+0
-16
docs/changelog/array-handle-view.md
docs/changelog/array-handle-view.md
+0
-23
docs/changelog/arrayhandlecompositevector-refactor.md
docs/changelog/arrayhandlecompositevector-refactor.md
+0
-20
docs/changelog/arrayhandleextractcomponent-runtime-component.md
...hangelog/arrayhandleextractcomponent-runtime-component.md
+0
-7
docs/changelog/arrayhandleswizzle-runtime-map.md
docs/changelog/arrayhandleswizzle-runtime-map.md
+0
-8
docs/changelog/build-system-redesign.md
docs/changelog/build-system-redesign.md
+0
-61
docs/changelog/cell-measure.md
docs/changelog/cell-measure.md
+0
-54
docs/changelog/cellsetexplicit-cache-celltopoint.md
docs/changelog/cellsetexplicit-cache-celltopoint.md
+0
-21
docs/changelog/change-execution-object-creation.md
docs/changelog/change-execution-object-creation.md
+0
-27
docs/changelog/convert-enums-to-enum-structs.md
docs/changelog/convert-enums-to-enum-structs.md
+0
-4
docs/changelog/cuda-arch-none.md
docs/changelog/cuda-arch-none.md
+0
-8
docs/changelog/cuda-asynchronous-errors.md
docs/changelog/cuda-asynchronous-errors.md
+0
-15
docs/changelog/cuda-deferred-free.md
docs/changelog/cuda-deferred-free.md
+0
-8
docs/changelog/cuda-gride-stride-loops.md
docs/changelog/cuda-gride-stride-loops.md
+0
-49
docs/changelog/deviceadapterid_is_now_a_strong_type.md
docs/changelog/deviceadapterid_is_now_a_strong_type.md
+0
-41
docs/changelog/deviceadaptertags_usable_for_runtime_device_selection.md
.../deviceadaptertags_usable_for_runtime_device_selection.md
+0
-45
docs/changelog/dispatcher-auto-device.md
docs/changelog/dispatcher-auto-device.md
+0
-15
docs/changelog/dispatcher-invoke-supports-pointers.md
docs/changelog/dispatcher-invoke-supports-pointers.md
+0
-19
docs/changelog/dot-product.md
docs/changelog/dot-product.md
+0
-6
docs/changelog/enable-developer-flags.md
docs/changelog/enable-developer-flags.md
+0
-11
docs/changelog/exec-objects-alg-args.md
docs/changelog/exec-objects-alg-args.md
+0
-24
docs/changelog/geometry.md
docs/changelog/geometry.md
+0
-75
docs/changelog/install-only-libraries.md
docs/changelog/install-only-libraries.md
+0
-9
docs/changelog/lagrangian-filter.md
docs/changelog/lagrangian-filter.md
+0
-20
docs/changelog/merge-worklet-testing-executables.md
docs/changelog/merge-worklet-testing-executables.md
+11
-0
docs/changelog/openmp-backend.md
docs/changelog/openmp-backend.md
+0
-5
docs/changelog/oscillator-source.md
docs/changelog/oscillator-source.md
+0
-11
docs/changelog/replace-random_shuffle-shuffle.md
docs/changelog/replace-random_shuffle-shuffle.md
+0
-5
docs/changelog/scatter-to-dispatcher.md
docs/changelog/scatter-to-dispatcher.md
+0
-73
docs/changelog/smaller-mem-footprint-cellderivative.md
docs/changelog/smaller-mem-footprint-cellderivative.md
+0
-5
docs/changelog/spatial-search-interfaces.md
docs/changelog/spatial-search-interfaces.md
+0
-54
docs/changelog/storage-free-functions.md
docs/changelog/storage-free-functions.md
+0
-24
docs/changelog/swap.md
docs/changelog/swap.md
+0
-7
docs/changelog/use-std-call-once-to-construct-singletons.md
docs/changelog/use-std-call-once-to-construct-singletons.md
+0
-4
docs/changelog/use-thread_local-in-GetGlobalRuntimeDeviceTracker.md
...elog/use-thread_local-in-GetGlobalRuntimeDeviceTracker.md
+0
-5
docs/changelog/vec-constexpr-variadic-constructor.md
docs/changelog/vec-constexpr-variadic-constructor.md
+0
-115
docs/changelog/vec-vec-constructors.md
docs/changelog/vec-vec-constructors.md
+0
-18
docs/changelog/virtual-object-handle-non-templated-transfer.md
...changelog/virtual-object-handle-non-templated-transfer.md
+0
-21
docs/changelog/vs-cmake-requirements.md
docs/changelog/vs-cmake-requirements.md
+0
-4
docs/changelog/warp-by-vector-worklet-filter.md
docs/changelog/warp-by-vector-worklet-filter.md
+0
-7
docs/changelog/warp-scalar-worklet-filter.md
docs/changelog/warp-scalar-worklet-filter.md
+0
-7
docs/changelog/wavelet_generator.md
docs/changelog/wavelet_generator.md
+0
-5
examples/CMakeLists.txt
examples/CMakeLists.txt
+1
-0
examples/clipping/Clipping.cxx
examples/clipping/Clipping.cxx
+7
-14
examples/contour_tree_augmented/CMakeLists.txt
examples/contour_tree_augmented/CMakeLists.txt
+125
-0
examples/contour_tree_augmented/ContourTreeApp.cxx
examples/contour_tree_augmented/ContourTreeApp.cxx
+435
-0
examples/cosmotools/CMakeLists.txt
examples/cosmotools/CMakeLists.txt
+9
-17
examples/cosmotools/CosmoCenterFinder.cxx
examples/cosmotools/CosmoCenterFinder.cxx
+26
-21
examples/cosmotools/CosmoHaloFinder.cxx
examples/cosmotools/CosmoHaloFinder.cxx
+25
-20
examples/cosmotools/CosmoHaloFinderTBB.cxx
examples/cosmotools/CosmoHaloFinderTBB.cxx
+0
-23
examples/game_of_life/GameOfLife.cxx
examples/game_of_life/GameOfLife.cxx
+4
-17
examples/multi_backend/MultiDeviceGradient.h
examples/multi_backend/MultiDeviceGradient.h
+1
-1
examples/multi_backend/MultiDeviceGradient.hxx
examples/multi_backend/MultiDeviceGradient.hxx
+11
-20
examples/particle_advection/ParticleAdvection.cxx
examples/particle_advection/ParticleAdvection.cxx
+4
-14
No files found.
CMake/VTKmCompilerDynamicAnalysisFlags.cmake
0 → 100644
View file @
c062f2e2
##============================================================================
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
## 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.
##
## Copyright 2014 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
## Copyright 2014 UT-Battelle, LLC.
## Copyright 2014 Los Alamos National Security.
##
## Under the terms of Contract DE-NA0003525 with NTESS,
## the U.S. Government retains certain rights in this software.
##
## Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
## Laboratory (LANL), the U.S. Government retains certain rights in
## this software.
##============================================================================
#-----------------------------------------------------------------------------
# check if this is a sanitizer build. If so, set up the environment.
function
(
vtkm_check_sanitizer_build
)
string
(
FIND
"
${
CTEST_MEMORYCHECK_TYPE
}
"
"Sanitizer"
SANITIZER_BUILD
)
if
(
${
SANITIZER_BUILD
}
GREATER -1
)
# This is a sanitizer build.
# Configure the sanitizer blacklist file
set
(
SANITIZER_BLACKLIST
"
${
VTKm_BINARY_DIR
}
/sanitizer_blacklist.txt"
)
configure_file
(
"
${
VTKm_SOURCE_DIR
}
/Utilities/DynamicAnalysis/sanitizer_blacklist.txt.in"
${
SANITIZER_BLACKLIST
}
@ONLY
)
# Add the compiler flags for blacklist
set
(
FSANITIZE_BLACKLIST
"
\"
-fsanitize-blacklist=
${
SANITIZER_BLACKLIST
}
\"
"
)
foreach
(
entity C CXX SHARED_LINKER EXE_LINKER MODULE_LINKER
)
set
(
CMAKE_
${
entity
}
_FLAGS
"
${
CMAKE_
${
entity
}
_FLAGS
}
${
FSANITIZE_BLACKLIST
}
"
)
endforeach
()
endif
()
endfunction
()
CMake/VTKmCompilerFlags.cmake
View file @
c062f2e2
...
...
@@ -51,8 +51,9 @@ add_library(vtkm_compiler_flags INTERFACE)
# When building libraries/tests that are part of the VTK-m repository
# inherit the properties from vtkm_developer_flags and vtkm_vectorization_flags.
# The flags are intended only for VTK-m itself and are not needed by consumers.
# We will export vtkm_vectorization_flags in general so consumer can enable
# vectorization if they so desire
# We will export vtkm_developer_flags, and vtkm_vectorization_flags in general
# so consumer can either enable vectorization or use VTK-m's build flags if
# they so desire
if
(
VTKm_ENABLE_DEVELOPER_FLAGS
)
target_link_libraries
(
vtkm_compiler_flags
INTERFACE $<BUILD_INTERFACE:vtkm_developer_flags>
)
...
...
@@ -92,26 +93,29 @@ add_library(vtkm_developer_flags INTERFACE)
# about failures to vectorize.
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"Clang"
AND
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.4
)
target_compile_options
(
vtkm_developer_flags INTERFACE
$<BUILD_INTERFACE:
$<$<COMPILE_LANGUAGE:CXX>:-Wno-pass-failed>
>
)
target_compile_options
(
vtkm_developer_flags INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-Wno-pass-failed>
)
elseif
(
CMAKE_CXX_COMPILER_ID STREQUAL
"AppleClang"
AND
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.99
)
target_compile_options
(
vtkm_developer_flags INTERFACE
$<BUILD_INTERFACE:
$<$<COMPILE_LANGUAGE:CXX>:-Wno-pass-failed>
>
)
target_compile_options
(
vtkm_developer_flags INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-Wno-pass-failed>
)
endif
()
if
(
VTKM_COMPILER_IS_MSVC
)
target_compile_definitions
(
vtkm_developer_flags INTERFACE
"_SCL_SECURE_NO_WARNINGS"
"_CRT_SECURE_NO_WARNINGS"
)
#CMake COMPILE_LANGUAGE doesn't work with MSVC, ans since we want these flags
#only for C++ compilation we have to resort to setting CMAKE_CXX_FLAGS :(
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/wd4702 /wd4505"
)
set
(
CMAKE_CUDA_FLAGS
"
${
CMAKE_CUDA_FLAGS
}
-Xcompiler=
\"
/wd4702 /wd4505
\"
-Xcudafe=
\"
--diag_suppress=1394 --diag_suppress=766 --display_error_number
\"
"
)
#Setup MSVC warnings with CUDA and CXX
target_compile_options
(
vtkm_developer_flags INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-wd4702 -wd4505>
)
if
(
TARGET vtkm::cuda
)
target_compile_options
(
vtkm_developer_flags INTERFACE $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=-wd4702,-wd4505 -Xcudafe=--display_error_number,--diag_suppress=1394,--diag_suppress=766>
)
endif
()
if
(
MSVC_VERSION LESS 1900
)
# In VS2013 the C4127 warning has a bug in the implementation and
# generates false positive warnings for lots of template code
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-wd4127"
)
set
(
CMAKE_CUDA_FLAGS
"
${
CMAKE_CUDA_FLAGS
}
-Xcompiler=
\"
/wd4127
\"
"
)
target_compile_options
(
vtkm_developer_flags INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-wd4127>
)
if
(
TARGET vtkm::cuda
)
target_compile_options
(
vtkm_developer_flags INTERFACE $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=-wd4127>
)
endif
()
endif
()
elseif
(
VTKM_COMPILER_IS_ICC
)
...
...
@@ -137,13 +141,9 @@ elseif(VTKM_COMPILER_IS_GNU OR VTKM_COMPILER_IS_CLANG)
(
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.99
)
)
list
(
APPEND cxx_flags -Wno-strict-overflow
)
endif
()
target_compile_options
(
vtkm_developer_flags
INTERFACE $<BUILD_INTERFACE:$<$<COMPILE_LANGUAGE:CXX>:
${
cxx_flags
}
>>
)
target_compile_options
(
vtkm_developer_flags INTERFACE $<$<COMPILE_LANGUAGE:CXX>:
${
cxx_flags
}
>
)
if
(
TARGET vtkm::cuda
)
target_compile_options
(
vtkm_developer_flags
INTERFACE $<BUILD_INTERFACE:$<$<COMPILE_LANGUAGE:CUDA>:
${
cuda_flags
}
>>
)
target_compile_options
(
vtkm_developer_flags INTERFACE $<$<COMPILE_LANGUAGE:CUDA>:
${
cuda_flags
}
>
)
endif
()
endif
()
...
...
CMake/VTKmDeviceAdapters.cmake
View file @
c062f2e2
...
...
@@ -72,6 +72,16 @@ if(VTKm_ENABLE_TBB AND NOT TARGET vtkm::tbb)
IMPORTED_LINK_INTERFACE_LANGUAGES
"CXX"
IMPORTED_LOCATION_RELEASE
"
${
real_path
}
"
)
elseif
(
EXISTS
"
${
TBB_LIBRARY
}
"
)
#When VTK-m is mixed with OSPray we could use the OSPray FindTBB file
#which doesn't define TBB_LIBRARY_RELEASE but instead defined only
#TBB_LIBRARY
vtkm_extract_real_library
(
"
${
TBB_LIBRARY
}
"
real_path
)
set_property
(
TARGET vtkm::tbb APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE
)
set_target_properties
(
vtkm::tbb PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES
"CXX"
IMPORTED_LOCATION_RELEASE
"
${
real_path
}
"
)
endif
()
if
(
EXISTS
"
${
TBB_LIBRARY_DEBUG
}
"
)
...
...
@@ -188,18 +198,21 @@ if(VTKm_ENABLE_CUDA AND NOT TARGET vtkm::cuda)
# - Uses: --generate-code=arch=compute_60,code=sm_60
# 6 - volta
# - Uses: --generate-code=arch=compute_70,code=sm_70
# 7 - all
# 7 - turing
# - Uses: --generate-code=arch=compute_75code=sm_75
# 8 - all
# - Uses: --generate-code=arch=compute_30,code=sm_30
# - Uses: --generate-code=arch=compute_35,code=sm_35
# - Uses: --generate-code=arch=compute_50,code=sm_50
# - Uses: --generate-code=arch=compute_60,code=sm_60
# - Uses: --generate-code=arch=compute_70,code=sm_70
# - Uses: --generate-code=arch=compute_75,code=sm_75
# 8 - none
#
#specify the property
set
(
VTKm_CUDA_Architecture
"native"
CACHE STRING
"Which GPU Architecture(s) to compile for"
)
set_property
(
CACHE VTKm_CUDA_Architecture PROPERTY STRINGS native fermi kepler maxwell pascal volta all none
)
set_property
(
CACHE VTKm_CUDA_Architecture PROPERTY STRINGS native fermi kepler maxwell pascal volta
turing
all none
)
#detect what the property is set too
if
(
VTKm_CUDA_Architecture STREQUAL
"native"
)
...
...
@@ -253,12 +266,15 @@ if(VTKm_ENABLE_CUDA AND NOT TARGET vtkm::cuda)
set
(
arch_flags --generate-code=arch=compute_60,code=sm_60
)
elseif
(
VTKm_CUDA_Architecture STREQUAL
"volta"
)
set
(
arch_flags --generate-code=arch=compute_70,code=sm_70
)
elseif
(
VTKm_CUDA_Architecture STREQUAL
"turing"
)
set
(
arch_flags --generate-code=arch=compute_75,code=sm_75
)
elseif
(
VTKm_CUDA_Architecture STREQUAL
"all"
)
set
(
arch_flags --generate-code=arch=compute_30,code=sm_30
--generate-code=arch=compute_35,code=sm_35
--generate-code=arch=compute_50,code=sm_50
--generate-code=arch=compute_60,code=sm_60
--generate-code=arch=compute_70,code=sm_70
)
--generate-code=arch=compute_70,code=sm_70
--generate-code=arch=compute_75,code=sm_75
)
endif
()
string
(
REPLACE
";"
" "
arch_flags
"
${
arch_flags
}
"
)
...
...
CMake/VTKmWrappers.cmake
View file @
c062f2e2
...
...
@@ -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
}
/
${
header
name
}
.
${
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
}
)
...
...
@@ -345,6 +346,7 @@ endfunction(vtkm_library)
# LIBRARIES <dependent_library_list>
# TEST_ARGS <argument_list>
# MPI
# ALL_BACKENDS
# <options>
# )
#
...
...
@@ -362,6 +364,8 @@ endfunction(vtkm_library)
#
# [MPI] : when specified, the tests should be run in parallel if
# MPI is enabled.
# [ALL_BACKENDS] : when specified, the tests would test against all enabled
# backends. BACKEND argument would be ignored.
#
function
(
vtkm_unit_tests
)
if
(
NOT VTKm_ENABLE_TESTING
)
...
...
@@ -369,7 +373,7 @@ function(vtkm_unit_tests)
endif
()
set
(
options
)
set
(
global_options
${
options
}
MPI
)
set
(
global_options
${
options
}
MPI
ALL_BACKENDS
)
set
(
oneValueArgs BACKEND NAME
)
set
(
multiValueArgs SOURCES LIBRARIES TEST_ARGS
)
cmake_parse_arguments
(
VTKm_UT
...
...
@@ -378,17 +382,33 @@ function(vtkm_unit_tests)
)
vtkm_parse_test_options
(
VTKm_UT_SOURCES
"
${
options
}
"
${
VTKm_UT_SOURCES
}
)
set
(
test_prog
)
set
(
test_prog
)
set
(
backend
${
VTKm_UT_BACKEND
}
)
set
(
enable_all_backends
${
VTKm_UT_ALL_BACKENDS
}
)
set
(
all_backends SERIAL
)
if
(
VTKm_ENABLE_CUDA
)
list
(
APPEND all_backends CUDA
)
endif
()
if
(
VTKm_ENABLE_TBB
)
list
(
APPEND all_backends TBB
)
endif
()
if
(
VTKm_ENABLE_OPENMP
)
list
(
APPEND all_backends OPENMP
)
endif
()
if
(
VTKm_UT_NAME
)
set
(
test_prog
"
${
VTKm_UT_NAME
}
"
)
else
()
vtkm_get_kit_name
(
kit
)
set
(
test_prog
"UnitTests_
${
kit
}
"
)
endif
()
if
(
backend
)
set
(
test_prog
"
${
test_prog
}
_
${
backend
}
"
)
set
(
all_backends
${
backend
}
)
elseif
(
NOT enable_all_backends
)
set
(
all_backends
"NO_BACKEND"
)
endif
()
if
(
VTKm_UT_MPI
)
...
...
@@ -403,7 +423,8 @@ function(vtkm_unit_tests)
#the creation of the test source list needs to occur before the labeling as
#cuda. This is so that we get the correctly named entry points generated
create_test_sourcelist
(
test_sources
${
test_prog
}
.cxx
${
VTKm_UT_SOURCES
}
${
extraArgs
}
)
if
(
backend STREQUAL
"CUDA"
)
#if all backends are enabled, we can use cuda compiler to handle all possible backends.
if
(
backend STREQUAL
"CUDA"
OR
(
enable_all_backends AND VTKm_ENABLE_CUDA
))
vtkm_compile_as_cuda
(
cu_srcs
${
VTKm_UT_SOURCES
}
)
set
(
VTKm_UT_SOURCES
${
cu_srcs
}
)
endif
()
...
...
@@ -414,43 +435,50 @@ function(vtkm_unit_tests)
set_property
(
TARGET
${
test_prog
}
PROPERTY RUNTIME_OUTPUT_DIRECTORY
${
VTKm_EXECUTABLE_OUTPUT_PATH
}
)
target_link_libraries
(
${
test_prog
}
PRIVATE vtkm_cont
${
VTKm_UT_LIBRARIES
}
)
if
(
backend
)
target_compile_definitions
(
${
test_prog
}
PRIVATE
"VTKM_DEVICE_ADAPTER=VTKM_DEVICE_ADAPTER_
${
backend
}
"
)
endif
()
#determine the timeout for all the tests based on the backend. CUDA tests
#generally require more time because of kernel generation.
set
(
timeout 180
)
set
(
run_serial False
)
if
(
backend STREQUAL
"CUDA"
)
set
(
timeout 1500
)
elseif
(
backend STREQUAL
"OPENMP"
)
#We need to have all OpenMP tests run serially as they
#will uses all the system cores, and we will cause a N*N thread
#explosion which causes the tests to run slower than when run
#serially
set
(
run_serial True
)
endif
()
foreach
(
current_backend
${
all_backends
}
)
set
(
device_command_line_argument --device=
${
current_backend
}
)
if
(
current_backend STREQUAL
"NO_BACKEND"
)
set
(
current_backend
""
)
set
(
device_command_line_argument
""
)
endif
()
foreach
(
test
${
VTKm_UT_SOURCES
}
)
get_filename_component
(
tname
${
test
}
NAME_WE
)
if
(
VTKm_UT_MPI AND VTKm_ENABLE_MPI
)
add_test
(
NAME
${
tname
}${
current_backend
}
COMMAND
${
MPIEXEC
}
${
MPIEXEC_NUMPROC_FLAG
}
3
${
MPIEXEC_PREFLAGS
}
$<TARGET_FILE:
${
test_prog
}
>
${
tname
}
${
device_command_line_argument
}
${
VTKm_UT_TEST_ARGS
}
${
MPIEXEC_POSTFLAGS
}
)
else
()
add_test
(
NAME
${
tname
}${
current_backend
}
COMMAND
${
test_prog
}
${
tname
}
${
device_command_line_argument
}
${
VTKm_UT_TEST_ARGS
}
)
endif
()
#determine the timeout for all the tests based on the backend. CUDA tests
#generally require more time because of kernel generation.
if
(
current_backend STREQUAL
"CUDA"
)
set
(
timeout 1500
)
else
()
set
(
timeout 180
)
endif
()
if
(
current_backend STREQUAL
"OPENMP"
)
#We need to have all OpenMP tests run serially as they
#will uses all the system cores, and we will cause a N*N thread
#explosion which causes the tests to run slower than when run
#serially
set
(
run_serial True
)
else
()
set
(
run_serial False
)
endif
()
foreach
(
test
${
VTKm_UT_SOURCES
}
)
get_filename_component
(
tname
${
test
}
NAME_WE
)
if
(
VTKm_UT_MPI AND VTKm_ENABLE_MPI
)
add_test
(
NAME
${
tname
}${
backend
}
COMMAND
${
MPIEXEC
}
${
MPIEXEC_NUMPROC_FLAG
}
3
${
MPIEXEC_PREFLAGS
}
$<TARGET_FILE:
${
test_prog
}
>
${
tname
}
${
VTKm_UT_TEST_ARGS
}
${
MPIEXEC_POSTFLAGS
}
)
else
()
add_test
(
NAME
${
tname
}${
backend
}
COMMAND
${
test_prog
}
${
tname
}
${
VTKm_UT_TEST_ARGS
}
)
endif
()
set_tests_properties
(
"
${
tname
}${
backend
}
"
PROPERTIES
TIMEOUT
${
timeout
}
RUN_SERIAL
${
run_serial
}
)
endforeach
(
test
)
set_tests_properties
(
"
${
tname
}${
current_backend
}
"
PROPERTIES
TIMEOUT
${
timeout
}
RUN_SERIAL
${
run_serial
}
)
endforeach
(
test
)
endforeach
(
current_backend
)
endfunction
(
vtkm_unit_tests
)
...
...
CMakeLists.txt
View file @
c062f2e2
...
...
@@ -97,6 +97,7 @@ vtkm_option(VTKm_ENABLE_OPENMP "Enable OpenMP support" OFF)
vtkm_option
(
VTKm_ENABLE_RENDERING
"Enable rendering library"
ON
)
vtkm_option
(
VTKm_ENABLE_TESTING
"Enable VTKm Testing"
ON
)
vtkm_option
(
VTKm_ENABLE_BENCHMARKS
"Enable VTKm Benchmarking"
OFF
)
vtkm_option
(
VTKm_ENABLE_LOGGING
"Enable VTKm Logging"
OFF
)
vtkm_option
(
VTKm_ENABLE_MPI
"Enable MPI support"
OFF
)
vtkm_option
(
VTKm_ENABLE_DOCUMENTATION
"Build Doxygen documentation"
OFF
)
...
...
@@ -199,6 +200,11 @@ if (VTKm_ENABLE_TESTING)
# Find Pyexpander in case somebody wants to update the auto generated
# faux variadic template code
find_package
(
Pyexpander QUIET
)
#-----------------------------------------------------------------------------
# Setup compiler flags for dynamic analysis if needed
include
(
VTKmCompilerDynamicAnalysisFlags
)
vtkm_check_sanitizer_build
()
endif
(
VTKm_ENABLE_TESTING
)
#-----------------------------------------------------------------------------
...
...
@@ -288,7 +294,7 @@ if(NOT VTKm_INSTALL_ONLY_LIBRARIES)
# Create and install exports for external projects
export
(
EXPORT
${
VTKm_EXPORT_NAME
}
FILE
${
VTKm_B
INARY
_DIR
}
/
${
VTKm_INSTALL_CONFIG_DIR
}
/VTKmTargets.cmake
FILE
${
VTKm_B
UILD_CMAKE_BASE
_DIR
}
/
${
VTKm_INSTALL_CONFIG_DIR
}
/VTKmTargets.cmake
)
install
(
EXPORT
${
VTKm_EXPORT_NAME
}
DESTINATION
${
VTKm_INSTALL_CONFIG_DIR
}
...
...
README.md
View file @
c062f2e2
...
...
@@ -71,6 +71,7 @@ Optional dependencies are:
+
CUDA Device Adapter
+
[
Cuda Toolkit 7.5+
](
https://developer.nvidia.com/cuda-toolkit
)
+
Note CUDA >= 10.0 is required on Windows
+
TBB Device Adapter
+
[
TBB
](
https://www.threadingbuildingblocks.org/
)
+
OpenMP Device Adapter
...
...
@@ -95,19 +96,20 @@ Optional dependencies are:
+
EGL Driver
VTK-m has been tested on the following configurations:
+
On Linux
+
GCC 4.8.5, 5.4.0, 6.4.0, Clang 3.8.0
+
CMake
3.9.2,
3.9.3, 3.10.3
+
CUDA 8.0.61, 9.1.85
+
On Linux
+
GCC 4.8.5, 5.4.0, 6.4.0,
7.3.0
Clang 3.8.0
, Intel 17.0.4
+
CMake 3.9.3, 3.10.3
+
CUDA 8.0.61, 9.1.85
, 10.0.130
+
TBB 4.4 U2, 2017 U7
+
On Windows
+
Visual Studio 2015, 2017
+
CMake 3.3, 3.11.1
+
CUDA
9.1.85
+
CUDA
10.0.130
+
TBB 2017 U3, 2018 U2
+
On MacOS
+
AppleClang 6.0
+
TBB 2017 U6
+
AppleClang 9.1
+
CMake 3.12.0
+
TBB 2018
## Building ##
...
...
@@ -133,7 +135,7 @@ Users Guide].
## Example##
The VTK-m source distribution includes a number of examples. The goal of the
VTK-m examples is to illustrate specific VTK-m concepts in a consistent and
VTK-m examples is to illustrate specific VTK-m concepts in a consistent and
simple format. However, these examples only cover a small part of the
capabilities of VTK-m.
...
...
@@ -204,7 +206,7 @@ See [LICENSE.txt](LICENSE.txt) for details.
[
VTK-m download page
]:
http://m.vtk.org/index.php/VTK-m_Releases
[
VTK-m git repository
]:
https://gitlab.kitware.com/vtk/vtk-m/
[
VTK-m Issue Tracker
]:
https://gitlab.kitware.com/vtk/vtk-m/issues
[
VTK-m Overview
]:
http://m.vtk.org/images/2/29/VTKmVis2016.pptx
[
VTK-m Overview
]:
http://m.vtk.org/images/2/29/VTKmVis2016.pptx
[
VTK-m Users Guide
]:
http://m.vtk.org/images/c/c8/VTKmUsersGuide.pdf
[
VTK-m users email list
]:
http://vtk.org/mailman/listinfo/vtkm
[
VTK-m Wiki
]:
http://m.vtk.org/
...
...
Utilities/DynamicAnalysis/lsan.supp
0 → 100644
View file @
c062f2e2
leak:libX11*
Utilities/DynamicAnalysis/sanitizer_blacklist.txt.in
0 → 100644
View file @
c062f2e2
# Blacklist third party libraries from invoking sanitizer errors
src:@VTKm_SOURCE_DIR@/vtkm/thirdparty/*
benchmarking/BenchmarkDeviceAdapter.cxx
View file @
c062f2e2
...
...
@@ -698,7 +698,7 @@ private:
template
<
typename
Value
>
struct
BenchStableSortIndices
{
using
SSI
=
vtkm
::
worklet
::
StableSortIndices
<
DeviceAdapterTag
>
;
using
SSI
=
vtkm
::
worklet
::
StableSortIndices
;
using
ValueArrayHandle
=
vtkm
::
cont
::
ArrayHandle
<
Value
,
StorageTag
>
;
ValueArrayHandle
ValueHandle
;
...
...
@@ -743,7 +743,7 @@ private:
template
<
typename
Value
>
struct
BenchStableSortIndicesUnique
{
using
SSI
=
vtkm
::
worklet
::
StableSortIndices
<
DeviceAdapterTag
>
;
using
SSI
=
vtkm
::
worklet
::
StableSortIndices
;
using
IndexArrayHandle
=
typename
SSI
::
IndexArrayType
;
using
ValueArrayHandle
=
vtkm
::
cont
::
ArrayHandle
<
Value
,
StorageTag
>
;
...
...
@@ -915,6 +915,7 @@ public:
static
VTKM_CONT
int
Run
()
{
std
::
cout
<<
DIVIDER
<<
"
\n
Running DeviceAdapter benchmarks
\n
"
;
vtkm
::
cont
::
GetGlobalRuntimeDeviceTracker
().
ForceDevice
(
DeviceAdapterTag
());
// Run fixed bytes / size tests:
for
(
int
sizeType
=
0
;
sizeType
<
2
;
++
sizeType
)
...
...
benchmarking/BenchmarkFilters.cxx
View file @
c062f2e2
...
...
@@ -32,6 +32,7 @@
#include <vtkm/cont/CellSetStructured.h>
#include <vtkm/cont/DataSet.h>
#include <vtkm/cont/ErrorInternal.h>
#include <vtkm/cont/Logging.h>
#include <vtkm/cont/RuntimeDeviceTracker.h>
#include <vtkm/cont/StorageBasic.h>
#include <vtkm/cont/Timer.h>
...
...
@@ -1282,6 +1283,8 @@ int BenchmarkBody(int argc, char* argv[])
int
main
(
int
argc
,
char
*
argv
[])
{
vtkm
::
cont
::
InitLogging
(
argc
,
argv
);
int
retval
=
1
;
try
{
...
...
benchmarking/BenchmarkRayTracing.cxx
View file @
c062f2e2
...
...
@@ -28,12 +28,15 @@
#include <vtkm/cont/testing/MakeTestDataSet.h>
#include <vtkm/rendering/Camera.h>
#include <vtkm/rendering/internal/RunTriangulator.h>
#include <vtkm/rendering/raytracing/Ray.h>
#include <vtkm/rendering/raytracing/RayTracer.h>
#include <vtkm/rendering/raytracing/SphereIntersector.h>
#include <vtkm/rendering/raytracing/TriangleExtractor.h>
#include <vtkm/exec/FunctorBase.h>
#include <vtkm/cont/ColorTable.hxx>
#include <sstream>
#include <string>
#include <vector>
...
...
@@ -66,18 +69,24 @@ struct BenchRayTracing
camera
.
ResetToBounds
(
bounds
);
vtkm
::
cont
::
DynamicCellSet
cellset
=
Data
.
GetCellSet
();
vtkm
::
rendering
::
internal
::
RunTriangulator
(
cellset
,
Indices
,
NumberOfTriangles
);
vtkm
::
rendering
::
raytracing
::
TriangleExtractor
triExtractor
;
triExtractor
.
ExtractCells
(
cellset
);
vtkm
::
rendering
::
raytracing
::
TriangleIntersector
*
triIntersector
=
new
vtkm
::
rendering
::
raytracing
::
TriangleIntersector
();
triIntersector
->
SetData
(
Coords
,
triExtractor
.
GetTriangles
());
Tracer
.
AddShapeIntersector
(
triIntersector
);
vtkm
::
rendering
::
CanvasRayTracer
canvas
(
1920
,
1080
);
RayCamera
.
SetParameters
(
camera
,
canvas
);
RayCamera
.
CreateRays
(
Rays
,
Coords
);
RayCamera
.
CreateRays
(
Rays
,
Coords
.
GetBounds
()
);
Rays
.
Buffers
.
at
(
0
).
InitConst
(
0.
f
);
vtkm
::
cont
::
Field
field
=
Data
.
GetField
(
"pointvar"
);
vtkm
::
Range
range
=
field
.
GetRange
().
GetPortalConstControl
().
Get
(
0
);
Tracer
.
Set
Data
(
Coords
.
GetData
(),
Indices
,
field
,
NumberOfTriangles
,
range
,
bounds
);
Tracer
.
Set
Field
(
field
,
range
);
vtkm
::
cont
::
ArrayHandle
<
vtkm
::
Vec
<
vtkm
::
UInt8
,
4
>>
temp
;
vtkm
::
cont
::
ColorTable
table
(
"cool to warm"
);
...
...
@@ -107,7 +116,7 @@ struct BenchRayTracing
{
vtkm
::
cont
::
Timer
<
VTKM_DEFAULT_DEVICE_ADAPTER_TAG
>
timer
;
RayCamera
.
CreateRays
(
Rays
,
Coords
);
RayCamera
.
CreateRays
(
Rays
,
Coords
.
GetBounds
()
);
Tracer
.
Render
(
Rays
);
return
timer
.
GetElapsedTime
();
...
...
benchmarking/Benchmarker.h
View file @
c062f2e2
...
...
@@ -326,7 +326,7 @@ public:
catch
(
std
::
exception
&
e
)
{
std
::
cout
<<
"
\n
"
<<
"An exception occuring during a benchmark:
\n\t
"
<<
e
.
what
()
<<
"
\n
"
<<
"An exception occur
r
ing during a benchmark:
\n\t
"
<<
e
.
what
()
<<
"
\n
"
<<
"Attempting to continue with remaining benchmarks...
\n\n
"
;
}
}
...
...
docs/changelog/0-sample-topic.md
0 → 100644
View file @
c062f2e2
# 0-sample-topic
This is a sample release note for the change in a topic.
Developers should add similar notes for each topic branch
making a noteworthy change. Each document should be named
and titled to match the topic name to avoid merge conflicts.
docs/changelog/1.3/release-notes.md
0 → 100644
View file @
c062f2e2
This diff is collapsed.
Click to expand it.
docs/changelog/add-float-version-functions-pi.md
deleted
100644 → 0
View file @
0fa73352
# Add float version operations for vtkm::Math Pi()
Now PI related functions are evalulated at compile time as constexpr functions.
It also removes the old static_cast
<T>
vtkm::Pi() usages with
template ones and fix several conversion warnings.
docs/changelog/add-unload-execution-resources-to-cellsets.md
deleted
100644 → 0
View file @
0fa73352
# Add a release resources API to CellSet and its derived classes
We now offer the ability to unload execution memory from CellSet and its derived
classes(CellSetExplicit, CellSetPermutation and CellSetStructured) using the ReleaseResourcesExecution.