Commit Graph

636 Commits

Author SHA1 Message Date
Li-Ta Lo
f66c782b14 Extract WorkletNeighborhood base class 2020-07-20 17:50:14 -06:00
Kenneth Moreland
502c310cf8 Merge topic 'deprecate-arrayhandlevirtualcoordinates'
c689a68c5 Suppress bad deprecation warnings in MSVC
a3f23a03b Do not cast to ArrayHandleVirtual in VariantArrayHandle::CastAndCall
f6b13df51 Support coordinates of both float32 and float64
453e31404 Deprecate ArrayHandleVirtualCoordinates
be7f06bbe CoordinateSystem data is VariantArrayHandle

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2177
2020-07-16 17:25:43 -04:00
Li-Ta Lo
760c51ed62 install ThreadIndicesNeighborhood.h 2020-07-16 08:06:17 -06:00
Li-Ta Lo
e52b8fa88a Add CellNeighborhood 2020-07-15 14:41:32 -06:00
Kenneth Moreland
be7f06bbe7 CoordinateSystem data is VariantArrayHandle
`CoordinateSystem` differed from `Field` in that its `GetData`
method returned an `ArrayHandleVirtualCoordinates` instead of
a `VariantArrayHandle`. This is probably confusing since
`CoordianteSystem` inherits `Field` and has a pretty dramatic
difference in this behavior.

In preparation to deprecate `ArrayHandleVirtualCoordinates`, this
changes `CoordiantSystem` to be much more like `Field`. (In the
future, we may change the `CoordinateSystem` to point to a `Field`
rather than be a special `Field`.)

A method named `GetDataAsMultiplexer` has been added to
`CoordinateSystem`. This method allows you to get data from
`CoordinateSystem` as a single array type without worrying
about creating functors to handle different types and without
needing virtual methods.
2020-07-14 08:50:39 -06:00
Caitlin Ross
235d9ce14b add GetThreadIndex to ThreadIndicesExtrude classes 2020-07-08 14:51:41 -04:00
Kenneth Moreland
56bec1dd7b Replace basic ArrayHandle implementation to use Buffers
This encapsulates a lot of the required memory management into the
Buffer object and related code.

Many now unneeded classes were deleted.
2020-06-25 14:02:26 -06:00
Robert Maynard
3029994a97 Remove some unneeded include statements from vtkm/exec 2020-06-22 09:28:51 -04:00
Robert Maynard
a652f7fe1e Update vtk-m doxygen to generate less warnings 2020-06-01 16:58:32 -04:00
Robert Maynard
93d87e06fd Optimize StructuredPointGradient for non boundary points.
We can remove lots of clamp calls by checking if we are on
a boundary and using a non-clamped API.
2020-05-22 14:58:38 -04: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
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
Kenneth Moreland
a44392027a Fix compile error in UnitTestTaskStrided.cu from changes in Fetch
A recent change removed the thread indices parameters from the arguments
to the `Fetch` template. Somehow, an instance of using the old template
in the CUDA task strided tests snuck through the dashboard tests.
Correct that.
2020-04-27 17:47:37 -06:00
Dave Pugmire
87470a89b7 Merge topic 'fix_euler_step_particleAdvection2'
2ecca9edf Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into fix_euler_step_particleAdvection2
d2e9b3d30 Fix for small euler step for particle advection.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2057
2020-04-27 09:41:39 -04:00
Vicente Adolfo Bolea Sanchez
d0396e2a40 relaxes ThreadIndicesType across multiple worklets fetchs
This change is needed for being able to use different thread indices types
without changing Fetchs. Basically decoupling those two areas.

1. This commit removes concrete specialization instantiations of
   ThreadIndicesTypes in all of the Fetch's specializations.

