Commit Graph

5640 Commits

Author SHA1 Message Date
Kenneth Moreland
98f20ec269 Use a worklet to permute fields rather than ArrayHandlePermutation
According to talks with Rob Maynard, using a worklet should be
(counterintuitively) faster than using ArrayHandlePermutation with
ArrayCopy.

This change also gives an opportunity to handle invalid indices, which
may be intentionally set when no mapping is available for that value.
For this case, MapFieldPermutation now takes an invalidValue argument to
set such values.
2020-05-21 08:34:30 -06:00
Kenneth Moreland
4a5dbb65db Convert CleanGrid (and dependents) to use precompiled field map 2020-05-21 08:34:29 -06:00
Kenneth Moreland
2383a7fffd Add MapFieldPermutation function
This function is compiled into the vtkm_filter library, so all filters
can implement this type of mapping without providing their own version
of compiling it.

Because we only compile it once, we provide more types to convert.
Hopefully the total compile time balances out.
2020-05-21 08:34:28 -06:00
Kenneth Moreland
b1f288aaea Add non-templated base class to Keys class.
The only reason Keys has a template is so that it can hold a UniqueKeys
array and provide the key for each group. If that is not needed and you
want to implement a library function that takes a keys object, you can
now grab the Keys superclass KeysBase. KeysBase is not templated, so you
can pass it to a standard method in a library.
2020-05-21 08:34:07 -06:00
Kenneth Moreland
934732bb64 Add MapFieldPermutation function
This function is compiled into the vtkm_filter library, so all filters
can implement this type of mapping without providing their own version
of compiling it.

Because we only compile it once, we provide more types to convert.
Hopefully the total compile time balances out.
2020-05-21 08:33:48 -06:00
Robert Maynard
0d2678368b Merge topic 'image_median_inline_constructor'
9dd7b8b48 filter::ImageMedian can be used in multiple compilation units

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2102
2020-05-21 09:15:25 -04:00
Kenneth Moreland
d4ff67a226 Merge topic 'deprecate-execute-with-policy'
544a078cd Remove use of deprecated policies in examples
06f5119c2 Fix deprecation warning
f29a4712b Correct field types for ComputeMoments filter
a20ec03d0 Disable proxies in filter benchmark
72cd0107e Deprecate Execute with policy

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2093
2020-05-20 18:28:37 -04:00
Kenneth Moreland
544a078cdb Remove use of deprecated policies in examples
This means that the filters in the examples will no longer properly
support the policies handed to them, but that is the direction we are
headed as the policies are now deprecated.
2020-05-20 12:58:24 -06:00
Sudhanshu Sane
10dc96cb87 Remove extra count variable 2020-05-20 10:30:16 -07:00
Sudhanshu Sane
536249f634 Merge remote-tracking branch 'upstream/master' into lagrangian_bugfix 2020-05-20 10:15:47 -07:00
Robert Maynard
9dd7b8b487 filter::ImageMedian can be used in multiple compilation units
The header was previously not marked inline and therefore
you could only have a single instance of the filter compiled
in a dynamic library / executable
2020-05-20 08:44:45 -04:00
Kenneth Moreland
05fcda6c76 Compile IO library with device compilers
Because the IO classes use ArrayHandle, they have to be compiled with
device compilers (even though they do not directly produce any device
code). This is a dumb requirement, but it is a requirement nonetheless.
2020-05-19 15:04:08 -06:00
Kenneth Moreland
dce576bd11 Add BOVDataSetReader implementation to vtkm_io 2020-05-19 14:33:45 -06:00
Kenneth Moreland
8657a9b3c8 Update VTKDataSetWriter to compile into vtkm_io 2020-05-19 14:32:48 -06:00
Kenneth Moreland
086439e71e Update variants of VTKDataSetReaders to compile into vtkm_io 2020-05-19 13:04:12 -06:00
Kenneth Moreland
0612be9c5b Move VTKDataSetReaderBase code to vtkm_io
Most of this code is not templated methods. Rather, it implements over
several types to call templated functions, which creates quite a bit of
code. Rather than have all code using a reader recompile the code, just
compile it once and put it in a library.
2020-05-19 12:27:01 -06:00
Nick Thompson
5d20506a5d Remove overly verbose log pring. 2020-05-18 22:25:29 -04:00
Kenneth Moreland
06f5119c29 Fix deprecation warning
This came up when updating VTK-m in VTK.
2020-05-18 18:41:47 -06:00
Kenneth Moreland
f29a4712b0 Correct field types for ComputeMoments filter
This filter is designed to work on vectors of many sizes. It was written
when selecting field types was the responsibility of the policy. It is
now the responsibility of the filter to specify possible field types.

This change is required to compile the MomentInvariants module for VTK
without policies.
2020-05-18 18:39:22 -06:00
Kenneth Moreland
72cd0107ee Deprecate Execute with policy
The version of `Filter::Execute` that takes a policy as an argument is now
deprecated. Filters are now able to specify their own fields and types,
which is often why you want to customize the policy for an execution. The
other reason is that you are compiling VTK-m into some other source that
uses a particular types of storage. However, there is now a mechanism in
the CMake configuration to allow you to provide a header that customizes
the "default" types used in filters. This is a much more convenient way to
compile filters for specific types.

