Commit Graph

41 Commits

Author SHA1 Message Date
Kenneth Moreland
cb3bb43ff9 Completely deprecate virtual methods
Deprecate `VirtualObjectHandle` and all other classes that are used to
implement objects with virtual methods in the execution environment.

Additionally, the code is updated so that if the
`VTKm_NO_DEPRECATED_VIRTUAL` flag is set none of the code is compiled at
all. This opens us up to opportunities that do not work with virtual
methods such as backends that do not support virtual methods and dynamic
libraries for CUDA.
2021-04-28 07:28:32 -06:00
Kenneth Moreland
b012c42beb Rename CellLocatorUniformBins to CellLocatorTwoLevel
The new name is more descriptive and prevents confusion with
CellLocatorUniformGrid.
2020-09-21 15:42:47 -06:00
Kenneth Moreland
c9b763aca9 Rename PointLocatorUniformGrid to PointLocatorSparseGrid
The new name reflects better what the underlying algorithm does. It also
helps prevent confusion about what types of data the locator is good
for. The old name suggested it only worked for structured grids, which
is not the case.
2020-09-21 15:42:41 -06:00
Kenneth Moreland
63ef84ed78 Optionally remove all use of ArrayHandleVirtual
As we remove more and more virtual methods from VTK-m, I expect several
users will be interested in completely removing them from the build for
several reasons.

1. They may be compiling for hardware that does not support virtual
methods.
2. They may need to compile for CUDA but need shared libraries.
3. It should go a bit faster.

To enable this, a CMake option named `VTKm_NO_DEPRECATED_VIRTUAL` is
added. It defaults to `OFF`. But when it is `ON`, none of the code that
both uses virtuals and is deprecated will be built.

Currently, only `ArrayHandleVirtual` is deprecated, so the rest of the
virtual classes will still be built. As we move forward, more will be
removed until all virtual method functionality is removed.
2020-09-04 22:52:45 -06:00
Kenneth Moreland
ed41874cc8 Consolidate tests for base vtkm code that is device-specific
Some of the code in the base `vtkm` namespace is device specific. For
example, the functions in `Math.h` are customized for specific devices.
Thus, we want this code to be specially compiled and run on these
devices.

Previously, we made a header file and then added separate tests to each
device package. That was created before we had ways of running on any
device. Now, it is much easier to compile the test a single time for all
devices and use the `ALL_BACKENDS` feature of `vtkm_unit_tests` CMake
function to automatically create the test for all devices.
2020-08-18 14:30:25 -06:00
Kenneth Moreland
92db376236 Convert uses of ListTagBase to List 2019-12-06 15:37:46 -07:00
Robert Maynard
5c56ff945f Label tests which exercise a given Device Adapter
This allows developers an easy way to run all OpenMP tests
2019-09-13 15:52:40 -04:00
Kenneth Moreland
5e23853521 Create ArrayHandleMultiplexer 2019-07-22 08:36:28 -06:00
Mark Kim
6e1d3a84f0 First Extrude commit.
how did any of this work?

match other CellSet file layouts.

???

compile in CUDA.

unit tests.

also only serial.

make error message accurate

Well, this compiles and works now.

Did it ever?

use CellShapeTagGeneric

UnitTest matches previous changes.

whoops

Fix linking problems.

Need the same interface

as other ThreadIndices.

add filter test

okay, let's try duplicating CellSetStructure.

okay

inching...

change to wedge in CellSetListTag

Means changing these to support it.

switch back to wedge from generic

compiles and runs

remove ExtrudedType

need vtkm_worklet

vtkm_worklet needs to be included

fix segment count for wedge specialization

need to actually save the index

for the other constructor.

specialize on Explicit

clean up warning

angled brackets not quotes.

formatting
2019-06-20 22:17:24 -04:00
Robert Maynard
4020f51988 RuntimeDeviceTracker can't be copied and is only accessible via reference.
As the RuntimeDeviceTracker is a per thread construct we now make
it explicit that you can only get a reference to the per-thread
version and can't copy it.
2019-05-20 11:43:05 -04:00
Robert Maynard
ff687016ee For VTK-m libs all includes of DeviceAdapterTagCuda happen from cuda files
It is very easy to cause ODR violations with DeviceAdapterTagCuda.
If you include that header from a C++ file and a CUDA file inside
the same program we an ODR violation. The reasons is that the C++
versions will say the tag is invalid, and the CUDA will say the
tag is valid.

The solution to this is that any compilation unit that includes
DeviceAdapterTagCuda from a version of VTK-m that has CUDA enabled
must be invoked by the cuda compiler.
2019-04-22 10:39:54 -04:00
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Robert Maynard
ff30684c8e Removes the default device macros from VTK-m
Fixes #116
2019-04-15 08:15:36 -04:00
Allison Vacanti
56cc5c3d3a Add support for BitFields.
BitFields are:
- Stored in memory using a contiguous buffer of bits.
- Accessible via portals, a la ArrayHandle.
- Portals operate on individual bits or words.
- Operations may be atomic for safe use from concurrent kernels.

The new BitFieldToUnorderedSet device algorithm produces an ArrayHandle
containing the indices of all set bits, in no particular order.

