Commit Graph

543 Commits

Author SHA1 Message Date
Allison Vacanti
0d68344769 Add WaveletGenerator worklet. 2018-07-13 14:20:49 -04:00
Robert Maynard
288719045c Merge topic 'colortable_properly_support_explicit_device_execution'
6dc06423d ColorTable can provide vtkm::exec::Colortable to a specific device

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1316
2018-07-12 11:06:07 -04:00
Robert Maynard
6dc06423d8 ColorTable can provide vtkm::exec::Colortable to a specific device
Previously it wasn't possible to get a color table transfered
to a specific device.
2018-07-12 10:28:18 -04:00
Haocheng LIU
69aafb1d46 Merge topic 'Create-warp-by-scale-workletAndFilter'
56993bc9e Add a warpScalar worklet and filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1276
2018-07-11 14:50:32 -04:00
Kenneth Moreland
abfc946f84 Merge topic 'exec-objects-as-alg-sort-compare'
f14021dd8 Shorten code for PrepareArgForExec
3b828608a Support ExecArg behavior in vtkm::cont::Algorithm methods

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1308
2018-07-10 19:01:40 -04:00
Haocheng LIU
56993bc9e2 Add a warpScalar worklet and filter
This commit adds a worklet as well as a filter that modify point coordinates by moving points
along point normals by the scalar amount times the scalar factor.
It's a simpified version of the vtkWarpScalar class in VTK. Additionally the filter doesn't
modify the point coordinates, but creates a new point coordinates that have been warped.
2018-07-09 15:33:25 -04:00
Haocheng LIU
a4c4c1931c Add a warpVector worklet and filter
This commit adds a worklet as well as a filter that modify point coordinates by moving points
along a vector by a certain scalar amount.
It's a simpified version of the vtkWarpVector in VTK.
It doesn't modify the point coordinates, but creates a new point coordinates that have been warped.
2018-07-09 14:22:12 -04:00
Robert Maynard
64958b014b VTK-m now supports passing pointers when invoking worklets.
The original design of invoke and the transport infrastructure
relied on the implementation behavior of vtkm::cont types
such as ArrayHandle that used an internal shared_ptr to managed
state. This allowed passing by value instead of passing by
non-const ref when needing to transfer information to the device.

As VTK-m adds support for classes that use virtuals the ability
to pass by base pointer type allows for us to invoke worklets
using a base type without the risk of type slicing.

Additional by moving over to a non-const ref Invocation we
can update all transports that have 'output' to now be
by ref and therefore support types that can't be copied while
being 'more' correct.
2018-07-06 14:27:36 -04:00
Kenneth Moreland
3b828608a4 Support ExecArg behavior in vtkm::cont::Algorithm methods
Most of the arguments given to device adapter algorithms are actually
control-side arguments that get converted to execution objects internally
(usually a `vtkm::cont::ArrayHandle`). However, some of the algorithms,
take an argument that is passed directly to the execution environment, such
as the predicate argument of `Sort`. If the argument is a plain-old-data
(POD) type, which is common enough, then you can just pass the object
straight through. However, if the object has any special elements that have
to be transferred to the execution environment, such as internal arrays,
passing this to the `vtkm::cont::Algorithm` functions becomes
problematic.

To cover this use case, all the `vtkm::cont::Algorithm` functions now
support automatically transferring objects that support the `ExecObject`
worklet convention. If any argument to any of the `vtkm::cont::Algorithm`
functions inherits from `vtkm::cont::ExecutionObjectBase`, then the
`PrepareForExecution` method is called with the device the algorithm is
running on, which allows these device-specific objects to be used without
the hassle of creating a `TryExecute`.
2018-07-06 18:57:54 +02:00
Sujin Philip
06dee259f7 Minimize cuda synchronizations
1. Have a per-thread pinned array for cuda errors
2. Check for errors before scheduling new tasks and at explicit sync points
3. Remove explicit synchronizations from most places

Addresses part 2 of #168
2018-07-03 14:19:06 -04:00
ayenpure
e319dcd6a1 Adding change log for cell and point locator APIs.
Done towards resolution of https://gitlab.kitware.com/vtk/vtk-m/issues/254
2018-07-03 08:50:05 -06:00
Haocheng LIU
c3e7de617e Add a changelog for cellset's unloading execution resources ability 2018-07-02 15:59:38 -04:00
David Thompson
d8cf1f7b51 Merge topic 'geometry-squashed'
880d8a989 Add `vtkm/Geometry.h` and test it.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1262
2018-06-20 14:15:50 -04:00
David Thompson
880d8a989e Add vtkm/Geometry.h and test it.
This commit adds several geometric constructs to vtk-m
in the `vtkm/Geometry.h` header. They may be used from
both the execution and control environments.

We also add methods to perform projection and Gram-Schmidt
orthonormalization to `vtkm/VectorAnalysis.h`.

See `docs/changelog/geometry.md` included in this commit
for more information.
2018-06-20 11:58:14 -04:00
luz.paz
940c891886 Misc. typos
Found via `codespell` and `grep`
more typos

includes source typo change and a typo that needs further review
follow-up typos


Follow-up typos


