Commit Graph

7879 Commits

Author SHA1 Message Date
Li-Ta Lo
945e9cf328 some more comments 2020-08-31 09:23:03 -06:00
Li-Ta Lo
7533538e17 restore CI config files, minor clean up for UnionFind 2020-08-28 10:48:14 -06:00
Li-Ta Lo
31322cd2e1 use CompareAndSwap for setting root 2020-08-28 10:33:24 -06:00
Li-Ta Lo
51a55dd12f disable CI test on all platforms except ubuntu1804_gcc7 2020-08-28 09:10:28 -06:00
Li-Ta Lo
4cd320c284 put finding and setting root in a loop 2020-08-28 08:53:56 -06:00
Li-Ta Lo
f91fb35d7f added more data race analysis, change GraphGraft to use AtomicArray 2020-08-28 00:04:50 -06:00
Li-Ta Lo
e5f8219477 try fixing CUDA compiler error 2020-08-27 22:35:27 -06:00
Li-Ta Lo
fc754b329f deduplicate UnionFind 2020-08-27 20:07:32 -06:00
Li-Ta Lo
af53fb736f Add unit test for graph connectivity with data from the ECL_CC paper 2020-08-27 17:37:08 -06:00
Li-Ta Lo
17047f456d more comments on things to do 2020-08-27 11:46:31 -06:00
Li-Ta Lo
727e0cb268 single pass algorithm for both Image and Graph connectivity 2020-08-27 11:22:48 -06:00
Li-Ta Lo
19be36ee7a implemented single pass algorithm for image connectivity 2020-08-27 11:03:45 -06:00
Li-Ta Lo
0902cbbad3 save before change to single pass algorithm 2020-08-27 10:17:02 -06:00
Li-Ta Lo
69de6afa2a add more comments on data race 2020-08-25 13:30:37 -06:00
Li-Ta Lo
ea2dad5154 extract Unite 2020-08-22 06:15:11 -06:00
Li-Ta Lo
ac6fe7a295 remove unnecessary joining my friend operation 2020-08-21 07:17:13 -06:00
Li-Ta Lo
45fed319ac add more comments on data race during union 2020-08-21 07:15:43 -06:00
Li-Ta Lo
2492d7d1d1 add test case from Valentine, more comments in ImageGraft 2020-08-20 15:08:55 -06:00
Li-Ta Lo
83b90f9fce time to test on GPU 2020-08-20 10:49:00 -06:00
Kenneth Moreland
b60e731b4e Merge topic 'working-branch'
7a179e6a0 Merge branch 'master' into working-branch
c40b98e99 Fix to read the scan inclusive output value directly.
ce30e7c62 Refatored writePortal antipattern.
332532b29 Removed unused Euler Tour header files.
ad497e261 Merged with master.
cd43328ef Fixed signed conversion build warning.
6b82c1ab7 Fixed CUDA build errors.
ce653c78f Fixed contour tree example app.
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2167
2020-08-10 11:22:06 -04:00
Petar Hristov
7a179e6a07 Merge branch 'master' into working-branch 2020-08-07 17:28:26 +01:00
Petar Hristov
c40b98e990 Fix to read the scan inclusive output value directly. 2020-08-06 16:55:04 +01:00
Robert Maynard
4d010feecd Merge topic 'allow_vtkm_basic_handle_ownership_transfer'
f22dd9f57 Allow VTK-m Buffer to have ownership transferred

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2200
2020-08-06 11:34:59 -04:00
Robert Maynard
f22dd9f571 Allow VTK-m Buffer to have ownership transferred 2020-08-06 10:31:57 -04:00
Petar Hristov
ce30e7c62f Refatored writePortal antipattern. 2020-08-05 19:20:24 +01:00
Robert Maynard
e65f0b1123 Merge topic 'make_ArrayHandle_api_update_for_interop'
47843ea2e Update vtkm/interop to use non-deprecated make_ArrayHandle API

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2199
2020-08-05 13:54:36 -04:00
Kenneth Moreland
03ad17d73f Merge topic 'benchmark-array-transfer'
cb34cbbaf Make BenchmarkArrayTransfer actually benchmark transfers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2201
2020-08-05 11:18:36 -04:00
Kenneth Moreland
cb34cbbaf2 Make BenchmarkArrayTransfer actually benchmark transfers
Previously, most of the benchmarks just measured time spent reading or
writing the array on the device. The transfer only happened on the first
iteration and was then cached on the device.