2. It also moves the ThreadIndicesType template parameter from the Fetch
   struct to a template parameter in their methods Load/Store.

Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2020-04-24 17:39:31 -04:00
dpugmire
d2e9b3d306 Fix for small euler step for particle advection. 2020-04-23 16:14:28 -04:00
Vicente Adolfo Bolea Sanchez
026fd14ba6 CellMetrics return vtkm::ErrorCode instead of raising errors
- MeshQuality now throws ErrorCode messages

Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2020-04-16 17:27:42 -04:00
Vicente Adolfo Bolea Sanchez
6c7855aed8 relax ThreadIndicesType requirements for WorkletInvokeFunctorDetail
Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2020-04-10 13:13:35 -04:00
Kenneth Moreland
545e60fbe3 Merge topic 'no-streaming-arrayhandle'
4f9fa08fa Remove ArrayHandleStreaming capabilities

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2008
2020-03-25 11:26:26 -04:00
Kenneth Moreland
4f9fa08fa1 Remove ArrayHandleStreaming capabilities
The `ArrayHandleStreaming` class stems from an old research project
experimenting with bringing data from an `ArrayHandle` in parts and
overlapping device transfer and execution. It works, but only in very
limited contexts. Thus, it is not actually used today. Plus, the feature
requires global indexing to be permutated throughout the worklet
dispatching classes of VTK-m for no further reason.

Because it is not really used, there are other more promising approaches
on the horizon, and it makes further scheduling improvements difficult,
we are removing this functionality.
2020-03-24 15:01:56 -06:00
Kenneth Moreland
42bc9a393c Fix gaps in type support
With recent changes to allow a configuration to change the default
types, storage, and cell sets, it is possible to feed filters and other
components types they were not previously expecting. Fix feature gaps
where these components were not accepting the types they should.
2020-03-19 17:07:11 -06:00
Vicente Bolea
35276434bd Merge topic 'fix-475-support-sg-3d-scheduling'
e2c32ffac add unit test for WorkletMapTopology
0e90c22e7 Worklet{MapTopology,PointNeighbor} custom sg/mask

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1980
2020-03-19 11:17:12 -04:00
Vicente Adolfo Bolea Sanchez
e2c32ffac7 add unit test for WorkletMapTopology
Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2020-03-18 10:26:58 -04:00
Kenneth Moreland
0748725806 Make sure return value of cell operations is initialized
Even if an error condition occurs, the output parameter should be
initialized to something. This makes the behavior predicatable on error
conditions and prevents uninitialized variable warnings.
2020-03-14 00:24:13 -06:00
Kenneth Moreland
51e817adc1 Introduce vtkm::ErrorCode
This is a flag that functions in the execution environment can return to
report on the status of the operation. This way they can report an error
without forcing the entire invocation to shut down.
2020-03-13 18:58:33 -06:00
Vicente Adolfo Bolea Sanchez
0e90c22e70 Worklet{MapTopology,PointNeighbor} custom sg/mask
The change affects the method GetThreadIndices for both
WorkletMapTopology and WorkletPointNeighborhood.

Before an scatter or mask which was not ScatterIdentity or MaskNone
was not allowed and it was enforced at compilation time.

Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2020-03-12 11:49:10 -04:00
Kenneth Moreland
04edc3d202 Avoid raising errors when operating on cells
Cell operations like interpolate and finding parametric coordinates can
fail under certain conditions. Typically these call RaiseError on the
worklet. But that can make a worklet unstable, so provide paths where no
error is raised.
2020-03-12 07:50:01 -06:00
Robert Maynard
8377806778 Merge topic 'introduce_mapfield_3d_scheduling'
1f1688483 Initial infrastructure to allow WorkletMapField to have 3D scheduling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1938
2020-02-27 08:02:52 -05:00
Kenneth Moreland
ec34cb56c4 Use new ways to get array portal in control environment
Also fix deadlocks that occur when portals are not destroyed
in time.
2020-02-26 13:10:46 -07:00
Robert Maynard
1f1688483e Initial infrastructure to allow WorkletMapField to have 3D scheduling 2020-02-25 15:23:41 -05:00
Kenneth Moreland
3671cbe168 Fix token issues with CUDA 2020-02-25 09:39:30 -07:00
Kenneth Moreland
ad0a53af71 Convert execution preparation to use tokens
Marked the old versions of PrepareFor* that do not use tokens as
deprecated and moved all of the code to use the new versions that
require a token. This makes the scope of the execution object more
explicit so that it will be kept while in use and can potentially be
reclaimed afterward.
2020-02-25 09:39:19 -07:00
Kenneth Moreland
76ce9c87f0 Support using Token calling PrepareForExecution in ExecutionObject
The old version of ExecutionObject (that only takes a device) is still
supported, but you will get a deprecated warning if that is what is
defined.