Revert a commit
2018-06-14 16:49:11 -04:00
Haocheng LIU
5393745ecd Allow histogram filter to take custom types
By passing TypeList and StorageList into FieldRangeGlobalCompute,
upstream users(VTK) can pass custom types into the histogram filter.
2018-06-11 17:10:24 -04:00
mclarsen
ced5640ca1 updating changelog and readme to reflect openmp 4.0 2018-06-07 08:23:15 -07:00
Kenneth Moreland
9d16fadfc3 Merge topic 'vec-initializer-lists'
157894436 Enable Vec construction with intializer_list of single value
79afe2a16 Simplify make_ArrayHandleSwizzle
ae8d994d2 Add support for initializer lists in Vec

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1239
2018-06-05 12:26:21 -04:00
Kenneth Moreland
1578944360 Enable Vec construction with intializer_list of single value
Previously, the initilaizer_list of Vec had to be the exact
same number of values as the size of the Vec. Now, we also
accept a single value that is duplicated for all values in
the Vec. That allows you to more easily construct lists
of lists with repeated values.
2018-06-04 21:08:26 -05:00
Allison Vacanti
ec0791e941 Add a swap implementation that works on all backend.
Calling std::swap isn't legal from CUDA code, but the new vtkm::Swap
method is safe. It currently does a naive swap when compiling CUDA
code, and falls back to an ADL swap
2018-06-01 14:13:46 -04:00
Allison Vacanti
d833d9285f Merge topic 'openmp'
183bcf109 Add initial version of an OpenMP backend.
7b5ad3e80 Expand device scheduler test to check for overlap.
e621b6ba3 Generalize the TBB radix sort implementation.
d60278434 Specialize swap for ArrayPortalValueReference types.
761f8986f Cache inputs to SSI::Unique benchmark.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1099
2018-05-31 16:49:15 -04:00
Allison Vacanti
183bcf109a Add initial version of an OpenMP backend. 2018-05-31 16:47:48 -04:00
Kenneth Moreland
ae8d994d21 Add support for initializer lists in Vec
Add constructors to the `vtkm::Vec` classes that accept
`std::initializer_list`. The main advantage of this addition is that it
makes it much easier to initialize `Vec`s of arbitrary length.
2018-05-30 16:49:40 -06:00
Haocheng LIU
7d226a4666 Add a common API for CoordinateSystem to unload execution resources
This commit also fixes a bug that ArrayTransfer of ArrayHandleVirtualCoordinate
does not release execution resources properly.
2018-05-30 17:25:54 -04:00
Kenneth Moreland
e9a9ec3411 One of the changelog files was placed in the wrong directory 2018-05-30 07:39:50 -06:00
Kenneth Moreland
6fb6bd702e Add changelog file for changes moving scatter to dispatcher 2018-05-25 14:17:11 -06:00
Robert Maynard
543952e039 add a changelog entry for new cmake design 2018-05-24 10:28:18 -04:00
Haocheng LIU
5c797169ec Use the strong typed enums for vtkm::cont::Field
Since Field association is used either when creating or working
with 'vtkm::cont::Field', it's put in the class itself.
2018-05-22 11:44:51 -04:00
Haocheng LIU
fae8409c9c Add float version operations for vtkm::Math Pi()
This commit also removes the old static_cast<vtkm::float32>vtkm::Pi() usages and
fix serveral conversion warnings.
2018-05-21 10:58:15 -04:00
Robert Maynard
9f4f87c35b Merge topic 'document_more_vtkm_changes_since_1.2.0'
245d27bd Add changelog documents for major changes I made to VTK-m since 1.2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1219
2018-05-19 08:30:23 -04:00
Allison Vacanti
00a9225ce1 Add changelog messages for fancy arrayhandle changes. 2018-05-18 17:39:49 -04:00
Robert Maynard
245d27bd5c Add changelog documents for major changes I made to VTK-m since 1.2 2018-05-18 17:36:22 -04:00
Sujin Philip
d5676214ba Add Changelog for previous commits 2018-05-18 15:24:44 -04:00
David Thompson
00c7905afb Rename vtkm::dot() to vtkm::Dot().
This keeps the old name around but prepares it for removal
in the next release.
2018-05-17 08:51:01 -04:00
David Thompson
dd7c17f776 Compute cell measures (arc length, area, volume).
This commit adds a worklet and a filter to compute
signed integral measures of cells.

It also begins the practic of adding a markdown
changelog entry in `doc/changelog`. See the
changelog entry for details.
2018-05-17 08:50:56 -04:00
Robert Maynard
ee69c7a4b7 Remove VS2013 workarounds from VTK-m. 2018-02-23 15:39:39 -05:00
Kenneth Moreland
0e3b06d301 Update coding conventions
Reformat to look correct in 100 column display.

Update the copyright.

Remove and update some outdated specifications.

Remove description of formatting guidelines. There are done
automatically now.
2017-10-26 10:37:08 -06:00
Kenneth Moreland
fdaccc22db Remove exports for header-only functions/methods
Change the VTKM_CONT_EXPORT to VTKM_CONT. (Likewise for EXEC and
EXEC_CONT.) Remove the inline from these macros so that they can be
applied to everything, including implementations in a library.

Because inline is not declared in these modifies, you have to add the
keyword to functions and methods where the implementation is not inlined
in the class.
2016-11-15 22:22:13 -07:00
Robert Maynard
77121d1871 Add support to VTK-m to build with C++11 2016-08-03 15:38:38 -04:00
Robert Maynard
6b8e7822be The Copyright statement now has all the periods in the correct location. 2015-05-21 10:30:11 -04:00
Robert Maynard
8bd99b3871 Cleanup the documentation for VTK-m 2015-04-28 09:53:50 -04:00
Robert Maynard
2b7a0e0490 revise the header guard naming convention to not conflict with macro names. 2014-03-07 10:22:36 -05:00
Robert Maynard
c00d01be6f Move documents into a directory, instead being in the repos root. 2014-02-10 14:01:22 -05:00