The new AtomicInterface classes provide an abstraction into bitwise
atomic operations across control and execution environments and are used
to implement the BitPortals.
2019-04-11 08:27:17 -04:00
Sujin Philip
c6bead8388 Rename CellLocatorTwoLevelUniformGrid to CellLocatorUniformBins
Also make it a concrete sub-class of vtkm::cont::CellLocator
Fixes issue #251
2019-04-03 10:21:56 -04:00
Robert Maynard
ae11e115a0 RuntimeDeviceTracker: Remove Global from names 2019-03-22 08:53:26 -07:00
Robert Maynard
d6f66d17a3 Testing run methods now take argc/argv to init logging/runtime device
`vtkm::cont::testing` now initializes with logging enabled and support
for device being passed on the command line, `vtkm::testing` only
enables logging.
2019-01-17 13:16:27 -06:00
ayenpure
62ee1a2c8a Updates to the Cell Locators
- Adding updates to uniform grid cell locator
  - adding OpenMP test, updating copyrights
- Adding rectilinear grid cell locator
  - adding unit tests for serial, tbb, OpenMP, and cuda
- Updating CMakeLists to honor the alphabetical ordering
2019-01-06 17:18:23 -08:00
ayenpure
c062f2e26c Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into code_sprint_locator_fixes 2018-12-03 07:44:31 -08:00
Robert Maynard
45422478cf Refactor VirtualObjectHandle to support new virtual design 2018-10-15 17:38:54 -04:00
ayenpure
42e2bb7f9a Updating files with copyrights 2018-08-29 19:46:49 -07:00
ayenpure
594d1934d4 Adding CellLocatorUniformGrid
- Adding a cell locator to locate points in a uniform grid
- Adding unit tests for the new cell locator
2018-08-29 19:30:07 -07:00
Robert Maynard
4240111dd8 Make sure VirtualObjectHandle tests include RuntimeDeviceTracker 2018-07-18 10:37:46 -04:00
Robert Maynard
e5090e1289 Make sure the PointLocatorUniform uses the correct runtime device 2018-07-03 17:42:57 -04:00
Kenneth Moreland
439beaaed9 Make point locator tests have consistent devices 2018-06-27 10:37:59 +02:00
David Thompson
880d8a989e Add vtkm/Geometry.h and test it.
This commit adds several geometric constructs to vtk-m
in the `vtkm/Geometry.h` header. They may be used from
both the execution and control environments.

We also add methods to perform projection and Gram-Schmidt
orthonormalization to `vtkm/VectorAnalysis.h`.

See `docs/changelog/geometry.md` included in this commit
for more information.
2018-06-20 11:58:14 -04:00
Robert Maynard
1c5feeb185 Make sure all device specific tests use the intended device.
This means that we not only setup the runtime device tracker
to force the intended device, it also means making sure
the default device is the error device.
2018-05-16 08:21:16 -04:00
Robert Maynard
d77ac2c8dd Don't explicitly set backend on tests that use error backend.
The per device tests specifically setup the default backend to
be error to smoke out bad uses of the default backend.
2018-05-11 14:21:36 -04:00
Robert Maynard
8808b41fbd Merge branch 'master' into vtk-m-cmake_refactor 2018-03-29 22:51:26 -04:00
Robert Maynard
944bc3c0d6 Introduce vtkm::cont::ColorTable replacing vtkm::rendering::ColorTable
The new and improved vtkm::cont::ColorTable provides a more feature complete
color table implementation that is modeled after
vtkDiscretizableColorTransferFunction. This class therefore supports different
color spaces ( rgb, lab, hsv, diverging ) and supports execution across all
device adapters.
2018-03-28 16:11:23 -04:00
Robert Maynard
0660c67fef Merge branch 'master' into vtk-m-cmake_refactor 2018-01-16 15:42:28 -05:00
Sujin Philip
950b12b1f2 Add ArrayHandleVirtualCoordinates 2018-01-09 17:23:41 -05:00
Robert Maynard
6fbca1e43f Update tbb and serial unit tests to mark which backend they use properly 2017-12-28 14:23:51 -05:00
Sujin Philip
8c242cef91 Switch from faux to true virtuals 2017-11-06 15:25:29 -05:00
Li-Ta Lo
508882fa21 PointLocatorUniformGrid
Provide an accelerated neareast neighbor search of points in the
dataset using a one layer uniform grid.
2017-10-19 11:44:36 -06:00
Sujin Philip
41679cb5f9 Add a CellLocator
Implements a two-level uniform grid cell locator
2017-10-10 14:01:41 -04:00
Kenneth Moreland
c3a3184d51 Update copyright for Sandia
Sandia National Laboratories recently changed management from the
Sandia Corporation to the National Technology & Engineering Solutions
of Sandia, LLC (NTESS). The copyright statements need to be updated
accordingly.
2017-09-20 15:33:44 -06:00
Kitware Robot
4ade5f5770 clang-format: apply to the entire tree 2017-05-25 07:51:37 -04:00
Sujin Philip
82d02e46ef Modify ImplicitFunctions to use Virtual Methods 2017-05-01 16:55:59 -04:00
Sujin Philip
968960c1a1 Add Virtual Methods Framework 2017-05-01 16:51:42 -04:00
Robert Maynard
0f58d6fc54 Add vtkm/cont/serial directory for the serial backend. 2016-09-28 14:22:53 -04:00