Supporing this also included sending vtkm::cont::Token through the
vtkm::cont::arg::Transport mechanism, which was a change that propogated
through a lot of code.
2020-02-25 07:41:39 -07:00
Robert Maynard
f395e084d8 Merge topic 'correct_warnings_from_osx_dashboard'
b9516c116 Correct CellSetStructured compile failures
00235874d Suppress more warning types from thirdparty includes
a52af2d13 Correct double to float warning in CellAspectFrobeniusMetric
cf5ebfb16 Suppress warning about extension use, since all compilers support it
27739660b Add missing constructors/assignment operators
123f8b01a Mark virtual destructors as override where applicable
54118dfca Use noexcept instead of throw() as it was deprecated in c++11

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1943
2020-01-15 15:27:18 -05:00
Robert Maynard
cf5ebfb16e Suppress warning about extension use, since all compilers support it 2020-01-14 11:18:22 -05:00
Robert Maynard
123f8b01aa Mark virtual destructors as override where applicable 2020-01-13 15:54:33 -05:00
Allison Vacanti
539f6e5ad7 Port benchmarking framework to Google Benchmark. 2020-01-08 10:58:51 -05:00
Allison Vacanti
813f5a422f Fixup custom portal iterator logic.
The convenience functions `ArrayPortalToIteratorBegin()` and
`ArrayPortalToIteratorEnd()` wouldn't detect specializations of
`ArrayPortalToIterators<PortalType>` since the specializations aren't
visible when the `Begin`/`End` functions are declared.

Since the CUDA iterators rely on a specialization, the convenience
functions would not compile on CUDA.

Now, instead of specializing `ArrayPortalToIterators` to provide custom
iterators for a particular portal, the portal may advertise custom
iterators by defining `IteratorType`, `GetIteratorBegin()`, and
`GetIteratorEnd()`. `ArrayPortalToIterators` will detect such portals
and automatically switch to using the specialized portals.

This eliminates the need for the specializations to be visible to the
convenience functions and allows them to be usable on CUDA.
2019-12-17 15:39:51 -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
Kenneth Moreland
d5fe4046c5 Remove instances of ListTag in favor of List 2019-12-06 21:32:36 -07:00
Robert Maynard
f89672b71a UnitTestFetchArrayTopologyMapIn now compiles with VS2015
Fixes #445
2019-12-06 09:27:45 -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
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
Robert Maynard
65347bf948 Correct warnings found by GCC 9.2 2019-12-02 09:33:35 -05:00
Sujin Philip
b0592ce4c8 Switch from VTK-c to LCL 2019-10-07 15:38:36 -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
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
Allison Vacanti
3886b7dfb8 Refactor CellSetExplicit to remove NumIndices.
See #408 for details.
2019-09-30 12:27:13 -04:00
Brad King
9a906e4cbf Merge topic 'use-vtkc'
e08d862f9 Use Light-Weight Cell Library
e56b34fc9 Merge branch 'upstream-vtkc' into use-vtkc
e909edd61 vtkc 2019-09-24 (cdc72582)
2a6aadc69 Add update file for VTK-c

Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1852
2019-09-25 09:21:00 -04:00
Sujin Philip
e08d862f94 Use Light-Weight Cell Library 2019-09-24 21:22:10 -04:00
Hank Childs
8af25aca48 move cellmetrics to worklet 2019-09-23 22:27:12 -07:00
Hank
0eb767dc5f Merge topic 'jacobian-cellmetric'
f9d02b374 remove file that should not have been checked in
d59917473 rename half variable to avoid shadowing CUDA global
954e25874 fix problem with filename
91f7e763b fix copyright, warnings, cmake for Jacobian-cellmetric branch
e040ea05e formatting suggestions from KMorel
f4edb6a8e remove trailing whitespace
ccedb5aac Jacobian working, unit test working
560aa1f67 add support for outputname
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1855
2019-09-18 12:08:39 -04:00
Hank Childs
d59917473d rename half variable to avoid shadowing CUDA global 2019-09-17 23:12:23 -07:00
Hank Childs
954e258745 fix problem with filename 2019-09-17 21:31:50 -07:00
Hank Childs
91f7e763bc fix copyright, warnings, cmake for Jacobian-cellmetric branch 2019-09-17 21:15:41 -07:00
Hank Childs
f4edb6a8ed remove trailing whitespace 2019-09-17 14:46:51 -07:00
Hank Childs
ccedb5aac1 Jacobian working, unit test working 2019-09-17 13:41:53 -07:00
Hank Childs
ed15f684ea overhaul workings of mesh quality filter. Unit test a little rocky right now, but heading in the right direction 2019-09-16 17:19:18 -07:00
Robert Maynard
5c56ff945f Label tests which exercise a given Device Adapter
This allows developers an easy way to run all OpenMP tests
2019-09-13 15:52:40 -04:00
Robert Maynard
bc78126876 CUDA 10.1 didn't fix stateless_resource_allocator warnings
The patch to fix this warning from thrust has not be approved
by upstream thrust. So keep suppressing it in CUDA 10.1 update 1
2019-09-12 17:36:12 -04:00
Robert Maynard
c4e1262e14 Correct symbol visibility issues found by ubsan testing 2019-09-11 08:30:49 -04:00
Kenneth Moreland
6c136b978e Remove vtkm::BaseComponent
This functionality has been superseded by VecTraits::BaseComponentType.
The new functionality also supports replacing the BaseComponentType.
2019-09-09 13:01:03 -06:00
Kenneth Moreland
74e0c58046 Fix some precision warnings 2019-08-30 11:33:17 -06:00
Kenneth Moreland
75a060a243 Fix cell derivatives for polygon cell shape
For polygon cell shapes (that are not triangles or quadrilaterals),
interpolations are done by finding the center point and creating a
triangle fan around that point. Previously, the gradient was computed in
the same way as interpolation: identifying the correct triangle and
computing the gradient for that triangle.

