...
 
Commits (4)
......@@ -87,6 +87,7 @@ target_include_directories(vtkm_compiler_flags INTERFACE
# vtkm_developer_flags is used ONLY BY libraries that are built as part of this
# repository
add_library(vtkm_developer_flags INTERFACE)
target_link_libraries(vtkm_developer_flags INTERFACE vtkm_compiler_flags)
# Additional warnings just for Clang 3.5+, and AppleClang 7+
# about failures to vectorize.
......@@ -121,7 +122,7 @@ elseif(VTKM_COMPILER_IS_ICC)
# Likewise to suppress failures about being unable to apply vectorization
# to loops, the #pragma warning(disable seems to not work so we add a
# a compile define.
target_compile_options(vtkm_developer_flags INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-wd1478 -wd13379>)
target_compile_definitions(vtkm_developer_flags INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-wd1478 -wd13379>)
elseif(VTKM_COMPILER_IS_GNU OR VTKM_COMPILER_IS_CLANG)
set(cxx_flags -Wall -Wno-long-long -Wcast-align -Wconversion -Wchar-subscripts -Wextra -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused-parameter -fno-common)
......
......@@ -53,13 +53,7 @@
#
#
if (CMAKE_VERSION VERSION_LESS "3.3")
message(FATAL_ERROR "VTK-m requires CMake 3.3+")
endif()
if("${CMAKE_GENERATOR}" MATCHES "Visual Studio" AND
CMAKE_VERSION VERSION_LESS "3.11")
message(FATAL_ERROR "VTK-m requires CMake 3.11+ when using the Visual Studio Generators")
endif()
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
@PACKAGE_INIT@
......
......@@ -18,39 +18,6 @@
## this software.
##============================================================================
#
function(vtkm_extract_real_library library real_library)
if(NOT UNIX)
set(${real_library} "${library}" PARENT_SCOPE)
return()
endif()
#Read in the first 4 bytes and see if they are the ELF magic number
set(_elf_magic "7f454c46")
file(READ ${library} _hex_data OFFSET 0 LIMIT 4 HEX)
if(_hex_data STREQUAL _elf_magic)
#we have opened a elf binary so this is what
#we should link too
set(${real_library} "${library}" PARENT_SCOPE)
return()
endif()
file(READ ${library} _data OFFSET 0 LIMIT 1024)
if("${_data}" MATCHES "INPUT \\(([^(]+)\\)")
#extract out the so name from REGEX MATCh command
set(_proper_so_name "${CMAKE_MATCH_1}")
#construct path to the real .so which is presumed to be in the same directory
#as the input file
get_filename_component(_so_dir "${library}" DIRECTORY)
set(${real_library} "${_so_dir}/${_proper_so_name}" PARENT_SCOPE)
else()
#unable to determine what this library is so just hope everything works
#add pass it unmodified.
set(${real_library} "${library}" PARENT_SCOPE)
endif()
endfunction()
if(VTKm_ENABLE_TBB AND NOT TARGET vtkm::tbb)
find_package(TBB REQUIRED)
......@@ -65,40 +32,28 @@ if(VTKm_ENABLE_TBB AND NOT TARGET vtkm::tbb)
set_target_properties(vtkm::tbb PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${TBB_INCLUDE_DIRS}")
if(EXISTS "${TBB_LIBRARY_RELEASE}")
vtkm_extract_real_library("${TBB_LIBRARY_RELEASE}" 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(TBB_LIBRARY_RELEASE)
set_property(TARGET vtkm::tbb APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(vtkm::tbb PROPERTIES IMPORTED_LOCATION_RELEASE "${TBB_LIBRARY_RELEASE}")
endif()
if(EXISTS "${TBB_LIBRARY_DEBUG}")
vtkm_extract_real_library("${TBB_LIBRARY_DEBUG}" real_path)
set_property(TARGET vtkm::tbb APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(vtkm::tbb PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION_DEBUG "${real_path}"
)
endif()
endif()
if(TBB_LIBRARY_DEBUG)
set_property(TARGET vtkm::tbb APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(vtkm::tbb PROPERTIES IMPORTED_LOCATION_DEBUG "${TBB_LIBRARY_DEBUG}")
endif()
if(NOT TBB_LIBRARY_RELEASE AND NOT TBB_LIBRARY_DEBUG)
set_property(TARGET vtkm::tbb APPEND PROPERTY IMPORTED_LOCATION "${TBB_LIBRARY}")
endif()
endif()
if(VTKm_ENABLE_OPENMP AND NOT TARGET vtkm::openmp)
cmake_minimum_required(VERSION 3.9...3.12 FATAL_ERROR)
find_package(OpenMP 4.0 REQUIRED COMPONENTS CXX QUIET)
add_library(vtkm::openmp INTERFACE IMPORTED GLOBAL)
if(OpenMP_CXX_FLAGS)
set_property(TARGET vtkm::openmp
APPEND PROPERTY INTERFACE_COMPILE_OPTIONS $<$<COMPILE_LANGUAGE:CXX>:${OpenMP_CXX_FLAGS}>)
if(VTKm_ENABLE_CUDA)
string(REPLACE ";" "," openmp_cuda_flags "-Xcompiler=${OpenMP_CXX_FLAGS}")
set_property(TARGET vtkm::openmp
APPEND PROPERTY INTERFACE_COMPILE_OPTIONS $<$<COMPILE_LANGUAGE:CUDA>:${openmp_cuda_flags}>)
endif()
set_target_properties(vtkm::openmp PROPERTIES
INTERFACE_COMPILE_OPTIONS "$<$<COMPILE_LANGUAGE:CXX>:${OpenMP_CXX_FLAGS}>")
endif()
if(OpenMP_CXX_LIBRARIES)
set_target_properties(vtkm::openmp PROPERTIES
......@@ -107,7 +62,7 @@ if(VTKm_ENABLE_OPENMP AND NOT TARGET vtkm::openmp)
endif()
if(VTKm_ENABLE_CUDA AND NOT TARGET vtkm::cuda)
cmake_minimum_required(VERSION 3.9...3.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
enable_language(CUDA)
#To work around https://gitlab.kitware.com/cmake/cmake/issues/17512
......@@ -133,27 +88,24 @@ if(VTKm_ENABLE_CUDA AND NOT TARGET vtkm::cuda)
if("x${CMAKE_CUDA_SIMULATE_ID}" STREQUAL "xMSVC")
get_filename_component(VTKM_CUDA_BIN_DIR "${CMAKE_CUDA_COMPILER}" DIRECTORY)
set_target_properties(vtkm::cuda PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${VTKM_CUDA_BIN_DIR}/../lib/x64/cudadevrt.lib"
INTERFACE_INCLUDE_DIRECTORIES "${VTKM_CUDA_BIN_DIR}/../include/"
)
set_property(TARGET vtkm::cuda APPEND PROPERTY IMPORTED_LOCATION "${VTKM_CUDA_BIN_DIR}/../lib/x64/cudadevrt.lib")
set_target_properties(vtkm::cuda PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${VTKM_CUDA_BIN_DIR}/../include/")
else()
list(GET CMAKE_CUDA_IMPLICIT_LINK_LIBRARIES 0 VTKM_CUDA_LIBRARY)
if(IS_ABSOLUTE "${VTKM_CUDA_LIBRARY}")
set_target_properties(vtkm::cuda PROPERTIES IMPORTED_LOCATION "${VTKM_CUDA_LIBRARY}")
set_property(TARGET vtkm::cuda APPEND PROPERTY IMPORTED_LOCATION "${VTKM_CUDA_LIBRARY}")
else()
find_library(cuda_lib
NAME ${VTKM_CUDA_LIBRARY}
PATHS ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES}
)
set(VTKM_CUDA_LIBRARY ${cuda_lib})
set_target_properties(vtkm::cuda PROPERTIES IMPORTED_LOCATION "${VTKM_CUDA_LIBRARY}")
set_property(TARGET vtkm::cuda APPEND PROPERTY IMPORTED_LOCATION "${VTKM_CUDA_LIBRARY}")
unset(cuda_lib CACHE)
endif()
set_target_properties(vtkm::cuda PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}")
endif()
......
......@@ -25,11 +25,11 @@
# If you want CUDA support, you will need to have CMake 3.9 on Linux/OSX.
# We require CMake 3.11 with the MSVC generator as the $<COMPILE_LANGUAGE:>
# generator expression is not supported on older versions.
cmake_minimum_required(VERSION 3.3...3.12)
cmake_minimum_required(VERSION 3.3)
project (VTKm)
if(${CMAKE_GENERATOR} MATCHES "Visual Studio")
cmake_minimum_required(VERSION 3.11...3.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.11 FATAL_ERROR)
endif()
# Update module path
......
......@@ -28,9 +28,6 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
# disable doxygen warning about not generating graph
".*warning: Included by graph for"
# Doxygen warns when creating output directory:
"Notice: Output directory.*does not exist. I have created it for you."
# disable doxygen warnings from CONTRIBUTING.md, CodingConventions.md.
# these files are really intended for Gitlab, hence we don't want to use
# doxygen tags in them.
......@@ -42,7 +39,4 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
# We explicitly only suppress specific worklets so we can see when new recursive
# worklets are added
"ptxas warning : Stack size for entry function.*NearestNeighborSearch3DWorklet.*"
"ptxas warning : Stack size for entry function.*BoundingIntervalHierarchy.*"
"ptxas warning : Stack size for entry function.*CoordinatesPortal.*"
"ptxas warning : Stack size for entry function.*CellRangesExtracter.*"
)
......@@ -64,13 +64,13 @@ VTK-m Requires:
+ MSVC 2015+
+ [CMake](http://www.cmake.org/download/)
+ CMake 3.3+ (for any build)
+ CMake 3.9+ (for CUDA build or OpenMP build)
+ CMake 3.9+ (for CUDA build)
+ CMake 3.11+ (for Visual Studio generator)
Optional dependencies are:
+ CUDA Device Adapter
+ [Cuda Toolkit 7.5+](https://developer.nvidia.com/cuda-toolkit)
+ [Cuda Toolkit 7+](https://developer.nvidia.com/cuda-toolkit)
+ TBB Device Adapter
+ [TBB](https://www.threadingbuildingblocks.org/)
+ OpenMP Device Adapter
......
......@@ -28,9 +28,10 @@
#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>
......@@ -66,18 +67,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.SetData(Coords.GetData(), Indices, field, NumberOfTriangles, range, bounds);
Tracer.SetField(field, range);
vtkm::cont::ArrayHandle<vtkm::Vec<vtkm::UInt8, 4>> temp;
vtkm::cont::ColorTable table("cool to warm");
......@@ -107,7 +114,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();
......
#Allow histogram filter to take custom types
By passing TypeList and StorageList type into FieldRangeGlobalCompute,
upstream users(VTK) can pass custom types into the histogram filter.
# Use the strong typed enums for vtkm::cont::Field
By doing so, the compiler would not convert these enums into `int`s
which can cause some unexpected behavior.
# Add a common API for CoordinateSystem to unload execution resources
We now offer the ability to unload execution memory from ArrayHandleVirtualCoordinate
and CoordinateSystem using the ReleaseResourcesExecution method.
......
......@@ -33,7 +33,6 @@ add_subdirectory(hello_world)
add_subdirectory(histogram)
add_subdirectory(isosurface)
add_subdirectory(multi_backend)
add_subdirectory(oscillator)
add_subdirectory(particle_advection)
add_subdirectory(temporal_advection)
add_subdirectory(redistribute_points)
......
......@@ -19,7 +19,7 @@
## this software.
##
##=============================================================================
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(Clipping CXX)
#Find the VTK-m package
......
......@@ -19,7 +19,7 @@
## this software.
##
##=============================================================================
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(ContourTree CXX)
#Find the VTK-m package
......
......@@ -19,7 +19,7 @@
## this software.
##
##=============================================================================
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(CosmoTools CXX)
#Find the VTK-m package
......
......@@ -19,7 +19,7 @@
## this software.
##
##=============================================================================
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(VTKmDemo CXX)
#Find the VTK-m package
......
......@@ -19,7 +19,7 @@
## this software.
##
##=============================================================================
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(GameOfLife CXX)
#Find the VTK-m package
......
......@@ -19,7 +19,7 @@
## this software.
##
##=============================================================================
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(HelloWorld CXX)
#Find the VTK-m package
......
......@@ -19,7 +19,7 @@
## this software.
##
##=============================================================================
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(Histogram CXX)
#Find the VTK-m package
......
......@@ -19,7 +19,7 @@
## this software.
##
##=============================================================================
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(IsoSurface CXX)
#Find the VTK-m package
......
......@@ -19,7 +19,7 @@
## this software.
##
##=============================================================================
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(MultiBackend CXX)
#Find the VTK-m package
......
......@@ -27,15 +27,15 @@
namespace
{
int determine_cuda_gpu_count()
vtkm::Id deterine_cuda_gpu_count()
{
int count = 0;
vtkm::Id count = 0;
#if defined(VTKM_ENABLE_CUDA)
int numberOfDevices = 0;
auto res = cudaGetDeviceCount(&numberOfDevices);
if (res == cudaSuccess)
{
count = numberOfDevices;
count = static_cast<vtkm::Id>(numberOfDevices);
}
#endif
return count;
......@@ -126,16 +126,16 @@ VTKM_CONT MultiDeviceGradient::MultiDeviceGradient()
if (runOnCuda)
{
std::cout << "adding cuda workers" << std::endl;
const int gpu_count = determine_cuda_gpu_count();
for (int i = 0; i < gpu_count; ++i)
const vtkm::Id gpu_count = deterine_cuda_gpu_count();
for (vtkm::Id i = 0; i < gpu_count; ++i)
{
//The number of workers per GPU is purely arbitrary currently,
//but in general we want multiple of them so we can overlap compute
//and transfer
this->Workers.emplace_back(std::bind(process_block_cuda, std::ref(this->Queue), i));
this->Workers.emplace_back(std::bind(process_block_cuda, std::ref(this->Queue), i));
this->Workers.emplace_back(std::bind(process_block_cuda, std::ref(this->Queue), i));
this->Workers.emplace_back(std::bind(process_block_cuda, std::ref(this->Queue), i));
this->Workers.emplace_back(process_block_cuda, std::ref(this->Queue), i);
this->Workers.emplace_back(process_block_cuda, std::ref(this->Queue), i);
this->Workers.emplace_back(process_block_cuda, std::ref(this->Queue), i);
this->Workers.emplace_back(process_block_cuda, std::ref(this->Queue), i);
}
}
//Step 3. Launch a worker that will use tbb (if enabled).
......@@ -144,7 +144,7 @@ VTKM_CONT MultiDeviceGradient::MultiDeviceGradient()
else if (runOnTbb)
{
std::cout << "adding a tbb worker" << std::endl;
this->Workers.emplace_back(std::bind(process_block_tbb, std::ref(this->Queue)));
this->Workers.emplace_back(process_block_tbb, std::ref(this->Queue));
}
}
......@@ -174,7 +174,7 @@ inline VTKM_CONT vtkm::cont::MultiBlock MultiDeviceGradient::PrepareForExecution
//Step 2. Construct the multi-block we are going to fill. The size signature
//to MultiBlock just reserves size
vtkm::cont::MultiBlock output;
output.AddBlocks(std::vector<vtkm::cont::DataSet>(static_cast<size_t>(mb.GetNumberOfBlocks())));
output.AddBlocks(std::vector<vtkm::cont::DataSet>(mb.GetNumberOfBlocks()));
vtkm::cont::MultiBlock* outPtr = &output;
......
......@@ -19,7 +19,7 @@
## this software.
##
##=============================================================================
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(ParticleAdvection CXX)
#Find the VTK-m package
......
......@@ -19,7 +19,7 @@
## this software.
##
##=============================================================================
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(RedistributePoints CXX)
#Find the VTK-m package
......
......@@ -19,7 +19,7 @@
## this software.
##
##=============================================================================
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(RenderingExample CXX)
#Find the VTK-m package
......
......@@ -19,7 +19,7 @@
## this software.
##
##=============================================================================
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(Streamline CXX)
#Find the VTK-m package
......
......@@ -19,7 +19,7 @@
## this software.
##
##=============================================================================
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(TauTiming CXX)
#Find the VTK-m package
......
......@@ -21,7 +21,7 @@
##=============================================================================
#Find the VTK-m package
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(TemporalAdvection CXX)
#Find the VTK-m package
......
......@@ -19,7 +19,7 @@
## this software.
##
##=============================================================================
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(Tetrahedra CXX)
#Find the VTK-m package
......
......@@ -19,7 +19,7 @@
## this software.
##
##=============================================================================
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(UnifiedMemory CXX)
#Find the VTK-m package
......
#ifndef OLEGINCLUDE
#define OLEGINCLUDE
//everything is for debug purposes only; remove this file before pushing anything
#define DBGMSG(_msg) (std::cout << _msg << "\n")
#define DBGVAR(_var) (std::cout << #_var << ": " << _var << "\n")
#endif
\ No newline at end of file
......@@ -35,7 +35,6 @@ set(headers
CellShape.h
CellTraits.h
Flags.h
Geometry.h
Hash.h
ImplicitFunction.h
ListTag.h
......@@ -61,20 +60,11 @@ set(headers
VecVariable.h
VirtualObjectBase.h
UnaryPredicates.h
)
set(template_sources
Geometry.hxx
)
)
vtkm_pyexpander_generated_file(Math.h)
vtkm_declare_headers(
${headers}
${template_sources}
EXCLUDE_FROM_TESTING
${template_sources}
)
vtkm_declare_headers(${headers})
#-----------------------------------------------------------------------------
#first add all the components vtkm that are shared between control and exec
......
......@@ -73,22 +73,6 @@ struct ListTagJoin : detail::ListRoot
using list = typename detail::ListJoin<typename ListTag1::list, typename ListTag2::list>::type;
};
/// A tag that is constructed by appending \c Type to \c ListTag.
template <typename ListTag, typename Type>
struct ListTagAppend : detail::ListRoot
{
using list = typename detail::ListJoin<typename ListTag::list, detail::ListBase<Type>>::type;
};
/// Append \c Type to \c ListTag only if \c ListTag does not already contain \c Type.
/// No checks are performed to see if \c ListTag itself has only unqiue elements.
template <typename ListTag, typename Type>
struct ListTagAppendUnique : detail::ListRoot
{
using list = typename detail::ListAppendUniqueImpl<typename ListTag::list, Type>::type;
};
/// A tag that consists of elements that are found in both tags. This struct
/// can be subclassed and still behave like a list tag.
template <typename ListTag1, typename ListTag2>
......
......@@ -1815,18 +1815,6 @@ static inline VTKM_EXEC_CONT T Min(const T& x, const T& y)
return detail::Min(x, y, typename vtkm::TypeTraits<T>::DimensionalityTag());
}
/// Clamp \p x to the given range.
///
inline VTKM_EXEC_CONT vtkm::Float32 Clamp(vtkm::Float32 x, vtkm::Float32 lo, vtkm::Float32 hi)
{
return x > lo ? (x < hi ? x : hi) : lo;
}
inline VTKM_EXEC_CONT vtkm::Float64 Clamp(vtkm::Float64 x, vtkm::Float64 lo, vtkm::Float64 hi)
{
return x > lo ? (x < hi ? x : hi) : lo;
}
//-----------------------------------------------------------------------------
//#ifdef VTKM_CUDA
......
......@@ -637,18 +637,6 @@ static inline VTKM_EXEC_CONT T Min(const T& x, const T& y)
return detail::Min(x, y, typename vtkm::TypeTraits<T>::DimensionalityTag());
}
/// Clamp \p x to the given range.
///
inline VTKM_EXEC_CONT vtkm::Float32 Clamp(vtkm::Float32 x, vtkm::Float32 lo, vtkm::Float32 hi)
{
return x > lo ? (x < hi ? x : hi) : lo;
}
inline VTKM_EXEC_CONT vtkm::Float64 Clamp(vtkm::Float64 x, vtkm::Float64 lo, vtkm::Float64 hi)
{
return x > lo ? (x < hi ? x : hi) : lo;
}
//-----------------------------------------------------------------------------
//#ifdef VTKM_CUDA
......
......@@ -601,4 +601,35 @@ VTKM_EXEC_CONT bool operator!=(const vtkm::Matrix<T, NumRow, NumCol>& a,
return !(a == b);
}
/// Computes a 4x4 matrix appropriate for rotation around an axis by a given
/// angle (in radians).
///
template <typename T>
VTKM_EXEC_CONT vtkm::Matrix<T, 4, 4> rotationMatrix(vtkm::Vec<T, 3> axis, T angle)
{ //By Neil Mendoza: http://www.neilmendoza.com/glsl-rotation-about-an-arbitrary-axis/
Normalize(axis);
T s = sin(angle);
T c = cos(angle);
T oc = 1.f - c;
vtkm::Matrix<T, 4, 4> retMatrix(0.f);
retMatrix[0][0] = oc * axis[0] * axis[0] + c;
retMatrix[1][0] = oc * axis[0] * axis[1] - axis[2] * s;
retMatrix[2][0] = oc * axis[2] * axis[0] + axis[1] * s;
// retMatrix[0][3] = ;
retMatrix[0][1] = oc * axis[0] * axis[1] + axis[2] * s;
retMatrix[1][1] = oc * axis[1] * axis[1] + c;
retMatrix[2][1] = oc * axis[1] * axis[2] - axis[0] * s;
// retMatrix[1][3] = ;
retMatrix[0][2] = oc * axis[2] * axis[0] - axis[1] * s;
retMatrix[1][2] = oc * axis[1] * axis[2] + axis[0] * s;
retMatrix[2][2] = oc * axis[2] * axis[2] + c;
// retMatrix[2][3] = ;
// retMatrix[3][0] = ;
// retMatrix[3][1] = ;
// retMatrix[3][2] = ;
retMatrix[3][3] = 1.f;
return retMatrix;
}
#endif //vtk_m_Matrix_h
......@@ -73,16 +73,6 @@ struct Pair
{
}
VTKM_EXEC_CONT
Pair(FirstType&& firstSrc, SecondType&& secondSrc)
: first(std::move(firstSrc))
, second(std::move(secondSrc))
{
}
Pair(const Pair&) = default;
Pair(Pair&&) = default;
template <typename U1, typename U2>
VTKM_EXEC_CONT Pair(const vtkm::Pair<U1, U2>& src)
: first(src.first)
......@@ -90,13 +80,6 @@ struct Pair
{
}
template <typename U1, typename U2>
VTKM_EXEC_CONT Pair(vtkm::Pair<U1, U2>&& src)
: first(std::move(src.first))
, second(std::move(src.second))
{
}
template <typename U1, typename U2>
VTKM_EXEC_CONT Pair(const std::pair<U1, U2>& src)
: first(src.first)
......@@ -104,16 +87,8 @@ struct Pair
{
}
template <typename U1, typename U2>
VTKM_EXEC_CONT Pair(std::pair<U1, U2>&& src)
: first(std::move(src.first))
, second(std::move(src.second))
{
}
vtkm::Pair<FirstType, SecondType>& operator=(const vtkm::Pair<FirstType, SecondType>& src) =
default;
vtkm::Pair<FirstType, SecondType>& operator=(vtkm::Pair<FirstType, SecondType>&& src) = default;
VTKM_EXEC_CONT
bool operator==(const vtkm::Pair<FirstType, SecondType>& other) const
......@@ -166,15 +141,9 @@ VTKM_EXEC_CONT vtkm::Pair<T, U> operator+(const vtkm::Pair<T, U>& a, const vtkm:
}
template <typename T1, typename T2>
VTKM_EXEC_CONT vtkm::Pair<typename std::decay<T1>::type, typename std::decay<T2>::type> make_Pair(
T1&& v1,
T2&& v2)
VTKM_EXEC_CONT vtkm::Pair<T1, T2> make_Pair(const T1& firstSrc, const T2& secondSrc)
{
using DT1 = typename std::decay<T1>::type;
using DT2 = typename std::decay<T2>::type;
using PairT = vtkm::Pair<DT1, DT2>;
return PairT(std::forward<T1>(v1), std::forward<T2>(v2));
return vtkm::Pair<T1, T2>(firstSrc, secondSrc);
}
} // namespace vtkm
......
......@@ -92,19 +92,6 @@ struct TypeListTagFieldVec4
{
};
/// A list containing common types for floating-point vectors. Specifically contains
/// floating point vectors of size 2, 3, and 4 with floating point components.
/// Scalars are not included.
///
struct TypeListTagFloatVec : vtkm::ListTagBase<vtkm::Vec<vtkm::Float32, 2>,
vtkm::Vec<vtkm::Float64, 2>,
vtkm::Vec<vtkm::Float32, 3>,
vtkm::Vec<vtkm::Float64, 3>,
vtkm::Vec<vtkm::Float32, 4>,
vtkm::Vec<vtkm::Float64, 4>>
{
};
/// A list containing common types for values in fields. Specifically contains
/// floating point scalars and vectors of size 2, 3, and 4 with floating point
/// components.
......
......@@ -613,12 +613,11 @@ public:
using ComponentType = T;
static constexpr vtkm::IdComponent NUM_COMPONENTS = Size;
protected:
VecBase() = default;
// The enable_if predicate will disable this constructor for Size=1 so that
// the variadic constructor constexpr VecBase(T, Ts&&...) is called instead.
template <vtkm::IdComponent Size2 = Size, typename std::enable_if<Size2 != 1, int>::type = 0>
VTKM_EXEC_CONT explicit VecBase(const ComponentType& value)
VTKM_EXEC_CONT
explicit VecBase(const ComponentType& value)
{
for (vtkm::IdComponent i = 0; i < Size; ++i)
{
......@@ -626,13 +625,6 @@ public:
}
}
template <typename... Ts>
VTKM_EXEC_CONT constexpr VecBase(ComponentType value0, Ts&&... values)
: Components{ value0, values... }
{
VTKM_STATIC_ASSERT(sizeof...(Ts) + 1 == Size);
}
VTKM_EXEC_CONT
VecBase(std::initializer_list<ComponentType> values)
{
......@@ -820,15 +812,21 @@ public:
static constexpr vtkm::IdComponent NUM_COMPONENTS = Size;
#endif
using Superclass::Superclass;
Vec() = default;
#if defined(_MSC_VER) && _MSC_VER < 1910
template <typename... Ts>
constexpr Vec(T value, Ts&&... values)
: Superclass(value, std::forward<Ts>(values)...)
VTKM_EXEC_CONT explicit Vec(const T& value)
: Superclass(value)
{
}
VTKM_EXEC_CONT Vec(std::initializer_list<T> values)
: Superclass(values)
{
}
template <typename OtherType>
VTKM_EXEC_CONT explicit Vec(const Vec<OtherType, Size>& src)
: Superclass(src)
{
}
#endif
inline VTKM_EXEC_CONT void CopyInto(Vec<T, Size>& dest) const { dest = *this; }
};
......@@ -878,10 +876,14 @@ class VTKM_ALWAYS_EXPORT Vec<T, 1> : public detail::VecBase<T, 1, Vec<T, 1>>
public:
Vec() = default;
VTKM_EXEC_CONT constexpr Vec(const T& value)
VTKM_EXEC_CONT explicit Vec(const T& value)
: Superclass(value)
{
}
VTKM_EXEC_CONT Vec(std::initializer_list<T> values)
: Superclass(values)
{
}
template <typename OtherType>
VTKM_EXEC_CONT Vec(const Vec<OtherType, 1>& src)
......@@ -900,10 +902,14 @@ class VTKM_ALWAYS_EXPORT Vec<T, 2> : public detail::VecBase<T, 2, Vec<T, 2>>
public:
Vec() = default;
VTKM_EXEC_CONT Vec(const T& value)
VTKM_EXEC_CONT explicit Vec(const T& value)
: Superclass(value)
{
}
VTKM_EXEC_CONT Vec(std::initializer_list<T> values)
: Superclass(values)
{
}
template <typename OtherType>
VTKM_EXEC_CONT Vec(const Vec<OtherType, 2>& src)
......@@ -912,9 +918,10 @@ public:
}
VTKM_EXEC_CONT
constexpr Vec(const T& x, const T& y)
: Superclass(x, y)
Vec(const T& x, const T& y)
{
this->Components[0] = x;
this->Components[1] = y;
}
};
......@@ -928,10 +935,14 @@ class VTKM_ALWAYS_EXPORT Vec<T, 3> : public detail::VecBase<T, 3, Vec<T, 3>>
public:
Vec() = default;
VTKM_EXEC_CONT Vec(const T& value)
VTKM_EXEC_CONT explicit Vec(const T& value)
: Superclass(value)
{
}
VTKM_EXEC_CONT Vec(std::initializer_list<T> values)
: Superclass(values)
{
}
template <typename OtherType>
VTKM_EXEC_CONT Vec(const Vec<OtherType, 3>& src)
......@@ -940,9 +951,11 @@ public:
}
VTKM_EXEC_CONT
constexpr Vec(const T& x, const T& y, const T& z)
: Superclass(x, y, z)
Vec(const T& x, const T& y, const T& z)
{
this->Components[0] = x;
this->Components[1] = y;
this->Components[2] = z;
}
};
......@@ -957,10 +970,14 @@ class VTKM_ALWAYS_EXPORT Vec<T, 4> : public detail::VecBase<T, 4, Vec<T, 4>>
public:
Vec() = default;
VTKM_EXEC_CONT Vec(const T& value)
VTKM_EXEC_CONT explicit Vec(const T& value)
: Superclass(value)
{
}
VTKM_EXEC_CONT Vec(std::initializer_list<T> values)
: Superclass(values)
{
}
template <typename OtherType>
VTKM_EXEC_CONT Vec(const Vec<OtherType, 4>& src)
......@@ -969,20 +986,31 @@ public:
}
VTKM_EXEC_CONT
constexpr Vec(const T& x, const T& y, const T& z, const T& w)
: Superclass(x, y, z, w)
Vec(const T& x, const T& y, const T& z, const T& w)
{
this->Components[0] = x;
this->Components[1] = y;
this->Components[2] = z;
this->Components[3] = w;
}
};
/// Initializes and returns a Vec initialized by the given intializer_list. Due to limitations in
/// C++11, you also have to specify the length of the Vec.
///
template <vtkm::IdComponent Size, typename T>
VTKM_EXEC_CONT vtkm::Vec<T, Size> make_Vec(std::initializer_list<T> values)
{
return vtkm::Vec<T, Size>(values);
}
/// Initializes and returns a Vec containing all the arguments. The arguments should all be the
/// same type or compile issues will occur.
///
template <typename T, typename... Ts>
VTKM_EXEC_CONT constexpr vtkm::Vec<T, vtkm::IdComponent(sizeof...(Ts) + 1)> make_Vec(T value0,
Ts&&... args)
VTKM_EXEC_CONT vtkm::Vec<T, vtkm::IdComponent(sizeof...(Ts)) + 1> make_Vec(const T& value0, const Ts&... values)
{
return vtkm::Vec<T, vtkm::IdComponent(sizeof...(Ts) + 1)>(value0, T(args)...);
return vtkm::Vec<T, vtkm::IdComponent(sizeof...(Ts)) + 1>({ value0, values... });
}
/// \brief A Vec-like representation for short arrays.
......
......@@ -209,81 +209,73 @@ TriangleNormal(const vtkm::Vec<T, 3>& a, const vtkm::Vec<T, 3>& b, const vtkm::V
}
//-----------------------------------------------------------------------------
/// \brief Project a vector onto another vector.
/// \brief Calculate the reflection direction of an incident vector.
///
/// This method computes the orthogonal projection of the vector v onto u;
/// that is, it projects its first argument onto its second.
/// Given an incident vector I and surface normal N, return the reflection
/// direction calculated as I - 2*dot(N, I) * N
///
/// Note that if the vector \a u has zero length, the output
/// vector will have all its entries equal to NaN.
template <typename T, int N>
VTKM_EXEC_CONT vtkm::Vec<T, N> Project(const vtkm::Vec<T, N>& v, const vtkm::Vec<T, N>& u)
template <typename T, vtkm::IdComponent Size>
VTKM_EXEC_CONT vtkm::Vec<typename detail::FloatingPointReturnType<T>::Type, Size>
Reflect(const vtkm::Vec<T, Size> &I, const vtkm::Vec<T, Size> &N)
{
T uu = vtkm::Dot(u, u);
T uv = vtkm::Dot(u, v);
T factor = uv / uu;
vtkm::Vec<T, N> result = factor * u;
return result;
return I - 2.f * vtkm::Dot(N, I) * N;
}
//-----------------------------------------------------------------------------
/// \brief Project a vector onto another vector, returning only the projected distance.
/// \brief Calculate the refraction direction of an incident vector.
///
/// This method computes the orthogonal projection of the vector v onto u;
/// that is, it projects its first argument onto its second.
/// Given an incident vector I, surface normal N, and ratio of indices of
/// refraction eta, calculate the refraction vector R. Calculated as:
/// k = 1 - eta^2 * (1 - dot(N, I)^2)
/// if (k >= 0) R = eta * I - (eta * dot(N, I) + sqrt(k)) * N
/// else R = 0
///
/// Note that if the vector \a u has zero length, the output will be NaN.
template <typename T, int N>
VTKM_EXEC_CONT T ProjectedDistance(const vtkm::Vec<T, N>& v, const vtkm::Vec<T, N>& u)
template <typename T, vtkm::IdComponent Size>
VTKM_EXEC_CONT vtkm::Vec<typename detail::FloatingPointReturnType<T>::Type, Size>
Refract(const vtkm::Vec<T, Size> &I, const vtkm::Vec<T, Size> &N, T eta)
{
T uu = vtkm::Dot(u, u);
T uv = vtkm::Dot(u, v);
T factor = uv / uu;
return factor;
T dotNI = vtkm::Dot(N, I);
T k = 1.f - eta*eta*(1.f - dotNI*dotNI);
if (k < 0.f)
{
return vtkm::Vec<T, Size>(0.f);
}
return eta * I - (eta * dotNI + vtkm::Sqrt(k)) * N;
}
//-----------------------------------------------------------------------------
/// \brief Perform Gram-Schmidt orthonormalization for 3-D vectors.
///
/// See https://en.wikipedia.org/wiki/Gram%E2%80%93Schmidt_process for details.
/// The first output vector will always be parallel to the first input vector.
/// The remaining output vectors will be orthogonal and unit length and have
/// the same handedness as their corresponding input vectors.
///
/// This method is geometric.
/// It does not require a matrix solver.
/// However, unlike the algebraic eigensolver techniques which do use matrix
/// inversion, this method may return zero-length output vectors if some input
/// vectors are collinear. The number of non-zero (to within the specified
/// tolerance, \a tol ) output vectors is the return value.
template <typename T, int N>
VTKM_EXEC_CONT int Orthonormalize(const vtkm::Vec<vtkm::Vec<T, N>, N>& inputs,
vtkm::Vec<vtkm::Vec<T, N>, N>& outputs,
T tol = static_cast<T>(1e-6))
/// \brief Convert a vector from spherical coordinates to cartesian.
///
///
template <typename T>
VTKM_EXEC vtkm::Vec<T, 3> SphereToCart(vtkm::Vec<T, 3> sphere)
{
int j = 0; // j is the number of non-zero-length, non-collinear inputs encountered.
vtkm::Vec<vtkm::Vec<T, N>, N> u;
for (int i = 0; i < N; ++i)
{
u[j] = inputs[i];
for (int k = 0; k < j; ++k)
{
u[j] -= vtkm::Project(inputs[i], u[k]);
}
T rmag = vtkm::RMagnitude(u[j]);
if (rmag * tol > 1.0)
{
// skip this vector, it is zero-length or collinear with others.
continue;
}
outputs[j] = rmag * u[j];
++j;
}
for (int i = j; i < N; ++i)
{
outputs[j] = Vec<T, N>{ 0. };
}
return j;
T r = sphere[0];
T theta = sphere[1];
T phi = sphere[2];
T x = r * sin(theta) * cos(phi);
T y = r * sin(theta) * sin(phi);
T z = r * cos(theta);
// return vtkm::Vec<T, 3>(x,y,z);
return vtkm::Vec<T, 3>(x,z,y);
}
//-----------------------------------------------------------------------------
/// \brief Convert a vector from cartesian coordinates to spherical.
///
///
template <typename T>
VTKM_EXEC vtkm::Vec<T, 3> CartToSphere(vtkm::Vec<T, 3> cart)
{
T x = cart[0];
T y = cart[2];
T z = cart[1];
T r = vtkm::Sqrt(x*x + y*y + z*z);
T theta = acos(z / r);
T phi = atan(y, x);
return vtkm::Vec<T, 3>(r,theta,phi);
}
} // namespace vtkm
......
This diff is collapsed.
......@@ -82,18 +82,21 @@ struct IsInValidArrayHandle
{
};
/// Checks to see if the ArrayHandle allows
/// Checks to see if the ArrayHandle for the given DeviceAdatper allows
/// writing, as some ArrayHandles (Implicit) don't support writing.
/// This check is compatible with the C++11 type_traits.
/// It contains a typedef named type that is either
/// std::true_type or std::false_type.
/// Both of these have a typedef named value with the respective boolean value.
///
template <typename ArrayHandle>
template <typename ArrayHandle, typename DeviceAdapterTag>
struct IsWriteableArrayHandle
{
private:
using ValueType = typename ArrayHandle::PortalControl::ValueType;
template <typename T>
using ExecutionTypes = typename ArrayHandle::template ExecutionTypes<T>;
using ValueType = typename ExecutionTypes<DeviceAdapterTag>::Portal::ValueType;
//All ArrayHandles that use ImplicitStorage as the final writable location
//will have a value type of void*, which is what we are trying to detect
......@@ -120,8 +123,7 @@ public:
template <typename T>
struct ArrayHandleCheck
{
using U = typename std::remove_pointer<T>::type;
using type = typename std::is_base_of<::vtkm::cont::internal::ArrayHandleBase, U>::type;
using type = typename std::is_base_of<::vtkm::cont::internal::ArrayHandleBase, T>::type;
};
#define VTKM_IS_ARRAY_HANDLE(T) \
......
......@@ -388,7 +388,7 @@ VTKM_CONT ArrayHandleSwizzle<ArrayHandleType, OutSize> make_ArrayHandleSwizzle(
}
template <typename ArrayHandleType, typename... SwizzleIndexTypes>
VTKM_CONT ArrayHandleSwizzle<ArrayHandleType, vtkm::IdComponent(sizeof...(SwizzleIndexTypes) + 1)>
VTKM_CONT ArrayHandleSwizzle<ArrayHandleType, vtkm::IdComponent(sizeof...(SwizzleIndexTypes)) + 1>
make_ArrayHandleSwizzle(const ArrayHandleType& array,
vtkm::IdComponent swizzleIndex0,
SwizzleIndexTypes... swizzleIndices)
......
......@@ -46,13 +46,9 @@ set(headers
ArrayHandleConcatenate.h
ArrayRangeCompute.h
AssignerMultiBlock.h
AtomicArray.h
BoundingIntervalHierarchyNode.h
BoundingIntervalHierarchy.h
BoundsCompute.h
BoundsGlobalCompute.h
CellLocator.h
CellLocatorHelper.h
CellLocatorTwoLevelUniformGrid.h
CellSet.h
CellSetExplicit.h
......@@ -88,7 +84,6 @@ set(headers
FieldRangeGlobalCompute.h
ImplicitFunctionHandle.h
MultiBlock.h
PointLocator.h
PointLocatorUniformGrid.h
RuntimeDeviceInformation.h
RuntimeDeviceTracker.h
......@@ -104,7 +99,6 @@ set(headers
set(template_sources
ArrayHandle.hxx
ArrayRangeCompute.hxx
BoundingIntervalHierarchy.hxx
CellSetExplicit.hxx
CellSetStructured.hxx
CoordinateSystem.hxx
......@@ -120,7 +114,6 @@ set(sources
BoundsGlobalCompute.cxx
CellSet.cxx
CellSetStructured.cxx
DataSet.cxx
DataSetBuilderExplicit.cxx
DataSetBuilderRectilinear.cxx
DataSetBuilderUniform.cxx
......@@ -129,14 +122,11 @@ set(sources
Field.cxx
FieldRangeCompute.cxx
FieldRangeGlobalCompute.cxx
internal/ArrayHandleBasicImpl.cxx
internal/ArrayManagerExecutionShareWithControl.cxx
internal/SimplePolymorphicContainer.cxx
MultiBlock.cxx
internal/ArrayManagerExecutionShareWithControl.cxx
internal/ArrayHandleBasicImpl.cxx
PresetColorTables.cxx
RuntimeDeviceTracker.cxx
StorageBasic.cxx
TryExecute.cxx
)
# This list of sources has code that uses devices and so might need to be
......@@ -146,6 +136,10 @@ set(device_sources
CellSetExplicit.cxx
ColorTable.cxx
CoordinateSystem.cxx
DataSet.cxx
MultiBlock.cxx
RuntimeDeviceTracker.cxx
TryExecute.cxx
)
#-----------------------------------------------------------------------------
......
......@@ -20,74 +20,139 @@
#ifndef vtk_m_cont_CellLocator_h
#define vtk_m_cont_CellLocator_h
#include <vtkm/Types.h>
#include <vtkm/cont/CoordinateSystem.h>
#include <vtkm/cont/DeviceAdapter.h>
#include <vtkm/cont/DynamicCellSet.h>
#include <vtkm/cont/ExecutionObjectBase.h>
#include <vtkm/exec/CellLocator.h>
#include <vtkm/cont/CellLocatorTwoLevelUniformGrid.h>
#include <vtkm/exec/ParametricCoordinates.h>
namespace vtkm
{
namespace cont
{
class CellLocator : public vtkm::cont::ExecutionObjectBase
class CellLocator
{
private:
using HandleType = vtkm::cont::VirtualObjectHandle<vtkm::exec::CellLocator>;
using StructuredCellSetList = vtkm::ListTagBase<vtkm::cont::CellSetStructured<1>,
vtkm::cont::CellSetStructured<2>,
vtkm::cont::CellSetStructured<3>>;
public:
CellLocator()
: Dirty(true)
VTKM_CONT static bool IsUniformGrid(const vtkm::cont::DynamicCellSet& cellset,
const vtkm::cont::CoordinateSystem& coordinates)
{
return coordinates.GetData().IsType<vtkm::cont::ArrayHandleUniformPointCoordinates>() &&
(cellset.IsType<vtkm::cont::CellSetStructured<1>>() ||
cellset.IsType<vtkm::cont::CellSetStructured<2>>() ||
cellset.IsType<vtkm::cont::CellSetStructured<3>>());
}
vtkm::cont::DynamicCellSet GetCellSet() const { return CellSet; }
void SetCellSet(const vtkm::cont::DynamicCellSet& cellSet)
{
CellSet = cellSet;
SetDirty();
}
public:
void SetCellSet(const vtkm::cont::DynamicCellSet& cellset) { this->CellSet = cellset; }
const vtkm::cont::DynamicCellSet& GetCellSet() const { return this->CellSet; }
vtkm::cont::CoordinateSystem GetCoordinates() const { return Coords; }
void SetCoordinates(const vtkm::cont::CoordinateSystem& coords) { this->Coordinates = coords; }
const vtkm::cont::CoordinateSystem& GetCoordinates() const { return this->Coordinates; }
void SetCoordinates(const vtkm::cont::CoordinateSystem& coords)
/// Builds the cell locator lookup structure
///
template <typename DeviceAdapter, typename CellSetList = VTKM_DEFAULT_CELL_SET_LIST_TAG>
void Build(DeviceAdapter device, CellSetList cellSetTypes = CellSetList())
{
Coords = coords;
SetDirty();
if (IsUniformGrid(this->CellSet, this->Coordinates))
{
// nothing to build for uniform grid
}
else
{
this->Locator.SetCellSet(</