Commit Graph

35 Commits

Author SHA1 Message Date
Allison Vacanti
5db762ee71 Refactor topology mappings to clarify meaning.
The `From` and `To` nomenclature for topology mapping has been confusing for
both users and developers, especially at lower levels where the intention of
mapping attributes from one element to another is easily conflated with the
concept of mapping indices (which maps in the exact opposite direction).

These identifiers have been renamed to `VisitTopology` and `IncidentTopology`
to clarify the direction of the mapping. The order in which these template
parameters are specified for `WorkletMapTopology` have also been reversed,
since eventually there may be more than one `IncidentTopology`, and having
`IncidentTopology` at the end will allow us to replace it with a variadic
template parameter pack in the future.

Other implementation details supporting these worklets, include `Fetch` tags,
`Connectivity` classes, and methods on the various `CellSet` classes (such as
`PrepareForInput` have also reversed their template arguments. These will need
to be cautiously updated.

The convenience implementations of `WorkletMapTopology` have been renamed for
clarity as follows:

```
WorkletMapPointToCell --> WorkletVisitCellsWithPoints
WorkletMapCellToPoint --> WorkletVisitPointsWithCells
```

The `ControlSignature` tags have been renamed as follows:

```
FieldInTo --> FieldInVisit
FieldInFrom --> FieldInMap
FromCount --> IncidentElementCount
FromIndices --> IncidentElementIndices
```
2019-08-06 11:27:26 -04: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
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Robert Maynard
18ff6681fb Less vtkm_cont cxx files bring in the cuda device
When you have CUDA enabled we need to make sure that all worklet
launches come from a cuda file otherwise we will generate ODR
violations.
2019-04-01 08:21:07 -04:00
Li-Ta Lo
045da86e49 add unit test for image connectivity filter 2019-03-17 21:24:24 -06:00
Li-Ta Lo
55910e5a76 Merge branch 'master' into connected_component 2019-02-28 11:31:56 -07:00
Kenneth Moreland
2e426ad547 Run the update-control-signature-tags.sh script 2019-01-11 12:23:10 -07:00
Robert Maynard
0a40c620ac Rename ArrayHandleVariant to VariantArrayHandle. 2018-12-27 14:35:56 -05:00
Robert Maynard
eed321aad0 Update vtkm/worklet to work with ArrayHandleVariant 2018-12-27 14:35:56 -05:00
Li-Ta Lo
2af1162a01 Merge branch 'master' into connected_component 2018-12-12 14:12:34 -07:00
Li-Ta Lo
c75ec7bfc7 Updated unit tests, add filter interface 2018-12-04 16:42:34 -07:00
Li-Ta Lo
5000ef459b Fixed pre-mature termination of the image connectivity algorithm
The previous algorithm terminates based on if all pixels are in a root star. It turns out to be in
sufficient and thus terminates much earlier than it is required.
2018-12-03 13:46:21 -07:00
Kenneth Moreland
01a9e85416 Change WorkletPointNeighborhood to specify neighborhood at runtime
Previously, WorkletPointNeighborhood had a template argument to select
the size of the neighborhood. This change removes that template
argument. Instead, the vtkm::exec::arg::BoundaryState methods now take
in a size parameter when determining when it overlaps the boundary.

If in the future we want to add the ability to select the neighborhood
size at compile-time (for performance reasons), I suggest adding this
template argument to the OnBoundary tag for ExecutionSignature.
2018-12-03 12:45:23 -07:00
Haocheng LIU
8859636672 Merge worklet testing executables into a device dependent shared library
VTK-m has been updated to replace old per device worklet testing executables with a device
dependent shared library so that it's able to accept a device adapter
at runtime.
Meanwhile, it updates the testing infrastructure APIs. vtkm::cont::testing::Run
function would call ForceDevice when needed and if users need the device
adapter info at runtime, RunOnDevice function would pass the adapter into the functor.

Optional Parser is bumped from 1.3 to 1.7.
2018-11-23 10:13:56 -05:00
Kenneth Moreland
d879188de0 Make DispatcherBase invoke using a TryExecute
Rather than force all dispatchers to be templated on a device adapter,
instead use a TryExecute internally within the invoke to select a device
adapter.

Because this removes the need to declare a device when invoking a
worklet, this commit also removes the need to declare a device in
several other areas of the code.
2018-08-29 19:18:54 -07:00
Allison Vacanti
93506d25e2 Change function signatures to use 'using' aliases.
Also cleaned up some lingering type typedefs.
2018-05-25 17:18:41 -04:00
Li-Ta Lo
269b940fe6 Merge topic 'connected_component'
d3dbdd59 remove using namespace, specify fully qualified names
ae5e3be8 Merge branch 'connected_component' of gitlab.kitware.com:ollielo/vtk-m into connected_component
f655e8f1 add overload of Run() for ArrayHandle
6f853971 Add vtkm::worklet::connectivity namespace
ce27f5fc Change signature of ImageConnectivity::Run()
648b0dec add installation of header files in CMakeLists.txt
d94f2cae Add ImageConnectivity worklet
ca0e9d20 Change signature of ImageConnectivity::Run()
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1154
2018-05-08 11:08:54 -04:00
Robert Maynard
eb82620539 Correct shadowing define warning from GraphConnectivity 2018-05-02 13:31:30 -04:00
Li-Ta Lo
f655e8f1f1 add overload of Run() for ArrayHandle 2018-05-01 15:48:26 -06:00
Li-Ta Lo
6f85397192 Add vtkm::worklet::connectivity namespace
Created vtkm::worklet::connectivity namespace and worklets in the namespace.
2018-04-27 11:32:27 -06:00
Li-Ta Lo
ce27f5fcaa Change signature of ImageConnectivity::Run()
It takes CellSetStructured<2> and DynamicArrayHandle and uses CastAndCall
to resolve data type for pixels. Moved implementation to the RunImpl
function object.
2018-04-27 11:32:27 -06:00
Li-Ta Lo
648b0decfc add installation of header files in CMakeLists.txt 2018-04-27 11:32:27 -06:00
Li-Ta Lo
d94f2cae37 Add ImageConnectivity worklet
ImageConnectivity worklet implements a parallel connected component
labeling algorithm for 2D structured grids/images. For each pixel,
it search for the pixel's 6 neighbors and classify them as the
same connected component if their corresponding "color" field have
the same value.
2018-04-27 11:32:27 -06:00
Kenneth Moreland
edc4c85fd9 Move Scatter from Worklet to Dispatcher
Previously, when a Worklet needed a scatter, the scatter object was
stored in the Worklet object. That was problematic because that means
the Scatter, which is a control object, was shoved into the execution
environment.

To prevent that, move the Scatter into the Dispatcher object. The
worklet still declares a ScatterType alias, but no longer has a
GetScatter method. Instead, the Dispatcher now takes a Scatter object in
its constructor. If using the default scatter (ScatterIdentity), the
default constructor is used. If using another type of Scatter that
requires data to set up its state, then the caller of the worklet needs
to provide that to the dispatcher. For convenience, worklets are
encouraged to have a MakeScatter method to help construct a proper
scatter object.
2018-04-27 00:43:51 -04:00
Robert Maynard
cd333bf8dc Remove unneeded semicolon after closing parentheses on a some methods. 2018-04-05 10:55:12 -04:00
Li-Ta Lo
1a13324a9a Merge branch 'master' into connected_component 2018-03-06 16:23:43 -07:00
Li-Ta Lo
e058aaebd9 extend CellSetConnectivity to CellSetUniform and CellSetExplicit 2018-03-06 16:21:32 -07:00
Robert Maynard
182f4707e7 vtkm prefers 'using' over typedef. 2018-02-23 10:47:20 -05:00
Li-Ta Lo
bdb9c37ec4 update based on issues pointed out by Robert 2018-01-17 11:12:32 -07:00
Li-Ta Lo
a9ed1ecfcf add CMakeLists.txt for header files 2018-01-03 14:52:07 -07:00
Li-Ta Lo
ba3cba64e6 update copyright statements 2018-01-03 14:29:06 -07:00
Li-Ta Lo
746c98e6c8 fix merge conflict with master branch, update to control signature 2018-01-03 11:27:13 -07:00
Li-Ta Lo
2a9439ab1e Merge branch 'master' into connected_component 2018-01-02 17:59:19 -07:00
Li-Ta Lo
4c2ef4f89b factor out CellSetConnectivity worklet, cleanup 2018-01-02 16:44:35 -07:00
Li-Ta Lo
2e88f4220a Connected component for triangle mesh 2017-12-22 10:31:02 -07:00