The problem with that approach is that makes the gradient discontinuous
at the boundaries of this implicit triangle fan. To make things worse,
this discontinuity happens right at each vertex where gradient
calculations happen frequently. This means that when you ask for the
gradient at the vertex, you might get wildly different answers based on
floating point imprecision.

Get around this problem by creating a small triangle around the point in
question, interpolating values to that triangle, and use that for the
gradient. This makes for a smoother gradient transition around these
internal boundaries.
2019-08-29 17:37:42 -06:00
Allison Vacanti
884616788a Simplify and extend AtomicArray implementation.
- Use AtomicInterface to implement device-specific atomic operations.
- Remove DeviceAdapterAtomicArrayImplementations.
- Extend supported atomic types to include unsigned 32/64-bit ints.
- Add a static_assert to check that AtomicArray type is supported.
- Add documentation for AtomicArrayExecutionObject, including a CAS
  example.
- Add a `T Get(idx)` method to AtomicArrayExecutionObject that does
  an atomic load, and update existing CAS usage to use this instead
  of `Add(idx, 0)`.
2019-08-23 15:40:37 -04:00
Kenneth Moreland
c19b312e58 Fix gradient issue at apex of pyramid cells
The gradient is malformed at the apex of a pyramid. To get around this,
steal a trick from the VTK source where in this case interpolate some
values a little bit into the interior of the cell.

Also expand the gradient worklet tests to include all cell types.
2019-08-19 16:40:58 -06:00
Allison Vacanti
0510c6f053 Patch thrust to be happy with aligned_r_cast<long> and friends. 2019-08-12 15:21:11 -04:00
Abhishek Yenpure
39e278cf0b Fixing unreachable statement nvcc warning 2019-08-08 09:41:44 -07:00
Abhishek Yenpure
2798c737a2 Fixing issues raised by Ken on Gitlab 2019-08-08 09:15:28 -07:00
Abhishek Yenpure
a6df117321 Removing unnecessary commented code 2019-08-07 14:35:15 -07:00
Abhishek Yenpure
aefc5faca6 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into particle_status_merge 2019-08-07 13:06:34 -07:00
Abhishek Yenpure
5776945798 Adding binary search for Rectilinear locator 2019-08-07 12:33:52 -07:00
Abhishek Yenpure
06d05196b5 Adding fast path to Uniform Grid Locator 2019-08-07 12:32:37 -07:00
Abhishek Yenpure
5219d82aab Fixing unreachable code compiler warning 2019-08-07 08:43:11 -07:00
Abhishek Yenpure
4e7b59c65e Adding changes for 2D uniform cell locator 2019-08-06 10:52:10 -06:00
Allison Vacanti
5db762ee71 Refactor topology mappings to clarify meaning.
The `From` and `To` nomenclature for topology mapping has been confusing for
both users and developers, especially at lower levels where the intention of
mapping attributes from one element to another is easily conflated with the
concept of mapping indices (which maps in the exact opposite direction).

