Commit Graph

5214 Commits

Author SHA1 Message Date
Allison Vacanti
b6b20f086e Use brigand integer sequences on icc. 2019-12-11 09:26:15 -05:00
Robert Maynard
f89672b71a UnitTestFetchArrayTopologyMapIn now compiles with VS2015
Fixes #445
2019-12-06 09:27:45 -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
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
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
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
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
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
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
Robert Maynard
cf2d62fb90 Remove unneeded ExecutionSignatures 2019-10-09 14:56:07 -04:00