Commit Graph

5298 Commits

Author SHA1 Message Date
Kenneth Moreland
851864d0b5 Work around with Visual Studio 2015 issue
Was getting the following error:

vtkm/List.h(284): error C2210: 'T' : pack expansions cannot be used as
arguments to non-packed parameters in alias templates

This is probably an issue with the compiler not resolving templated
aliases correctly.
2019-12-09 14:29:13 -07:00
Kenneth Moreland
452a2e1c9c Suppress warnings about CUDA host/device mismatch 2019-12-09 11:06:56 -05:00
Kenneth Moreland
4fdefe9f1c Suppress some deprecated warnings in visual studio 2019-12-09 07:45:40 -07:00
Petar Hristov
bf2290c9ec Fixed an implicit conversion change warning. 2019-12-09 10:59:18 +00:00
Kenneth Moreland
5cfc14482b Implement old ListTag features with new ListTag implementations
This cleans up the code a bit by removing duplication. More importantly,
it makes sure that the old ListTag functions work with both the new
`List` and old `ListTagBase`.
2019-12-08 19:20:34 -07:00
Kenneth Moreland
d5fe4046c5 Remove instances of ListTag in favor of List 2019-12-06 21:32:36 -07:00
Kenneth Moreland
92db376236 Convert uses of ListTagBase to List 2019-12-06 15:37:46 -07:00
dpugmire
961264d16d compiler warnings. 2019-12-06 13:24:59 -05:00
dpugmire
41c03a8bcf Fix for cuda. 2019-12-06 13:05:00 -05:00
Robert Maynard
f89672b71a UnitTestFetchArrayTopologyMapIn now compiles with VS2015
Fixes #445
2019-12-06 09:27:45 -05:00
dpugmire
8054dfdafb Fixes for streamlines. 2019-12-05 15:46:41 -05:00
Kenneth Moreland
34b0bba842 Use C++11 attributes for VTKM_ALWAYS/NEVER_EXPORT
Previously, the `VTKM_ALWAYS_EXPORT` and `VTKM_NEVER_EXPORT` macros
used the gnu-specific `__attribute__` keyword. This change instead
uses the C++11 standard method of using `[[ ]]` as attributes.
Specifically, `__attribute(visibility("---"))` is changed to
`[[gnu::visibility("--")]]`.