These identifiers have been renamed to `VisitTopology` and `IncidentTopology`
to clarify the direction of the mapping. The order in which these template
parameters are specified for `WorkletMapTopology` have also been reversed,
since eventually there may be more than one `IncidentTopology`, and having
`IncidentTopology` at the end will allow us to replace it with a variadic
template parameter pack in the future.

Other implementation details supporting these worklets, include `Fetch` tags,
`Connectivity` classes, and methods on the various `CellSet` classes (such as
`PrepareForInput` have also reversed their template arguments. These will need
to be cautiously updated.

The convenience implementations of `WorkletMapTopology` have been renamed for
clarity as follows:

```
WorkletMapPointToCell --> WorkletVisitCellsWithPoints
WorkletMapCellToPoint --> WorkletVisitPointsWithCells
```

The `ControlSignature` tags have been renamed as follows:

```
FieldInTo --> FieldInVisit
FieldInFrom --> FieldInMap
FromCount --> IncidentElementCount
FromIndices --> IncidentElementIndices
```
2019-08-06 11:27:26 -04:00
Abhishek Yenpure
f30a7ac94c Resolving compiler warnings 2019-08-02 09:40:54 -06:00
Robert Maynard
d8cc39eb8d Always export VTK-m functor symbols
This is done to avoid warnings when compiling VTK-m consumers
with different defaults for symbol visiblity. AKA avoid warnings
like:

```
warning: ‘vtkm::worklet::WorkletMapField’ declared with greater visibility than the type of its field ‘vtkm::worklet::WorkletMapField::<anonymous>’ [-Wattributes]
 class WorkletMapField : public vtkm::worklet::internal::WorkletBase
       ^~~~~~~~~~~~~~~
```
2019-08-01 12:53:54 -04:00
ayenpure
d636dea4e3 Resolving error introduced in merge 2019-07-31 16:02:30 -06:00
ayenpure
3c9413345d Resolving conflict marker 2019-07-31 15:10:32 -06:00
ayenpure
2f2230d1f4 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into 2DLocators 2019-07-31 15:05:53 -06:00
Kenneth Moreland
0be50c119d Update VTK-m code to use new Vec aliases
Should make the code easier to read.
2019-07-31 12:55:40 -06:00
ayenpure
1c9c70f74e Merge branch '2DLocators' of gitlab.kitware.com:ayenpure/vtk-m into 2DLocators 2019-07-30 09:21:33 -06:00
ayenpure
cb01e982c4 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into 2DLocators 2019-07-30 09:20:42 -06:00
Abhishek Dilip Yenpure (-EXP)
65cff4a4a8 Removing constexpr from if conditions 2019-07-22 09:03:08 -06:00
Allison Vacanti
694d1e113d Add methods to BoundaryState to query specific offsets.
The existing functionality worked on radii, but it's helpful to
know if a specific sample location will be in bounds, too.
2019-07-19 15:09:57 -04:00
Kenneth Moreland
79909ecf12 Merge topic 'add_mesh_quality'
b622c7962 Fixed index out of bounds error for the cell counts array
4d61066e9 Removed all modifications in the internal device adapter algorithm header files.
06ac9f721 Revised version of the original mesh quality merge request
e54001367 Added few lines of code missing from cuda device adapter header
3dd34d251 Added custom CopyIf function
417dbcea7 Removed all modifications in the internal device adapter algorithm header files.
50cb805ce Fixed cuda device adapter alg
8c070caa0 Added few lines of code missing from cuda device adapter header
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1714
2019-07-17 15:42:22 -04:00
Abhishek Yenpure
c2fa0467c1 Adding support for evaluating 2D meshes.
- Adding support for evaluating 2D meshes using Rectilinear Grids
- Adding support for particle advection for 2D meshes
2019-07-11 10:45:30 -07:00
Li-Ta Lo
2c6061d37f Merge topic 'locate-points-on-boundary'
461f87dbc Fix issues with PointLocatorUniformGrid not finding all points
e473cb4bb Fix PointLocatorUniformGrid for points on boundary

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !1720
2019-07-11 10:48:49 -04:00
Kenneth Moreland
461f87dbc8 Fix issues with PointLocatorUniformGrid not finding all points
There was a known issue where PointLocatorUniformGrid would quickly quit
once it found a point. Instead, look at one more level of bins just in
case there is a closer one near the boundary. (Still not guaranteed, but
likely.)

Also, fix a typo that caused some bins in the y and z direction to not
be searched.
2019-07-10 09:52:49 -06:00
Brent Lessley
4d61066e9c Removed all modifications in the internal device adapter algorithm header files. 2019-07-03 11:12:19 -07:00
Brent Lessley
06ac9f7219 Revised version of the original mesh quality merge request 2019-07-02 22:35:54 -07:00
Mark Kim
a5027d74d2 clean up warnings.
In clang and vc++
2019-06-24 22:10:32 -04:00
Mark Kim
8a3528d700 consolidate some files
ArrayPortalExtrude and ArrayPortalExtrudePlane
merged into StorageExtrude.h
2019-06-22 00:48:12 -04:00
Mark Kim
fc479aa02c fix warnings 2019-06-21 14:39:23 -04:00
Mark Kim
771c7cb7b3 fix warnings 2019-06-21 12:11:36 -04:00
Mark Kim
978fc2b9c2 Copyright notices. 2019-06-21 11:35:46 -04:00
Mark Kim
cffd3873fc Merge branch 'advdatamodel' 2019-06-20 22:20:44 -04:00
Mark Kim
6e1d3a84f0 First Extrude commit.
how did any of this work?

match other CellSet file layouts.

???

compile in CUDA.

unit tests.

also only serial.

make error message accurate

Well, this compiles and works now.

Did it ever?

use CellShapeTagGeneric

UnitTest matches previous changes.

whoops

Fix linking problems.

Need the same interface

as other ThreadIndices.

add filter test

okay, let's try duplicating CellSetStructure.

okay

inching...

change to wedge in CellSetListTag

Means changing these to support it.

switch back to wedge from generic

compiles and runs

remove ExtrudedType

need vtkm_worklet

vtkm_worklet needs to be included

fix segment count for wedge specialization

need to actually save the index

for the other constructor.

specialize on Explicit

clean up warning

angled brackets not quotes.

formatting
2019-06-20 22:17:24 -04:00
Robert Maynard
512d0431ec Cell and Point locators have correct export visibility
UBSAN found that these execution object had mixed visibility
causing undefined behavior when casting across DSO's.
2019-06-19 08:36:19 -04:00
Robert Maynard
3c85f7f40f Correct undefined behavior from missing export on ErrorMessageBuffer 2019-06-18 13:53:32 -04:00
Dave Pugmire
d4fffe3f2b Merge topic 'add_polyLine'
401b12bd6 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into add_polyLine
fea18190f Specialized cases for cell-edge functions on polylines.
d310ec3aa return type is void. Call vertex/line methods, then just return.
d6898b805 Fix cell deriv for polylines and remove print statements.
9157004ac Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into add_polyLine
d6e2e9588 Remove debugging print statements.
b9d109ab3 Fix for CellEdgeFace test. Case is identical to polygon.
d7e793861 Fix compiler warnings. Comment out std::cout usage for testing with cuda.
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1677
2019-05-31 16:53:07 -04:00
Robert Maynard
6775685c72 Update ThrustPatches to be aware of issues fixed in thrust 1.9.6 2019-05-31 10:08:47 -04:00
Dave Pugmire
fea18190f4 Specialized cases for cell-edge functions on polylines. 2019-05-29 09:53:09 -04:00
Dave Pugmire
d310ec3aa6 return type is void. Call vertex/line methods, then just return. 2019-05-29 08:18:31 -04:00
Dave Pugmire
d6898b8052 Fix cell deriv for polylines and remove print statements. 2019-05-28 13:25:23 -04:00
Dave Pugmire
d6e2e9588e Remove debugging print statements. 2019-05-22 14:37:06 -04:00
Dave Pugmire
b9d109ab3d Fix for CellEdgeFace test. Case is identical to polygon. 2019-05-22 13:08:12 -04:00
Dave Pugmire
d7e793861b Fix compiler warnings. Comment out std::cout usage for testing with cuda. 2019-05-22 12:40:45 -04:00
Dave Pugmire
83cf50d549 Fixes for polyline parameterization. 2019-05-22 11:42:49 -04:00
Dave Pugmire
489995782f Support for polylines. 2019-05-17 13:35:35 -04:00
Robert Maynard
61e8003793 Make sure all execution side CellLocator objects have explicit destructors 2019-04-26 10:10:21 -04:00
Robert Maynard
9937f51fe1 Merge topic 'thrust_patch_order'
63c931e63 Correct location of ThrustPatches which clang formatter moved

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1653
2019-04-23 17:37:05 -04:00
Robert Maynard
6fafcf01fd correct compile issues caused by clang formatting.
A couple of tests require vtkm/testing/Testing to be the first include
2019-04-23 17:16:26 -04:00
Robert Maynard
63c931e639 Correct location of ThrustPatches which clang formatter moved 2019-04-23 15:02:58 -04:00
Robert Maynard
ff687016ee For VTK-m libs all includes of DeviceAdapterTagCuda happen from cuda files
It is very easy to cause ODR violations with DeviceAdapterTagCuda.
If you include that header from a C++ file and a CUDA file inside
the same program we an ODR violation. The reasons is that the C++
versions will say the tag is invalid, and the CUDA will say the
tag is valid.

The solution to this is that any compilation unit that includes
DeviceAdapterTagCuda from a version of VTK-m that has CUDA enabled
must be invoked by the cuda compiler.
2019-04-22 10:39:54 -04:00
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Robert Maynard
ff30684c8e Removes the default device macros from VTK-m
Fixes #116
2019-04-15 08:15:36 -04:00
Robert Maynard
1d980ed147 Thrust Patches tried to apply CUDA 10.1 patches to CUDA 10.0 2019-04-10 14:46:56 -04:00
Robert Maynard
f05940aaca ThrustPatches now only patches fixes for relevant cuda versions
Rather than always patch Thrust functions, we now only patch
based on the Thrust version.
2019-04-10 11:18:42 -04:00
Robert Maynard
20d6201a98 Suppress thrust::mr::stateless_resource_allocator host/device warnings 2019-04-10 09:46:34 -04:00
Robert Maynard
58884a7299 Fix warnings found when cuda is the cuda host compiler 2019-04-05 15:40:03 -04:00
Kenneth Moreland
e43770a376 Update pyexpander input files to work with python 3
Python 3 does not use xrange anymore. Use the range function instead.
2019-04-04 11:20:56 -06:00
Robert Maynard
4f2156dfaf Thrust detail::aligned_reinterpret_cast doesn't warn now
We specialize aligned_reinterpret_cast inside vtk-m to fix the
issues related to missing __host__ __device__ markups on the
function.
2019-04-03 12:48:33 -04:00
Robert Maynard
f4840618cf Make sure ThrustPatches is included before thrust. 2019-04-03 08:51:05 -04:00
Kenneth Moreland
04254dbd25 Merge topic 'specialize-worklet-for-device'
4e34feecb Add ability to specialize worklet for device

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1608
2019-04-02 12:08:01 -04:00
Kenneth Moreland
4e34feecb4 Add ability to specialize worklet for device
This adds an ExecutionSignature tag named Device that passes the
DeviceAdapterTag as an argument to the worklet's operator(). This allows
worklets to specialize their code based on the device.
2019-04-01 10:01:54 -06:00
Dave Pugmire
3bb79a2e4f Add use of 'this->' to adhere to VTK-m coding standards. 2019-04-01 10:00:35 -04:00
Dave Pugmire
611b93e621 Use FloatDefault. 2019-04-01 09:31:17 -04:00
Robert Maynard
b9e0e541b8 VTK-m once again uses consistent include style 2019-03-28 14:12:08 -04:00
Sujin Philip
178da6c0dc Make PointLocatorUniformGrid default constructible
plus some style changes to match VTK-m style.
2019-03-18 16:34:49 -04:00
Dave Pugmire
9b9742f436 Merge branch 'no-recurse-bih' of https://gitlab.kitware.com/kmorel/vtk-m into gridEval 2019-03-15 13:05:39 -04:00
Kenneth Moreland
8127093a2f Add CellLocator to name of BoundingIntervalHierarchy
This will help identify the nature of this object as well as find cell
locator implementations.
2019-03-14 16:13:59 -06:00
Kenneth Moreland
c008df90cc Non-recursive method to find cells in BoundingIntervalHierarchyExec
CUDA devices have problems with recursive algorithms that have no well-
defined depth because the stack on a CUDA device tends to be pretty
short. Fix the problem for BoundingIntervalHierarchyExec by changing to
a state-machine based algorithm that follows the hierarchy up and down.
2019-03-14 15:52:55 -06:00
Kenneth Moreland
c463bbec93 Add parent index to BIH tree
This will help us traverse back up the tree without a call stack (which
is causing issues on CUDA).
2019-03-14 15:52:47 -06:00
Dave Pugmire
533f2e5eb3 Cleanup. 2019-03-14 09:39:56 -04:00
Dave Pugmire
722d4262e1 extend stacksize 2019-03-13 08:17:54 -04:00
Dave Pugmire
2eca1d7a1d Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into gridEval 2019-03-04 14:34:11 -05:00
Kenneth Moreland
191d6e5580 Add Mask capabilities to worklets
Mask objects allow you to specify which output values should be
generated when a worklet is run. That is, the Mask allows you to skip
the invocation of a worklet for any number of outputs.
2019-02-25 08:58:39 -07:00
Kenneth Moreland
1ca55ac319 Add specialized operators for ArrayPortalValueReference
The ArrayPortalValueReference is supposed to behave just like the value
it encapsulates and does so by automatically converting to the base type
when necessary. However, when it is possible to convert that to
something else, it is possible to get errors about ambiguous overloads.
To avoid these, add specialized versions of the operators to specify
which ones should be used.

Also consolidated the CUDA version of an ArrayPortalValueReference to the
standard one. The two implementations were equivalent and we would like
changes to apply to both.
2019-02-20 13:33:55 -07:00
Dave Pugmire
314ebd3dc6 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into gridEval 2019-02-18 14:38:37 -05:00
Dave Pugmire
5a63b19c2b Fixes for uniform cell locator for points right on the boundary. Also added some tests for boundary points. 2019-02-01 08:43:54 -05:00
Dave Pugmire
529b7c2178 Fix issue with points on the boundary. 2019-01-31 11:08:02 -05:00
Dave Pugmire
9974cb064a Fix source file inclusion and copyright test failures. 2019-01-31 08:57:00 -05:00
Robert Maynard
5508d17c31 Merge topic 'correct_broken_install'
24e71d251 VTK-m yet again has properly installed headers.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1525
2019-01-24 14:59:41 -05:00
Robert Maynard
24e71d251b VTK-m yet again has properly installed headers.
Fixes the install issues mentioned in #342
2019-01-24 14:26:40 -05:00
Allison Vacanti
03fc7b66d0 Add VTKM_CUDA_DEVICE_PASS preprocessing definition.
This is only set while compiling device code, and is useful
for code that needs different implementations on devices (e.g.
they call CUDA device intrinsics, etc).
2019-01-24 11:23:45 -05:00
Robert Maynard
d6f66d17a3 Testing run methods now take argc/argv to init logging/runtime device
`vtkm::cont::testing` now initializes with logging enabled and support
for device being passed on the command line, `vtkm::testing` only
enables logging.
2019-01-17 13:16:27 -06:00
Robert Maynard
4ec5bae02d Remove VTK-m TestBuild infrastructure
The purpose of the TestBuild infrastructure was to confirm that
VTK-m didn't have any lexical issues when it was a pure header
only project. As we now move to have more compiled components
the need for this form of testing is mitigated. Combined
with the issue of TestBuilds causing MSVC issues, we should
just remove this infrastructure.
2019-01-16 10:04:33 -06:00