Commit Graph

6923 Commits

Author SHA1 Message Date
Allison Vacanti
a28d2a3a06 Merge topic 'intel_fix'
b6b20f086 Use brigand integer sequences on icc.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1923
2019-12-11 13:11:02 -05:00
Kenneth Moreland
2fbcc78a60 Merge topic 'simple-list-template'
4659d69c7 Remove some commented out code
aec75ab1a Suppress CUDA warning about device calling host
851864d0b Work around with Visual Studio 2015 issue
452a2e1c9 Suppress warnings about CUDA host/device mismatch
4fdefe9f1 Suppress some deprecated warnings in visual studio
5cfc14482 Implement old ListTag features with new ListTag implementations
d5fe4046c Remove instances of ListTag in favor of List
92db37623 Convert uses of ListTagBase to List
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1918
2019-12-11 09:43:22 -05:00
Allison Vacanti
b6b20f086e Use brigand integer sequences on icc. 2019-12-11 09:26:15 -05:00
Kenneth Moreland
4659d69c72 Remove some commented out code 2019-12-10 15:29:46 -07:00
Kenneth Moreland
aec75ab1a2 Suppress CUDA warning about device calling host
The destructors of some control side objects (such as CellSet and
ArrayHandle) are defined. These destructors are obviously only compiled
for the control environment (i.e. for CUDA only for the host). However,
not all of the subclasses implemented their own destructors. In CUDA,
when a default destructor is used, it is compiled for both host and
device. This caused a problem as the superclass's destructor was only
compiled for the host and therefore caused a warning.

Fixed the problem by defining an empty destructor to any subclasses that
needed one.

It's weird that I ran into this problem while chaning the List TMP
class, but the solution seems fine.
2019-12-10 09:15:40 -07:00
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
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
Robert Maynard
4f8a97b998 Merge topic 'correct_msvc_2015_failure'
f89672b71 UnitTestFetchArrayTopologyMapIn now compiles with VS2015

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1921
2019-12-08 12:42:38 -05: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
Robert Maynard
f89672b71a UnitTestFetchArrayTopologyMapIn now compiles with VS2015
Fixes #445
2019-12-06 09:27:45 -05:00
Robert Maynard
3bf7bf23b2 Merge topic '443_MSVC_flag_fix'
07b55a954 Fix MSVC flags for CUDA builds.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1919
2019-12-06 08:19:28 -05:00
Allison Vacanti
07b55a9546 Fix MSVC flags for CUDA builds.
Fixes #443.
2019-12-05 14:02:55 -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
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
80d2948300 Add List changelog 2019-12-04 17:21:32 -07: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
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
44317bf616 Merge topic 'add_ninja_job_pools'
f457cf30f correct setting up job pool for tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1914
2019-12-03 14:49:52 -05:00
Robert Maynard
f457cf30f8 correct setting up job pool for tests 2019-12-03 14:08:52 -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
b9d3736862 Merge topic 'vtkm_setup_job_pool_no_status_message'
f578c9068 Make sure vtkm_setup_job_pool() doesn't output any status

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1912
2019-12-03 11:33:15 -05:00
Robert Maynard
f578c90685 Make sure vtkm_setup_job_pool() doesn't output any status 2019-12-03 11:32:14 -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
acbecb6fc9 Merge topic 'remove_unused_function_interface_components'
65347bf94 Correct warnings found by GCC 9.2
d6d40c90d Simplify FunctionInterface

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1910
2019-12-02 16:18:13 -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
Matt Larsen
68cb8f317f Merge topic 'fix/rendering_timers'
c021ef188 remove serial only timers to avoid warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1906
2019-11-25 13:36:54 -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
01a51e16a9 Merge topic 'gcc-openmp-workaround-fix'
033dfe555 Only workaround incorrect GCC behavior for OpenMP on GCC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1904
2019-11-12 16:27:34 -05: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