The main impetus for this change is that `__attribute__` does not
seem to work with `[[deprecated]]` on GCC compilers. (For sure on
GCC 6. I didn't check all compiler versions.) This change was
recommended from
https://stackoverflow.com/questions/40886628/deprecated-attribute-visibility-default-in-gcc-6-2

This creates a minor backward incompatibility. We have always meant
for these macros to be used before the return type when used with
a function. However, GCC accepted placing `__attribute__` after
the return type. The C++11 `[[ ]]` cannot be placed there, so
some macros might have to be moved. Still, this was a broken
use that happened to work.
2019-12-05 13:55:54 -05:00
Kenneth Moreland
cd302effb3 Update lists in TypeListTag.h
A new header named TypeList.h and the type lists have been redefined in
this new file. All the types have been renamed from `TypeListTag*` to
`TypeList*`. TypeListTag.h has been gutted to provide deprecated
versions of the old type list names.

There were also some other type lists that were changed from using the
old `ListTagBase` to the new `List`.
2019-12-05 11:05:19 -07:00
Kenneth Moreland
6fc883213c Deprecate ListTag operations
The newer List operations should still work on the old ListTags, so make
those changes first to ensure that everything still works as expected if
given an old ListTag.

Next step is to deprecate ListTagBase itself and move all the lists to
the new types.
2019-12-05 11:27:31 -05:00
Robert Maynard
1b6e7f8f04 Merge topic 'dispatcher_base_smarter_invocation_construction'
50d298948 Slightly improve compile times by making less unique temp types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1917
2019-12-05 10:50:57 -05:00
Robert Maynard
8558df11e6 Merge topic 'add_vtkm_prefix_to_some_common_names'
c3f85ef13 Prefixed CACHE_LINE_SIZE and PAGE_SIZE constexpr variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1916
2019-12-05 10:50:07 -05:00
Robert Maynard
fc40c6085b Merge topic 'correct_osx_symbol_linkage_warning'
81fca4dae Correct warnings on OSX caused by differing symbol visibility settings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1913
2019-12-05 10:49:35 -05:00
Petar Hristov
18caed60e3 Fixed some of the compiler warning from CDash. 2019-12-05 13:50:44 +00:00
Robert Maynard
50d2989483 Slightly improve compile times by making less unique temp types
Instead of incrementally building a new Invocation object
for each modified parameter, we construct a single new type
with all the new parameters.

GCC 9.2, Release, Contour Filter:
Master: 1:08.96min, max memory: 1762644 KB
This: 1:04.56min, max memory: 1730376 KB
2019-12-05 08:19:07 -05:00
Robert Maynard
6b7ff4370f Merge topic 'more_function_interface_simplifications'
daa6b0984 Another round of simplifications to FunctionInterface

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1915
2019-12-05 08:17:20 -05:00
Kenneth Moreland
70f6220fa3 Add vtkm::List
`vtkm::List` is meant to replace `vtkm::ListTag`. Rather than
subclassing a base class with a variadic template, all lists expose the
list of types.

`vtkm::ListTag` was originally created before we required C++11 so
supporting variadic templates was problematic. To hide the issue we had,
we made list tags subclass other lists rather than be the list
themselves. It makes for nicer types in the compiler, but hides
important details about what is actually in the type. It also creates
lots of unnecessary new types.

The new `vtkm::List` is in some ways simpler. All lists have to be a
`vtkm::List`. Subclasses are not supported (or rather, they will not
work as expected). All manipulations (such as `vtkm::ListAppend`)
resolve directly back to a `vtkm::List`. Although the types reported by
the compiler will be longer, they will be more specific to the types
being used. Also, the new implimentation should ultimately use fewer
types.
2019-12-04 17:13:56 -07:00
Kenneth Moreland
a6bc1dc764 Merge topic 'array-handle-thread-safety'
5ab0b5bb1 Access ArrayHandle internals in a critical section
b13a08855 Access ArrayHandle internals in a critical section

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1905
2019-12-04 14:42:07 -05:00
Robert Maynard
c3f85ef13c Prefixed CACHE_LINE_SIZE and PAGE_SIZE constexpr variables
Those two names sometimes are used by macros from other libraries
and therefore break VTK-m.
2019-12-04 14:32:51 -05:00
Robert Maynard
daa6b0984b Another round of simplifications to FunctionInterface
Yet more ways that we can reduce the complexity of `FunctionInterface`.
This is another step in figuring out what set of features the replacement
for `FunctionInterface` needs to have.
2019-12-04 14:02:44 -05:00
dpugmire
bdab4a56d2 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into pa_storage 2019-12-04 11:59:14 -05:00
dpugmire
115f0a6ee3 Changes to particle advection worklets. 2019-12-04 11:52:08 -05:00
Kenneth Moreland
9ff1f5d8a9 Merge topic 'deprecation'
f62b50259 Refactor deprecated macros
fec1c4995 Re-enable Visual Studio warning 4996
ed4d0d50c Add VTKM_DEPRECATED macro

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1902
2019-12-04 09:01:17 -05:00
Kenneth Moreland
4211c4c19b Merge topic 'remove-invalid-arrays-from-multiplexer'
5676cd175 Add changelog for ListTagRemoveIf
6feb0c376 Remove invalid arrays when applying policies to fields
4c103e421 Add ListTagRemoveIf

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1901
2019-12-04 08:57:59 -05:00
Robert Maynard
81fca4dae7 Correct warnings on OSX caused by differing symbol visibility settings 2019-12-03 13:24:04 -05:00
Robert Maynard
a9f5279b28 Merge topic 'add_ninja_job_pools'
7fc7c61a9 VTK-m use a jobs pool for compiling large compilation units.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1911
2019-12-03 09:00:22 -05:00
Robert Maynard
65347bf948 Correct warnings found by GCC 9.2 2019-12-02 09:33:35 -05:00
Robert Maynard
d6d40c90d7 Simplify FunctionInterface
This includes removing Exec, and Cont methods that VTK-m is no longer
using. Also we simplify the used methods as much as possible.
2019-12-02 09:33:35 -05:00
Robert Maynard
7fc7c61a9b VTK-m use a jobs pool for compiling large compilation units.
When building with the ninja generator VTK-m now uses a job pool
to help limit the chances of a machine going out of memory
when compiling VTK-m.
2019-11-29 15:49:54 -05:00
Robert Maynard
462aacebb3 Merge topic 'simplify_threshold_implementation'
a92ad22c7 Improve Threshold runtime and compile performance

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1909
2019-11-26 19:48:24 -05:00
Robert Maynard
a92ad22c73 Improve Threshold runtime and compile performance
Using GCC 9.2 the pre change vtkm::filter::Threshold would
take 31.84sec to compile and use 1.1GB of memory. After
these changes the filter takes 24.16sec to compile and
uses 885MB of memory.
2019-11-26 16:53:56 -05:00
Robert Maynard
5ea5e1b37b Merge topic 'vtkm_mark_files_as_not_good_for_unity'
a1af800cc VTK-m now excludes large files from CMake Unity builds

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1907
2019-11-26 12:04:33 -05:00
Robert Maynard
a1af800cc0 VTK-m now excludes large files from CMake Unity builds
CMake 3.16 includes support for unity builds which merge multiple
translation units together automatically for faster builds.
A couple of translation units in VTK-m already require lots of
system memory, and merging them actually decreases compile performance
2019-11-26 11:22:03 -05:00
mclarsen
c021ef1887 remove serial only timers to avoid warnings 2019-11-25 08:38:36 -08:00
peter
9a6dec8bc4 Refactored control side function call from a VTKM_EXEC function. 2019-11-21 10:01:46 +00:00
Kenneth Moreland
5ab0b5bb1d Access ArrayHandle internals in a critical section
Repeat the changes of the previous commit with the specialized
ArrayHandle for basic storage.
2019-11-20 14:42:58 -07:00
Kenneth Moreland
b13a088558 Access ArrayHandle internals in a critical section
When it was originally created, it was assumed that the ArrayHandle
class would be used by a single thread. As the use of VTK-m expands,
that is no longer a safe assumption. To ensure that operations on
ArrayHandle happen correctly, add a mutex to the Internals of
ArrayHandle and require all operations on the Internals lock that mutex.
2019-11-13 10:47:10 -07:00
Kenneth Moreland
033dfe5556 Only workaround incorrect GCC behavior for OpenMP on GCC
There is some behavior of GCC compilers before GCC 9.0 that is
incompatible with the specification of OpenMP 4.0. The workaround was
using the workaround any time a GCC compiler >= 9.0 was used. The proper
behavior is to only use the workaround when the GCC compiler is being
used and the version of the compiler is less than 9.0.

Also, switch to using VTKM_GCC to check for the GCC compiler instead of
__GNUC__. The problem with using __GNUC__ is that many other compilers
pretend to be GCC by defining this macro, but in cases like compiler
workarounds it is not accurate.
2019-11-12 13:50:50 -07:00
Kenneth Moreland
cd30bc5875 Fix compiler warning in Tube worklet
Older GCC compilers were giving warnings in the operator of the
GeneratePoints worklets for tubes because they could not completely
determine that variables were being properly initialized in the first
loop iteration (and therefore initialized for every subsequent
iteration). Fixed that by moving the initialization for the first
iteration outside of the loop.
2019-11-06 17:06:11 -07:00
Kenneth Moreland
f62b50259e Refactor deprecated macros
Previously we relied on CMake's compiler detection module to build the
macros for using the deprecated attribute. However, CMake created macros
for pre-C++14 versions of the feature, which do not work in all cases.
Also, we have the need to be able to suppress deprecation warnings when
we are implementing a deprecated thing. Since we have to query compilers
ourself, we might as well figure out if the deprecated attribute we want
is supported.

Worst case is that we won't support deprecation warnings everywhere we
could. That will not create incorrect code and we can always add that
later.
2019-11-06 14:47:59 -07:00
Kenneth Moreland
fec1c4995d Re-enable Visual Studio warning 4996
Previously, Configure.h.in used a pragma to disable warning 4996 is all
VTK-m code and anything that used it. The reason for this was that the
warning was given for any use of std algorithms such as fill_n that the
Visual Studio team deemed unsafe. Although we could fix it in our code,
it was impossible to work around warnings in other headers as the actual
warning comes from a system header file (xutility) that we have very
little control over. At the time we disabled this warning, we were
getting the warning from a bost header file, and the warning was never
to be fixed (https://svn.boost.org/trac/boost/ticket/11426).

Unfortunately, disabling warning 4996 also disables all warnings about
deprecated items. We want to support warnings for things deprecated in
VTK-m itself, so turning off this warning means we cannot correctly
support VTK-m deprecation.

Fortunately, a lot has changed since then. We no longer boost at all, so
the issue there is no longer our problem. We can thus re-enable the
warning (by removing the pragma). We've managed to avoid using these
"unsafe" functions anyway, so we should be able to cleanly build with
this warning on.
2019-11-06 09:59:00 -07:00
Kenneth Moreland
ed4d0d50c3 Add VTKM_DEPRECATED macro
The `VTKM_DEPRECATED` macro allows us to remove (and usually replace)
features from VTK-m in minor releases while still following the conventions
of semantic versioning. The idea is that when we want to remove or replace
a feature, we first mark the old feature as deprecated. The old feature
will continue to work, but compilers that support it will start to issue a
warning that the use is deprecated and should stop being used. The
deprecated features should remain viable until at least the next major
version. At the next major version, deprecated features from the previous
version may be removed.
2019-11-06 09:58:53 -07:00
Kenneth Moreland
6feb0c3763 Remove invalid arrays when applying policies to fields
Previously when ApplyPolicyFieldOfType was used in cases where not all
of the types matched not all of the storages, those invalid arrays were
replaced with an ArrayHandleDiscard. This unnecessarily increased the
length of the type names used for the resulting ArrayHandleMultiplexer.

Now, ListTagRemoveIf is used to remove any invalid arrays so that the
resulting ArrayHandleMultiplexer only includes the valid arrays.
2019-11-02 11:08:09 -06:00
Kenneth Moreland
4c103e421a Add ListTagRemoveIf
Provides the ability to remove items from a list.
2019-10-31 14:32:17 -06:00
Kenneth Moreland
3b7b21c86d Do not use std::is_trivially_copyable on GCC 4.X
Although GCC 4.8 and 4.9 claim to be C++11 compliant, there are a few
C++11 features they do not support. One of these features is
std::is_trivially_copyable. So on these platforms, do not attempt to use
it. Instead, treat nothing as trivially copyable.
2019-10-30 16:15:44 -06:00
peter
da83076d7f Merge branch 'master' into peter-changes 2019-10-30 09:36:53 +00:00
Kenneth Moreland
7518d0675c Try to fix uninitialized anonymous variable warning
The code from the previous commit was causing one of the dashboards,
which is using gcc-7, to produce the following warning:

In file included from ../testing/UnitTestVariant.cxx:11:0:
../Variant.h: In function 'void {anonymous}::TestCopyDestroy()':
../Variant.h:269:5: warning: '<anonymous>' may be used uninitialized in this function [-Wmaybe-uninitialized]
     this->Storage = std::move(rhs.Storage);
     ^~~~

At best, this warning is not helpful as it does not seem to point to
anything that could be used uninitialized. At worst, it might be a
compiler bug. A Google search finds a few similar bugs although none I
can assert with any confidence of this issue. However, many reported
bugs and issues point to the use of anonymous namespaces. So, I'm going
to attempt to fix the problem by removing anonymous namespaces.
Hopefully it will fix the warning or at least point me to something
concrete that I can fix.
2019-10-27 07:34:06 -06:00
Kenneth Moreland
5b18ffd770 Register Variant as trivially copyable if possible
The Variant template can hold any type. If it is holding a type that is
non-copyable, then it has to make sure that appropriate constructors,
copiers, movers, and destructors are called.

Previously, these were called even the Variant was holding a trivially
copyable class because no harm no foul. If you were holding a trivially
copyable class and did a memcpy, that work work, which should make it
possible to copy between host and device, right?

In theory yes, but in practice no. The problem is that Cuda is
outsmarting the code. It is checking that Variant is not trivially-
copyable by C++ semantics and refusing to push it.

So, change Variant to check to see if all its supported classes are
trivially copyable. If they are, then it use the default constructors,
destructors, movers, and copiers so that C++ recognizes it as trivially
copyable.
2019-10-26 22:53:43 -06:00
Kenneth Moreland
16305bd837 Add tests of ArrayHandleMultiplexer on multiple devices 2019-10-26 13:40:42 -06:00
Sujin Philip
5ca9a4bd5e Fix UnitTestError
The previous changes were incorrect and did not fix the problem.
2019-10-21 10:08:23 -04:00
Sujin Philip
5c13198407 Merge topic 'fix-dashboard-issues'
79f7f8275 Fix UnitTestError failure
901711bff Fix test failure due to floating point issues

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1896
2019-10-17 17:32:32 -04:00
Sujin Philip
79f7f82751 Fix UnitTestError failure
Compiler optimization may remove recursion and other function calls so we
cannot rely on the number of stack frames to be consistent.
2019-10-17 17:30:40 -04:00
Sujin Philip
901711bff4 Fix test failure due to floating point issues
Floating point precision issues are causing the Reduce algorithm of the OpenMP
backend to produce result that is off by more than 0.001.
2019-10-17 17:30:32 -04:00
Robert Maynard
0fccc5f2c4 improve moments algorithm performance 2019-10-17 11:51:05 -04:00
Kenneth Moreland
d3d3e441d7 Merge topic 'cell-metrix-missing-include'
677962f93 Add Matrix.h to cellmetrics include

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Hank <hank@uoregon.edu>
Merge-request: !1892
2019-10-14 17:01:32 -04:00
Robert Maynard
698df3353b Merge topic 'image_median_filters'
d47f7aaa2 Add an ImageMedian filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1890
2019-10-14 16:21:16 -04:00
Robert Maynard
d47f7aaa29 Add an ImageMedian filter 2019-10-14 16:09:44 -04:00
Robert Maynard
23f55ad0ef Merge topic 'algorithm-fill-fixes'
64dede748 Fix Compilation bug with Fill method

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1889
2019-10-14 11:49:23 -04:00
Kenneth Moreland
677962f939 Add Matrix.h to cellmetrics include
This file was using the Matrix class but not including Matrix.h. When I
tried to use the MeshQuality filter in an example that did not include
Matrix.h on its own, I got a compile error.
2019-10-11 00:08:04 -04:00
Dave Pugmire
665f323db0 optimization for mask select for all masks active. 2019-10-10 16:56:26 -04:00
Dave Pugmire
46c4c0e443 First light for streamlines.. 2019-10-10 09:46:29 -04:00
Dave Pugmire
4a7129db01 compiler warnings. 2019-10-10 08:43:39 -04:00
Sujin Philip
48927c6da3 Merge topic 'fix-lcl-dashboard'
0bb8cbf42 Fix CellLocatorUniformBins test
169049143 Merge branch 'upstream-lcl' into fix-lcl-dashboard
e7cf79a93 lcl 2019-10-09 (d7604cbf)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1888
2019-10-10 08:32:29 -04:00
nadavi
64dede7486 Fix Compilation bug with Fill method 2019-10-09 16:07:43 -06:00
Robert Maynard
1de5774d57 Merge topic 'just_infer_execution_signature'
cf2d62fb9 Remove unneeded ExecutionSignatures
c3f0060cc ExecutionSignatures are now optional for simple worklets
1b08521fa Merge branch 'upstream-taotuple'
c6d309566 taotuple 2019-10-08 (0d1e4dfd)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1882
2019-10-09 15:44:36 -04:00
Dave Pugmire
02b0fd51e4 remove cout commands. 2019-10-09 15:37:42 -04:00
Dave Pugmire
3be90354ff compiler warnings, etc. 2019-10-09 15:28:42 -04:00
Robert Maynard
cf2d62fb90 Remove unneeded ExecutionSignatures 2019-10-09 14:56:07 -04:00
Sujin Philip
0bb8cbf420 Fix CellLocatorUniformBins test 2019-10-09 13:55:55 -04:00
Dave Pugmire
d2cdbd66c0 Remove compiler warnings. Move functionality to Bitset class. 2019-10-09 13:31:45 -04:00
Allison Vacanti
c68919fcc9 Merge topic 'msvc2019_intseq_fix'
56b4fa9a3 MSVC 2019 needs a different integer sequence impl, too.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1887
2019-10-09 11:12:08 -04:00
Sujin Philip
169049143c Merge branch 'upstream-lcl' into fix-lcl-dashboard
* upstream-lcl:
  lcl 2019-10-09 (d7604cbf)
2019-10-09 11:05:19 -04:00
Allison Vacanti
56b4fa9a31 MSVC 2019 needs a different integer sequence impl, too. 2019-10-09 10:49:50 -04:00
Dave Pugmire
ddd4451102 fix compiler warnings. 2019-10-09 10:39:49 -04:00
Dave Pugmire
eb97223ebe Merge topic 'fix_smallStep_integrator'
c41bf99b8 Adjust tolerance
2554de785 Fix tolerance for unittest.
9e486e075 Fix for smallStep in integrator.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1879
2019-10-09 10:26:15 -04:00
Dave Pugmire
fc0e5dfe82 temporal fixes. 2019-10-08 22:31:11 -04:00
Dave Pugmire
40cdc99202 Compile error fixes. 2019-10-08 13:53:35 -04:00
Dave Pugmire
c41bf99b8a Adjust tolerance 2019-10-08 13:01:31 -04:00
Dave Pugmire
2554de7858 Fix tolerance for unittest. 2019-10-08 12:48:05 -04:00
Brad King
16184e360f Merge topic 'update-vtkc-to-lcl'
b0592ce4 Switch from VTK-c to LCL
f7dced89 Merge branch 'upstream-lcl' into update-vtkc-to-lcl
0582b710 lcl 2019-10-07 (49094fec)
d0c6d161 Add update script for LCL

Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1884
2019-10-08 11:46:30 -04:00
Robert Maynard
c3f0060cc5 ExecutionSignatures are now optional for simple worklets
If a worklet doesn't explicitly state an ExecutionSignature, VTK-m
assumes the worklet has no return value, and each ControlSignature
argument is passed to the worklet in the same order.

For example if we had this worklet:
```cxx
struct DotProduct : public vtkm::worklet::WorkletMapField
{
  using ControlSignature = void(FieldIn, FieldIn, FieldOut);
  using ExecutionSignature = void(_1, _2, _3);

  template <typename T, vtkm::IdComponent Size>
  VTKM_EXEC void operator()(const vtkm::Vec<T, Size>& v1,
                            const vtkm::Vec<T, Size>& v2,
                            T& outValue) const
  {
    outValue = vtkm::Dot(v1, v2);
  }
};
```

It can be simplified to be:

```cxx
struct DotProduct : public vtkm::worklet::WorkletMapField
{
  using ControlSignature = void(FieldIn, FieldIn, FieldOut);

  template <typename T, vtkm::IdComponent Size>
  VTKM_EXEC void operator()(const vtkm::Vec<T, Size>& v1,
                            const vtkm::Vec<T, Size>& v2,
                            T& outValue) const
  {
    outValue = vtkm::Dot(v1, v2);
  }
};
2019-10-08 11:14:11 -04:00
Robert Maynard
1b08521fab Merge branch 'upstream-taotuple'
* upstream-taotuple:
  taotuple 2019-10-08 (0d1e4dfd)
2019-10-08 11:13:51 -04:00
Robert Maynard
c6442a1db3 Merge topic 'all_filters_include_hxx_file'
0e9253289 VTK-m filters now have a consistent set of header guards

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1886
2019-10-08 11:08:47 -04:00
Robert Maynard
0e9253289f VTK-m filters now have a consistent set of header guards 2019-10-08 10:39:59 -04:00
Sujin Philip
b0592ce4c8 Switch from VTK-c to LCL 2019-10-07 15:38:36 -04:00
Sujin Philip
f7dced892f Merge branch 'upstream-lcl' into update-vtkc-to-lcl
* upstream-lcl:
  lcl 2019-10-07 (49094fec)
2019-10-07 15:37:55 -04:00
Sujin Philip
d0c6d16123 Add update script for LCL 2019-10-07 15:37:34 -04:00
Allison Vacanti
1081be53bc Fix unused argument warning.
typeid doesn't use the object, just the type.
2019-10-07 13:48:45 -04:00
Kenneth Moreland
be03d1c2b5 Merge topic 'xcode-9-issues'
c0744dbb4 Fix compile error for Xcode 9

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1880
2019-10-04 18:19:17 -04:00
Allison Vacanti
62ffa73cdd Workaround issue with older C++.
Error: https://open.cdash.org/viewBuildError.php?buildid=6143613
Defect: http://open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#253
2019-10-04 15:16:30 -04:00
Kenneth Moreland
c0744dbb49 Fix compile error for Xcode 9
The older Xcode 9 compiler has troubles with ArrayHandleDecorator that
are similar to those of earlier Microsoft and Cuda compilers.

Note that the logic behind the changed compiler check has a lot of
guesswork involved. I noticed this problem on a laptop with Xcode 9
installed. However, even though Xcode uses the clang compiler, it
notoriously does not return the actual clang version. Instead, it
returns some toolchain version that has nothing to do with it. I'm
pretty sure Xcode 9 is using clang version 4 under the covers, but
__clang_major__ reports 9. Oddly, Xcode 10 reports __clang_major__ as 8,
so that's not too much help. So instead, we check for
__apple_build_version__, which returns the Xcode version (sort of) and
that seems a reasonable comparison.

Although I have not tried it, I'm willing to bet that the older clang
outside of Xcode will also have issues. Here is where the real guesswork
takes place since I don't have handy compilers to try. Like I said, I
think the internet claims that Xcode 9 is using clang 4, so also add to
the check any compiler that reports itself clang 4 or below.
2019-10-04 11:32:07 -06:00
Dave Pugmire
9e486e075b Fix for smallStep in integrator. 2019-10-04 08:59:28 -04:00
Robert Maynard
308552bd62 Merge topic 'improve_connectivity_worklet_perf'
973878b8b Improve the performance of the Image and Graph Connectivity algorithms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !1873
2019-10-02 11:41:57 -04:00
Kenneth Moreland
e9c5bcb7d1 Merge topic 'device-log-level'
8c5b76f76 Remove invalid device argument for unit tests
2ca37707e Update logging for enabled devices

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1877
2019-10-02 11:30:04 -04:00
Robert Maynard
973878b8ba Improve the performance of the Image and Graph Connectivity algorithms
The collection of connectivity algorithms had a couple of inefficiencies.
By moving to using WorkId we can remove a couple of arrays of the same size
as the input domain. In addition by moving to using atomics we can remove
an bool output array with a size equivalent to the input domain and
a call to reduce.
2019-10-02 08:25:10 -04:00
Robert Maynard
46212490b1 Merge topic 'CellSetConnectivity_filter_correct_inheritance'
25fb666df CellSetConnectivity now inherits from FilterDataSet

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !1870
2019-10-01 15:44:05 -04:00