One thing that filters were not able to do was to customize what cell sets
they allowed using. This allows filters to self-select what types of cell
sets they support (beyond simply just structured or unstructured). To
support this, the lists `SupportedCellSets`, `SupportedStructuredCellSets`,
and `SupportedUnstructuredCellSets` have been added to `Filter`. When you
apply a policy to a cell set, you now have to also provide the filter.
2020-05-18 12:38:41 -06:00
Nick
9aa350ee3d Fix bad whitespace. 2020-05-14 18:13:03 -04:00
Nick
9991179e6d Do not use auto return type; it's not supported until C++14. 2020-05-14 18:10:32 -04:00
Nick
f1ee3f51f1 Merge branch 'master' into deprecate_read_portal_get 2020-05-14 16:26:49 -04:00
Nick
a55596b38c Reorder member functions. 2020-05-14 16:10:33 -04:00
Nick
6fba7347a9 Mark pixel destructors as virtual to fix build error. 2020-05-14 14:29:34 -04:00
Nick
9471041484 Merge branch 'master' into deprecate_read_portal_get 2020-05-14 14:04:44 -04:00
Robert Maynard
cd1f6393c9 Merge topic 'deprecated_warnings_nvcc_gcc_7'
53c33e24a Assume NVCC has zero support for VTK_M_DEPRECATED_ATTRIBUTE_SUPPORTED

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2088
2020-05-14 08:50:16 -04:00
Nickolas Davis
3a42ebf7bd Merge topic 'image-io'
24d022b02 Implement and test ImageReader and ImageWriter capabilities in the io library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1967
2020-05-13 19:20:42 -04:00
nadavi
24d022b02b Implement and test ImageReader and ImageWriter capabilities in the io library 2020-05-13 16:10:21 -06:00
Robert Maynard
53c33e24ad Assume NVCC has zero support for VTK_M_DEPRECATED_ATTRIBUTE_SUPPORTED 2020-05-13 14:52:13 -04:00
NAThompson
1f8e2db7b2 Remove unused variable from UnitTestTimer. 2020-05-13 13:00:40 -04:00
NAThompson
194c6f6b42 Attempt to make UnitTestTimer fail less often. 2020-05-13 12:31:25 -04:00
Vicente Bolea
ba77f36347 Merge topic 'fix-optimizing-threadindices'
d5906eccd add ThreadIndicesTopologyMap optimized specializations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2027
2020-05-12 18:08:32 -04:00
Nick
9d9e332b0d Merge topic 'bov_test'
2fc636c27 Test BOV reader. Fix slow WritePortal().Set(idx, val) loop.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2081
2020-05-12 16:18:44 -04:00
NAThompson
d961c185ac Deprecate ReadPortal().Get pattern. 2020-05-12 15:43:40 -04:00
Sudhanshu Sane
5198447820 Fix order of initialized seeds to match output format 2020-05-12 11:18:33 -07:00
Vicente Adolfo Bolea Sanchez
d5906eccd9 add ThreadIndicesTopologyMap optimized specializations
This commit splits ThreadIndicesTopologyMap into two
different specializations which can be instanciated with the
tags: DefaultScatterAndMaskTag and CustomScatterAndMaskTag.

These specialization will allow ThreadIndicesTopologyMap
instances to avoid holding in memory InputIndex, OutputIndex and ThreadIndex
variables when Mask = MaskNone and Scatter = ScatterIdentity which in this case
are not needed since no transformation are done.

Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2020-05-12 13:45:43 -04:00
Robert Maynard
51e600e7e2 Remove no_discard warnings from unneeded calls of a rng 2020-05-12 09:38:18 -04:00
NAThompson
2fc636c276 Test BOV reader. Fix slow WritePortal().Set(idx, val) loop. 2020-05-11 17:08:44 -04:00
Nick
990ae4b9a6 Merge topic 'readportalget2'
afe9c2a2b Update UnitTestTimer.cxx
46faf574f ReadPortal().Get(idx) is slow in a loop.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2078
2020-05-08 18:25:14 -04:00
Li-Ta Lo
f670103fe6 Merge topic 'marching_cell_wedge'
08da38bd4 use the new VTKDataSetReader
97094cfb8 Merge branch 'master' into marching_cell_wedge
8c0787b5d Merge branch 'master' into marching_cell_wedge
aef44b5c9 change sample input file in unit test
2880be2ea rename sample input for wedge contour
52f0d5b2d Fix MarchingCell for Wedge

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2070
2020-05-08 15:11:35 -04:00
Nick
afe9c2a2b0 Update UnitTestTimer.cxx 2020-05-08 15:00:02 -04:00
Li-Ta Lo
08da38bd49 use the new VTKDataSetReader 2020-05-08 11:14:47 -06:00
Li-Ta Lo
97094cfb88 Merge branch 'master' into marching_cell_wedge 2020-05-08 09:45:52 -06:00
NAThompson
46faf574fa ReadPortal().Get(idx) is slow in a loop. 2020-05-08 11:30:59 -04:00
NAThompson
9da8c81409 Trivial typo fix. 2020-05-08 10:59:09 -04:00
Li-Ta Lo
8c0787b5de Merge branch 'master' into marching_cell_wedge 2020-05-07 16:51:35 -06:00
Kenneth Moreland
ddf038742d Use finite types when serializing fields
When serializing fields, you have to select what underlying data types
of the field you want to support serializing. With recent changes in the
default policy, attempts to serialize a field often resulted in trying
to use the `vtkm::ListUniversal` type list, which is infinite.
Obviously, this cannot be compiled.

Instead, when the `vtkm::ListUniversal` list is encountered, use
`vtkm::TypeListAll` instead.
2020-05-07 13:58:08 -06:00
Li-Ta Lo
aef44b5c97 change sample input file in unit test 2020-05-05 14:24:21 -06:00
Allison Vacanti
2d4d54b170 Remove Set method from const ArrayPortalFromIterators specialization...
...and add unit test.

Related to !2071, #502.
2020-05-05 13:55:54 -04:00