This change clears out the array every iteration so that the array has
to be transferred afresh.
2020-08-04 09:16:46 -06:00
Robert Maynard
47843ea2e3 Update vtkm/interop to use non-deprecated make_ArrayHandle API 2020-08-03 12:15:16 -04:00
Ben Boeckel
b7a9eb0c73 Merge topic 'doxygen-upload-key-perms'
dcef16788 gitlab-ci: fix key file permissions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2198
2020-08-03 08:27:31 -04:00
Ben Boeckel
dcef167889 gitlab-ci: fix key file permissions 2020-08-03 07:28:41 -04:00
Vicente Bolea
922a570703 Merge topic 'fix-515-vtkdatasetwriter-remove-justpoints'
ab0fecda7 VTKDataSetWriter: remove just_points argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2185
2020-07-28 20:26:37 -04:00
Petar Hristov
332532b290 Removed unused Euler Tour header files. 2020-07-28 08:09:04 +01:00
Petar Hristov
ad497e2619 Merged with master. 2020-07-27 16:27:14 +01:00
Petar Hristov
cd43328ef7 Fixed signed conversion build warning. 2020-07-27 10:43:20 +01:00
Petar Hristov
6b82c1ab77 Fixed CUDA build errors. 2020-07-27 10:00:11 +01:00
Kenneth Moreland
adeea8eb31 Merge topic 'move-std-vector'
5f541d251 Drop log message when ignoring copy in move
4c56797c5 Remove ArrayHandleSOA constructors with ambiguous move semantics
0d484505e Fix bad gcc compiler warning about static definition (again)
216307744 Fix errors with memory access
e23989bde Use data method to get pointer from std::vector
2e243cbba Fix issue with using std::string in ArrayHandle
46f253b92 Fix compiler issue with MSVC
d1a4aecc5 Improvements to moving data into ArrayHandle

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Acked-by: Allison Vacanti <alliepiper16@gmail.com>
Merge-request: !2184
2020-07-25 14:27:28 -04:00
Vicente Adolfo Bolea Sanchez
ab0fecda7f VTKDataSetWriter: remove just_points argument
Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2020-07-24 15:54:13 -04:00
Petar Hristov
ce653c78f1 Fixed contour tree example app. 2020-07-24 14:17:36 +01:00
Petar Hristov
1c8935f7ce Merge branch 'working-branch' of https://gitlab.kitware.com/petarhristov/vtk-m into working-branch 2020-07-24 14:17:03 +01:00
Petar Hristov
4707e5997e Fixed code review issues. 2020-07-24 13:50:12 +01:00
Kenneth Moreland
5f541d2515 Drop log message when ignoring copy in move
For `make_ArrayHandle` and `make_Field` when it is determined that the
data can be safely moved, just silently move instead of copy instead of
printing a log message saying the copy flag will be ignored.

Also fix an issue with `make_ArrayHandle` when the data was not moved
when it could have been.
2020-07-23 17:59:50 -06:00
Kenneth Moreland
4c56797c5d Remove ArrayHandleSOA constructors with ambiguous move semantics
Also correct some constructors/functions that should be
deprecated.
2020-07-23 17:54:42 -06:00
Kenneth Moreland
0d484505e7 Fix bad gcc compiler warning about static definition (again) 2020-07-23 17:53:15 -06:00
Kenneth Moreland
2163077441 Fix errors with memory access 2020-07-23 11:02:40 -06:00
Kenneth Moreland
e23989bde1 Use data method to get pointer from std::vector
Do not use `&v.front()` to get the pointer from an `std::vector`. That
behavior is undefined when the vector is empty. Instead, use `v.data()`.
2020-07-23 11:02:40 -06:00
Kenneth Moreland
2e243cbbac Fix issue with using std::string in ArrayHandle
The recent version of ArrayHandleBasic allocates typeless arrays without
any initialization. This can cause issues with types that require a
constructor. The UnitTestVariantArrayHandle was trying to create an
ArrayHandle with an std::string, and the uninitialized strings were
causing crashes on some platforms.
2020-07-23 11:02:38 -06:00
Kenneth Moreland
46f253b927 Fix compiler issue with MSVC 2020-07-23 10:53:42 -06:00
Kenneth Moreland
d1a4aecc59 Improvements to moving data into ArrayHandle
We have made several improvements to adding data into an `ArrayHandle`.

## Moving data from an `std::vector`

For numerous reasons, it is convenient to define data in a `std::vector`
and then wrap that into an `ArrayHandle`. It is often the case that an
`std::vector` is filled and then becomes unused once it is converted to an
`ArrayHandle`. In this case, what we really want is to pass the data off to
the `ArrayHandle` so that the `ArrayHandle` is now managing the data and
not the `std::vector`.

C++11 has a mechanism to do this: move semantics. You can now pass
variables to functions as an "rvalue" (right-hand value). When something is
passed as an rvalue, it can pull state out of that variable and move it
somewhere else. `std::vector` implements this movement so that an rvalue
can be moved to another `std::vector` without actually copying the data.
`make_ArrayHandle` now also takes advantage of this feature to move rvalue
`std::vector`s.

There is a special form of `make_ArrayHandle` named `make_ArrayHandleMove`
that takes an rvalue. There is also a special overload of
`make_ArrayHandle` itself that handles an rvalue `vector`. (However, using
the explicit move version is better if you want to make sure the data is
actually moved.)

## Make `ArrayHandle` from initalizer list

A common use case for using `std::vector` (particularly in our unit tests)
is to quickly add an initalizer list into an `ArrayHandle`. Now you can
by simply passing an initializer list to `make_ArrayHandle`.

## Deprecated `make_ArrayHandle` with default shallow copy

For historical reasons, passing an `std::vector` or a pointer to
`make_ArrayHandle` does a shallow copy (i.e. `CopyFlag` defaults to `Off`).
Although more efficient, this mode is inherintly unsafe, and making it the
default is asking for trouble.

To combat this, calling `make_ArrayHandle` without a copy flag is
deprecated. In this way, if you wish to do the faster but more unsafe
creation of an `ArrayHandle` you should explicitly express that.

This requried quite a few changes through the VTK-m source (particularly in
the tests).

## Similar changes to `Field`

`vtkm::cont::Field` has a `make_Field` helper function that is similar to
`make_ArrayHandle`. It also features the ability to create fields from
`std::vector`s and C arrays. It also likewise had the same unsafe behavior
by default of not copying from the source of the arrays.

That behavior has similarly been depreciated. You now have to specify a
copy flag.

The ability to construct a `Field` from an initializer list of values has
also been added.
2020-07-23 10:53:38 -06:00
Kenneth Moreland
744edbf428 Merge topic 'gcc-static-function-warning'
b1f648bfd Remove gcc warning about static declared function

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2193
2020-07-22 15:20:45 -04:00