Commit Graph

3370 Commits

Author SHA1 Message Date
Utkarsh Ayachit
ce193592c5 diy: update cmake rules.
DIY Thirdparty module now builds and also generates a
`vtkm/thirdparty/diy/Configure.h` which can in future support external
DIY.
2018-01-03 14:35:00 -05:00
Utkarsh Ayachit
a610329bb2 Merge branch 'upstream-diy' into diy-as-3rd-party
* upstream-diy:
  diy 2018-01-02 (aa778e24)
2018-01-03 14:06:35 -05:00
Utkarsh Ayachit
4339b4e2d2 Add update script for diy. 2018-01-03 14:06:14 -05:00
Utkarsh Ayachit
2aab6ba47e Add 3rd-party harness.
Add docs and scripts for 3rd party modules in VTK-m.

This is an import of scripts from VTK.
2018-01-03 13:58:59 -05:00
Li-Ta Lo
aa96874e82 Merge branch 'connected_component' of gitlab.kitware.com:ollielo/vtk-m into connected_component 2018-01-03 11:30:28 -07:00
Li-Ta Lo
2f07119e56 Merge branch 'master' into connected_component 2018-01-03 11:29:17 -07:00
Li-Ta Lo
746c98e6c8 fix merge conflict with master branch, update to control signature 2018-01-03 11:27:13 -07:00
Utkarsh Ayachit
cac71555e2 Use diy::reduce in MultiBlock reductions.
MultiBlock now uses `diy::reduce` for reductions rather than using proxy
collectives. To support using `diy::reduce` operations on a
vtkm::cont::MultiBlock, added AssignerMultiBlock and
DecomposerMultiBlock classes. This are helper classes that provide DIY
concepts on top of a existing MultiBlock.
2018-01-03 10:23:26 -05:00
Utkarsh Ayachit
e349dd0d1c Use default copy constructor.
vtkm::Bounds and vtkm::Range now uses default copy-constructor and
assignment operator. That way `std::is_trivially_copyable` succeeds for
these basic types.
2018-01-03 10:23:26 -05:00
Li-Ta Lo
2a9439ab1e Merge branch 'master' into connected_component 2018-01-02 17:59:19 -07:00
Li-Ta Lo
cf070581f3 Update UnitTestInnerJoin.cxx 2018-01-02 19:24:10 -05:00
Li-Ta Lo
6b0d73e16c Update UnitTestCellSetDualGraph.cxx 2018-01-02 19:23:32 -05:00
Li-Ta Lo
b4db862cd1 Update UnitTestCellSetConnectivity.cpp 2018-01-02 19:22:54 -05:00
Li-Ta Lo
4c2ef4f89b factor out CellSetConnectivity worklet, cleanup 2018-01-02 16:44:35 -07:00
Robert Maynard
a81919999a Merge topic 'vtkm_host_device_warnings'
93bc0198 Suppress false positive warnings about calling host device functions.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1042
2018-01-02 14:10:54 -05:00
Robert Maynard
93bc0198fe Suppress false positive warnings about calling host device functions. 2018-01-02 10:40:49 -05:00
Sujin Philip
39dd8feeac Merge topic 'fix-ExecutionWholeArray-usage'
6b190312 Cleanup includes of ExecutionWholeArray.h
3e10b504 Replace ExecutionWholeArray with WholeArray

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1039
2018-01-02 10:32:43 -05:00
Sujin Philip
6b19031200 Cleanup includes of ExecutionWholeArray.h 2018-01-02 10:30:16 -05:00
Sujin Philip
3e10b504e6 Replace ExecutionWholeArray with WholeArray 2018-01-02 10:30:16 -05:00
Robert Maynard
437ba96448 Merge topic 'cross_dot_product'
18ece6dc Better type signatures.
2537a1cf Worklets for cross and dot product.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1040
2017-12-29 09:04:41 -05:00
Dave Pugmire
18ece6dce9 Better type signatures. 2017-12-29 06:48:39 -05:00
Robert Maynard
053dccac24 Properly propagate down the VTKM_NO_ASSERT flag to configure file. 2017-12-28 16:44:48 -05:00
Dave Pugmire
2537a1cf56 Worklets for cross and dot product. 2017-12-22 15:20:20 -05:00
Li-Ta Lo
2e88f4220a Connected component for triangle mesh 2017-12-22 10:31:02 -07:00
Robert Maynard
de7162ab8f Merge topic 'compile_in_dataset'
3eb8294b Build vtkm::cont::DataSet into the vtkm_cont library.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <mlarsen@cs.uoregon.edu>
Merge-request: !1032
2017-12-22 08:24:38 -05:00
Sujin Philip
96c22747d5 Merge topic 'fix-field-api'
334262db Fix Field constructors

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1035
2017-12-21 14:51:52 -05:00
Sujin Philip
334262db16 Fix Field constructors
1. Add option to copy user supplied array in make_ArrayHandle.
2. Replace Field constructors that take user supplied arrays with make_Field.
3. Replace CoordinateSystem constructors that take user supplied arrays with
   make_CoordinateSystem.
2017-12-21 12:48:15 -05:00
Matt Larsen
83e51cf42e creating ray tracing benchmark 2017-12-20 14:22:52 -08:00
Matt Larsen
a410650655 trying to create a benchmark for ray tracing 2017-12-20 10:25:16 -08:00
Sujin Philip
fab26344c6 Merge topic 'fix-ManagedMemory-issue'
b530a5ce Fix issue with Managed Memory for 0 size arrays

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1033
2017-12-20 09:39:04 -05:00
Robert Maynard
a6ec3ab093 Merge topic 'enable_all_point_gradient_tests'
a73fc3fd Enable all point gradient worklet tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1031
2017-12-20 08:25:23 -05:00
Robert Maynard
a32394b92b Merge topic 'correct_capitalization_in_datasetwriter'
1d816534 Local var for the array portal instead of inside the for loop.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1029
2017-12-20 08:25:10 -05:00
Sujin Philip
b530a5ce3f Fix issue with Managed Memory for 0 size arrays 2017-12-19 17:18:24 -05:00
Robert Maynard
a73fc3fd0a Enable all point gradient worklet tests 2017-12-19 16:31:47 -05:00
Robert Maynard
3eb8294b24 Build vtkm::cont::DataSet into the vtkm_cont library. 2017-12-19 15:14:30 -05:00
Dave Pugmire
1d8165344f Local var for the array portal instead of inside the for loop. 2017-12-19 11:48:38 -05:00
Dave Pugmire
c6a4e335d9 Normalize worklet (both in place, and copy). 2017-12-19 11:44:30 -05:00
Utkarsh Ayachit
186e686968 Add ability to run tests with mpiexec.
Extends `vtkm_unit_tests` to support running tests with `mpiexec`.
Updates `UnitTestMultiBlock` to use mpi, if available.
2017-12-18 14:45:25 -05:00
Utkarsh Ayachit
1bb7dde971 Update MultiBlock to use diy for block-based operations.
Updating MultiBlock to use `diy` for computing block summaries like
ranges, bounds etc. This makes it possible to MultiBlock to
work in distributed operations without explicit logic.
2017-12-15 15:15:23 -05:00
Utkarsh Ayachit
e9c7e5619c Add EnvironmentTracker to track MPI communicator.
When using MPI, we need a mechanism in VTK-m to set/get the MPI
controller. Added `EnvironmentTracker` to do that.
2017-12-15 15:15:23 -05:00
Utkarsh Ayachit
d52b275e59 Making vtkm-cont depend on diy. 2017-12-15 15:15:23 -05:00
Utkarsh Ayachit
e72ce1e141 Update MultiBlock to follow coding style.
Use `this` and rename `blocks` to `Blocks`.
2017-12-15 10:53:30 -05:00
Robert Maynard
0de08aae06 Merge topic 'teach_brigand_about_cray_compiler'
06c5f161 Teach brigand about more intel compiler limitations introduced in 18.X.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1020
2017-12-14 15:26:06 -05:00
Robert Maynard
06c5f1613f Teach brigand about more intel compiler limitations introduced in 18.X. 2017-12-14 13:40:03 -05:00
Robert Maynard
7420f72c24 Simplify the boilerplate functors in vtkm/cont/Algorithms. 2017-12-12 11:10:52 -05:00
Robert Maynard
a1a23f83d3 Merge topic 'intel_compiler_hangs_on_brigand_crossproduct'
f9f205e9 ListCrossProduct now uses a special version for MSVC2013
c02349a8 ListCrossProduct now uses a lazy evaluation implementation
7b1b9e44 Correctly forward rvalue functors when passed to CastAndCall

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1018
2017-12-12 09:29:50 -05:00
Matt Larsen
c7db823ea0 Merge topic 'algorithm_wrap'
bf6cb1bd removing state from functors and adding variadic templates
013113e3 Fixing streaming scan doc
eaebaea7 adding a wrapper for device adapter algorithm

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1011
2017-12-11 20:28:48 -05:00
Matt Larsen
bf6cb1bd62 removing state from functors and adding variadic templates 2017-12-11 14:15:12 -08:00
Robert Maynard
f9f205e9df ListCrossProduct now uses a special version for MSVC2013
The lazy version that was implemented to get the Intel compiler to work doesn't
work under MSVC2013. Since MSVC2013 is our least c++11 conforming compiler we
add a special MSVS2013 code path, since it will be the first compiler we drop.
2017-12-11 16:27:15 -05:00
Robert Maynard
c02349a8e7 ListCrossProduct now uses a lazy evaluation implementation
The intel compiler could not generate code in a timely manner ( 12+ hours ) when
asked to produce a cross product of very long lists. By moving to a lazy
evaluation scheme we now have all compilers product a cross product in a
reasonable amount of time ( 2-4 seconds ).

This resolves Issues:
- https://gitlab.kitware.com/vtk/vtk-m/issues/190
- https://gitlab.kitware.com/vtk/vtk/issues/17196
2017-12-11 13:31:56 -05:00
Robert Maynard
7b1b9e445a Correctly forward rvalue functors when passed to CastAndCall 2017-12-08 12:02:01 -05:00
Robert Maynard
5ca31f7072 Merge topic 'dispatcher_base_proper_type_for_sizeof'
d51ddda9 Since sizeof returns std::size_t we should iterate using unsigned integers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1016
2017-12-07 08:12:28 -05:00
Robert Maynard
d51ddda9b6 Since sizeof returns std::size_t we should iterate using unsigned integers 2017-12-06 13:57:05 -05:00
Sujin Philip
91f26844a6 Merge topic 'remove-VTKM_EXEC_CONSTANT'
e28309f0 Remove VTKM_EXEC_CONSTANT

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1015
2017-12-06 11:50:55 -05:00
Matt Larsen
39abcb99c3 fixing compile errors 2017-12-05 13:26:45 -08:00
Sujin Philip
e28309f09b Remove VTKM_EXEC_CONSTANT
If a global static array is declared with VTKM_EXEC_CONSTANT and the code
is compiled by nvcc (for multibackend code) then the array is only accesible
on the GPU. If for some reason a worklet fails on the cuda backend and it is
re-executed on any of the CPU backends, it will continue to fail.

We couldn't find a simple way to declare the array once and have it available
on both CPU and GPU. The approach we are using here is to declare the arrays
as static inside some "Get" function which is marked as VTKM_EXEC_CONT.
2017-12-05 13:49:55 -05:00
Matt Larsen
655412fca3 adding support for log plots with the wireframer 2017-12-05 10:00:27 -08:00
Matt Larsen
1d58eeaa9e Merge topic 'annotation_color'
6d616309 let there be foreground color

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1013
2017-12-05 00:13:07 -05:00
Matt Larsen
6d61630928 let there be foreground color 2017-12-04 20:46:38 -08:00
Matt Larsen
17f4e1b51a avoiding zero directions 2017-12-03 09:38:53 -08:00
Robert Maynard
59afc5cba6 Merge topic 'dispatcher_base_leverage_new_cast_and_call'
f6e18ac4 Remove IntegerSequence.h as we don't need it in vtk-m anymore
7f762204 Redesign the Dispatcher to not need FunctionInterface to convert dynamic types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1010
2017-11-29 15:44:24 -05:00
Robert Maynard
f6e18ac452 Remove IntegerSequence.h as we don't need it in vtk-m anymore 2017-11-29 10:55:04 -05:00
Matt Larsen
013113e393 Fixing streaming scan doc 2017-11-29 07:47:06 -08:00
Matt Larsen
eaebaea7cb adding a wrapper for device adapter algorithm 2017-11-29 07:44:37 -08:00
Robert Maynard
7f76220427 Redesign the Dispatcher to not need FunctionInterface to convert dynamic types 2017-11-28 11:01:02 -05:00
Robert Maynard
8be1a71ada Merge topic 'per_thread_runtime_tracker'
9ae3098a Give each thread using vtk a separate runtime device tracker

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1008
2017-11-24 08:54:06 -05:00
Robert Maynard
9ae3098af8 Give each thread using vtk a separate runtime device tracker 2017-11-21 16:43:40 -05:00
Robert Maynard
2467411ecc Merge topic 'variadic_CastAndCall_and_TryExecute'
203205a1 TryExecute RuntimeDeviceTracker can't be a const ref anymore.
dfb9cc62 Allow users to pass multiple arguments to TryExecute
5384305d Update tests and a single worklet to verify new CastAndCall works
2ff14a81 Allow users to pass multiple arguments to CastAndCall

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1005
2017-11-13 17:56:20 -05:00
Matt Larsen
56f302d0a9 fixing axis ticks 2017-11-13 08:34:05 -08:00
Robert Maynard
203205a171 TryExecute RuntimeDeviceTracker can't be a const ref anymore.
Previously we allowed a const ref as we would make a copy, this only works
as it relies on  RuntimeDeviceTracker implementing state through a shared_ptr.
Instead if we require modifiable types only we can make TryExecute more
efficient and clearer on what it does.
2017-11-10 10:02:45 -05:00
Robert Maynard
dfb9cc6236 Allow users to pass multiple arguments to TryExecute 2017-11-09 12:45:00 -05:00
Robert Maynard
5384305d25 Update tests and a single worklet to verify new CastAndCall works 2017-11-08 13:19:05 -05:00
Robert Maynard
2ff14a811f Allow users to pass multiple arguments to CastAndCall 2017-11-08 13:19:05 -05:00
Robert Maynard
dd25c5c2eb DynamicCellSet CastAndCall refactored to use the new vtkm::ForEach 2017-11-08 12:48:09 -05:00
Robert Maynard
c9f1d19233 DynamicArrayHandle CastAndCall refactored to use the new vtkm::ForEach 2017-11-08 12:48:09 -05:00
Robert Maynard
68381d9fe5 Rework TryExecute to leverage perfect forwarding.
By using perfect forwarding we can reduce not only the amount of TryExecute
signatures, but we can enable the ability to pass temporary functors to
TryExecute.

At the same time we have optimized TryExecute by moving the string generation
code into a single function that is compiled into the vtkm_cont library.

The end result is that the vtkm_rendering library size has been reduced from
12MB to 11MB, and we shave off about 5% of our build time.
2017-11-08 12:48:09 -05:00
Robert Maynard
cc71e8ec6e vtkm::ListForEach can handle passing any number of extra arguments
Rather than requiring all the arguments to be placed as member variables to
the functor you can now pass extra arguments that will be added to the functor
call signature.

So for example:

  vtkm::ForEach(functor, vtkm::TypeListTagCommon(), double{42.0}, int{42});

will be converted into:

  functor(vtkm::Int32, double, int)
  functor(vtkm::Int64, double, int)
  functor(vtkm::Float32, double, int)
  functor(vtkm::Float64, double, int)
  ...
2017-11-08 08:24:47 -05:00
Robert Maynard
55d4b9bb12 Merge topic 'better_cast_and_call'
5d194f8b Document other specialization of vtkm::cont::CastAndCall
3701776e Refactor DynamicArrayHandle CastAndCall

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !999
2017-11-07 16:42:16 -05:00
Robert Maynard
5d194f8ba9 Document other specialization of vtkm::cont::CastAndCall 2017-11-07 13:20:47 -05:00
Robert Maynard
3701776e8d Refactor DynamicArrayHandle CastAndCall
This is the first step in making a more efficient CastAndCall for
DynamicArrayHandle.
2017-11-07 13:20:46 -05:00
Sujin Philip
3f608450cd Merge topic 'new-virtual-objects'
8c242cef Switch from faux to true virtuals

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !991
2017-11-07 09:12:17 -05:00
Sujin Philip
8c242cef91 Switch from faux to true virtuals 2017-11-06 15:25:29 -05:00
Robert Maynard
eafd5cc075 Stop providing the VTKM_OVERRIDE define.
This define should not be used as VTK-m requires C++11 and prefers the
override keyword.
2017-11-06 14:46:32 -05:00
Robert Maynard
280ea84990 Merge topic 'correct_mc_regression'
b3a7c697 MarchingCubes: Now is able to run on Uint8/Int8 types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !995
2017-11-03 10:39:09 -04:00
Robert Maynard
6b6ee99860 Merge topic 'allow_allocation_hints_for_better_uvm_perf'
a6eecbe9 ExecutionArrayInterface now can hint at how allocated memory will be used.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !994
2017-11-03 09:26:54 -04:00
Robert Maynard
b3a7c69786 MarchingCubes: Now is able to run on Uint8/Int8 types
The speed improvement fix regressed support for non scalar types, this
correct that issue.

The issue was found while trying to bump the VTK-m version inside VTK.
2017-11-02 14:28:44 -04:00
Matt Larsen
a704e39989 Merge topic 'visit_changes'
f6ead29c Removing a debug variable that was causing cuda to crash
565e69c5 Merge branch 'master' into visit_changes
81afcb62 further removing debug statements
a3bf1b26 Merge branch 'master' of https://gitlab.kitware.com/mclarsen/vtk-m into visit_changes
fdd5d1c8 removing debug statements
e60e330c Merge branch 'connectivity_tracer_additions' into visit_changes
2cb26b2d something
0bea9ce9 tracking path lengths if present
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !992
2017-11-02 14:17:01 -04:00
mclarsen
f6ead29cea Removing a debug variable that was causing cuda to crash 2017-11-02 08:13:54 -07:00
Robert Maynard
a6eecbe9ac ExecutionArrayInterface now can hint at how allocated memory will be used.
Certain backends desire the ability to mark allocations as being used for
reading versus writing to improve performance.
2017-11-02 10:12:57 -04:00
Robert Maynard
e49f27a3ac Remove all uses of VTKM_OVERRIDE at instead just use override.
Since VTK-m now requires C++11 it is safe to remove our custom defines
and move to using the keyword directly.
2017-11-02 09:18:15 -04:00
Matt Larsen
565e69c578 Merge branch 'master' into visit_changes 2017-11-01 15:20:47 -07:00
Matt Larsen
81afcb62ba further removing debug statements 2017-11-01 14:41:51 -07:00
Matt Larsen
a3bf1b261e Merge branch 'master' of https://gitlab.kitware.com/mclarsen/vtk-m into visit_changes 2017-11-01 14:02:15 -07:00
Matt Larsen
fdd5d1c8e5 removing debug statements 2017-11-01 14:00:38 -07:00
Robert Maynard
49297252c0 Merge topic 'windows_timeout_fixes'
27d12752 Correct issues on windows with debug tests timing out.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !990
2017-11-01 10:35:12 -04:00
Robert Maynard
27d1275249 Correct issues on windows with debug tests timing out.
The tests actually raised a std assert which was causing a timeout as it
required user intervention to click through.
2017-10-31 13:35:13 -04:00
Robert Maynard
4f03ca319d Merge topic 'better_mc_compile_times'
32148cdb A first pass at improving the compile time of MarchingCubes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <mlarsen@cs.uoregon.edu>
Merge-request: !989
2017-10-31 13:18:34 -04:00
Robert Maynard
32148cdb56 A first pass at improving the compile time of MarchingCubes 2017-10-30 08:25:19 -04:00
Sujin Philip
72f47f72c4 Merge topic 'remove-arrayhandle-copyinto'
5842da49 Remove ArrayHandle CopyInto

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !988
2017-10-27 17:41:17 -04:00
Sujin Philip
5842da4921 Remove ArrayHandle CopyInto
Fixes #170
2017-10-27 17:28:59 -04:00
Robert Maynard
f366c6fb4b Merge topic 'correct_64bitdoulbe_particle_advection_failures'
fb894f56 ParticleAdvection GridEvaluators now work when vtkm::FloatDefault is double

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !984
2017-10-27 10:05:27 -04:00
Matt Larsen
069ec23f21 Merge topic 'support_2D_and_1D_plots'
f4739743 Fixing error with uninitialized variable
aeeb954f correcting typo
46f58dff fixing various warnings
14b7789f fixing ambiguous min max call
45003311 Merge remote-tracking branch 'upstream/master' into support_2D_and_1D_plots
73255080 removing debug statements
035814a4 adding 2d ortho support to ray tracing and updating WireFramer to support 2d lines and 1D line plots

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !985
2017-10-26 19:23:23 -04:00
mclarsen
f473974310 Fixing error with uninitialized variable 2017-10-26 14:17:49 -07:00
Robert Maynard
040e280eb4 Merge topic 'singular_matrix_failure'
ba1c1b8e Work around more compiler optimization bugs with UnitTestMatrix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !986
2017-10-26 13:49:38 -04:00
Robert Maynard
ba1c1b8ebf Work around more compiler optimization bugs with UnitTestMatrix 2017-10-26 13:25:58 -04:00
Matt Larsen
aeeb954fd0 correcting typo 2017-10-26 08:38:21 -07:00
Matt Larsen
46f58dffc6 fixing various warnings 2017-10-26 08:36:27 -07:00
Matt Larsen
14b7789fd6 fixing ambiguous min max call 2017-10-26 08:32:06 -07:00
Matt Larsen
450033110c Merge remote-tracking branch 'upstream/master' into support_2D_and_1D_plots 2017-10-26 08:10:50 -07:00
Matt Larsen
7325508093 removing debug statements 2017-10-26 08:01:00 -07:00
Matt Larsen
035814a4a7 adding 2d ortho support to ray tracing and updating WireFramer to support 2d lines and 1D line plots 2017-10-26 07:58:02 -07:00
Robert Maynard
fb894f56c4 ParticleAdvection GridEvaluators now work when vtkm::FloatDefault is double 2017-10-26 10:19:54 -04:00
Sujin Philip
1b24cf8d2c Merge topic 'fix-cell-locator'
5ada2812 Some fixes for CellLocatorTwoLevelUniformGrid

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !979
2017-10-25 11:45:28 -04:00
Li-Ta Lo
3acd7c37a1 Merge topic 'pointlocator'
ed3a64a5 Coding style improvment
7fa800b7 Update TestingPointLocatorUniformGrid.h
f1974cab Update TestingPointLocatorUniformGrid.h
508882fa PointLocatorUniformGrid

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !973
2017-10-25 10:42:07 -04:00
Kenneth Moreland
37d0100828 Merge topic 'correct-simple-unique'
7a2ef646 Correct the implementation of DeviceAdapterAlgorithmGeneral::Unique

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !982
2017-10-25 10:30:10 -04:00
Kenneth Moreland
b3fcc82d27 Merge topic 'scan-exclusive-by-key-type-mismatch'
e50ec6b6 Fix type error in ScanExclusiveByKey

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !981
2017-10-25 10:29:43 -04:00
Kenneth Moreland
f577591d9a Merge topic 'scan-exclusive-doc'
038e12e0 Document ScanExclusive algorithm

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !980
2017-10-25 10:29:16 -04:00
Kenneth Moreland
7a2ef6464a Correct the implementation of DeviceAdapterAlgorithmGeneral::Unique
The implementation of the simplified version of
DeviceAdapterAlgorithmGeneral::Unique had two errors.

First, the implementation is such that it calls the more complex version
of Unique (which specifies a binary predicate to establish equality).
However, it was not calling the Unique method in the DerivedAlgorithm
like it should have been. Instead, it was calling its own Unique
algorithm, which might not be as efficient as the specialized Unique for
the device.

Second, it was using std::equal_to as its binary predicate. Using
functors from std can be dangerous because they are not marked with
VTKM_EXEC, so have the potential to not work in the execution
environment. Instead, use the readily available vtkm::Equal binary
predicate.
2017-10-24 16:57:18 -06:00
Li-Ta Lo
ed3a64a512 Coding style improvment
Capitalize the first character of data members. Rename Run() to FindNearestPoint().
2017-10-24 18:26:01 -04:00
Kenneth Moreland
e50ec6b667 Fix type error in ScanExclusiveByKey
The implementation of ScanExclusiveByKey in
DeviceAdapterAlgorithmGeneral by shifting values in the input values
array and then calling ScanInclusiveByKey. However, the temporary
shifted values array was created using the key type instead of the
values type. This caused a compile error when the keys and values had
different types.
2017-10-24 16:12:30 -06:00
Allison Vacanti
ef6a3b8288 Merge topic 'cuda_hint_fixes'
5a99dd76 Only use cuda hints for CUDA 8.0+.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !978
2017-10-24 17:14:20 -04:00
Sujin Philip
5ada281293 Some fixes for CellLocatorTwoLevelUniformGrid
1. Fix incorrect computation of grid dimensions.
2. Add checks for empty bounding box of bins.
3. Workaround issues caused by floating point precision.
2017-10-24 16:30:45 -04:00
Kenneth Moreland
038e12e09f Document ScanExclusive algorithm
The documentation for one of the versions of ScanExclusive was
missing in doxygen.
2017-10-24 14:29:57 -06:00
Allison Vacanti
5a99dd761b Only use cuda hints for CUDA 8.0+. 2017-10-24 11:55:07 -04:00
Allison Vacanti
e9633e1dea Move some MSVC warning disablers to Configure.h
These useless warnings are popping up in VTK/ParaView builds that use
VTKm. Moving them to a header so other projects will get them.
2017-10-23 15:16:49 -04:00
Allison Vacanti
40441e78e6 Fix some additional warnings. 2017-10-23 11:48:19 -04:00
Allison Vacanti
a90afa5abf Clean up warnings introduced by recent benchmark modifications. 2017-10-20 16:23:36 -04:00
Li-Ta Lo
7fa800b7f3 Update TestingPointLocatorUniformGrid.h 2017-10-19 16:04:55 -04:00
Li-Ta Lo
f1974cab5a Update TestingPointLocatorUniformGrid.h
Add a empty new line at the end of file.
2017-10-19 16:00:06 -04:00
Li-Ta Lo
508882fa21 PointLocatorUniformGrid
Provide an accelerated neareast neighbor search of points in the
dataset using a one layer uniform grid.
2017-10-19 11:44:36 -06:00
Allison Vacanti
4cd791932b Ensure that Pair and Vec are trivial classes.
For std::copy to optimize a copy to memcpy, the valuetype must be both
trivially constructable and trivially copyable.

The new copy benchmarks highlighted an issue that std::copy'ing pairs
and vecs were not optimized to memcpy. For a 256 MiB buffer on my
laptop w/ GCC, the serial copy speeds were:

UInt8:                 10.10 GiB/s
Vec<UInt8, 2>           3.12 GiB/s
Pair<UInt32, Float32>   6.92 GiB/s

After this patch, the optimization occurs and a bitwise copy occurs:

UInt8:                 10.12 GiB/s
Vec<UInt8, 2>           9.66 GiB/s
Pair<UInt32, Float32>   9.88 GiB/s

Check were also added to the Vec and Pair unit tests to ensure that
this classes continue to be trivial.

The ArrayHandleSwizzle test was refactored a bit to eliminate a new
'possibly uninitialized memory' warning introduced with the default
Vec ctors.
2017-10-18 14:58:35 -04:00
Allison Vacanti
d465d03047 Add benchmark to print copy speeds. 2017-10-18 10:53:30 -04:00
Allison Vacanti
b582b07983 Modify Benchmarker to expose samples and reduce iterations. 2017-10-18 10:42:50 -04:00
Allison Vacanti
d0fa70deb5 Reduce overhead and fix bugs in device adapter benchmarks. 2017-10-18 10:14:09 -04:00
Allison Vacanti
05419719d5 Add more options to the device adapter algorithm benchmark. 2017-10-17 16:21:17 -04:00
Sujin Philip
d6ce8000f4 Workaround an Intel compiler bug
Fixes a linker error about not finding 'LinearBVH::ConstructOnDevice'
2017-10-16 12:17:04 -04:00
Sujin Philip
800bcf3124 Merge topic 'fix-intel-link-bug'
ecb99acb Workaround intel compiler bug

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <mlarsen@cs.uoregon.edu>
Merge-request: !969
2017-10-12 16:46:33 -04:00
Sujin Philip
ecb99acb5e Workaround intel compiler bug
Fixes issue #179
2017-10-12 13:32:39 -04:00
Allison Vacanti
7b66dece45 Add equality operators that handle different handle types.
In generic code, it's a pain to use the equality operators since they
requires the ValueType and Storage to match, else the operator is undefined.
This commit adds operators for such comparisons, as well as a unit test.
2017-10-11 17:25:13 -04:00
Allison Vacanti
1653f20e7c Add missing typedef to portal. 2017-10-11 17:24:05 -04:00
Allison Vacanti
6c2f22b5ce Overcome narrowing warning on MSVC. 2017-10-11 17:24:04 -04:00
Allison Vacanti
1018d981a0 Check for overlap in CopySubRange.
Some parallel copy implementations will not handle this sanely.
2017-10-11 16:52:32 -04:00
Allison Vacanti
374321e027 Use std::copy in TBB copy routines. 2017-10-11 16:52:32 -04:00
Allison Vacanti
825f351d04 Use std::copy in serial Copy implementation.
I had assumed that the compiler would be clever enough to turn the
iterative implementation of Copy into a memcpy, but inspecting the
disassembly on a release GCC build shows that this is not the case,
likely because it can't assume that the memory ranges do not overlap.

Replacing the loop with std::copy speeds things up (about 30-50%) for
most data types, though there is a slight (usually < 5%) slowdown for
Vec types. The uint8 copy improved by a factor of 8.

Comparison:
| Speedup | iteration            | std::copy            | Benchmark (Type) |
|---------|----------------------|----------------------|------------------|
|   1.363 | 0.001590 +- 0.000087 | 0.001166 +- 0.000049 | Copy 2097152 values (vtkm::Float32) |
|   1.487 | 0.003429 +- 0.000185 | 0.002305 +- 0.000146 | Copy 2097152 values (vtkm::Float64) |
|   1.379 | 0.001568 +- 0.000072 | 0.001137 +- 0.000093 | Copy 2097152 values (vtkm::Int32) |
|   1.420 | 0.003410 +- 0.000173 | 0.002402 +- 0.000101 | Copy 2097152 values (vtkm::Int64) |
|   1.303 | 0.001564 +- 0.000083 | 0.001201 +- 0.000078 | Copy 2097152 values (vtkm::UInt32) |
|   7.204 | 0.002441 +- 0.000104 | 0.000339 +- 0.000029 | Copy 2097152 values (vtkm::UInt8) |
|   0.987 | 0.006602 +- 0.000266 | 0.006688 +- 0.000291 | Copy 2097152 values (vtkm::Vec< vtkm::Float32, 4 >) |
|   0.965 | 0.010065 +- 0.000528 | 0.010427 +- 0.000617 | Copy 2097152 values (vtkm::Vec< vtkm::Float64, 3 >) |
|   0.979 | 0.003327 +- 0.000191 | 0.003398 +- 0.000142 | Copy 2097152 values (vtkm::Vec< vtkm::Int32, 2 >) |
|   0.851 | 0.001579 +- 0.000090 | 0.001856 +- 0.000098 | Copy 2097152 values (vtkm::Vec< vtkm::UInt8, 4 >) |
2017-10-11 16:52:32 -04:00
Allison Vacanti
b396716f86 Merge topic 'vertexclustering-reducepoints'
8fabece1 Use median point from cluster as representative vertex.
c7bf0c95 Compute PointIdMap while reducing cluster ids.
5dee7c6a Select input point from cluster rather than averaging.
28e76ddb Update vertex clustering benchmarking code.
e3c9e7bb Optimize cell map computation.
d7669650 Use requested grid in VertexClustering worklet.
0472dc11 Fix warning on Cuda.
3f4e17e2 Add field mapping to VertexClustering.
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !960
2017-10-11 16:25:30 -04:00
Sujin Philip
4253d12062 Merge topic 'cell-locator'
41679cb5 Add a CellLocator
02f48cfa Fix multiple declaration of DistributeCellData
9e0650ad Update Newton's Method to return solution status

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !957
2017-10-11 09:37:51 -04:00
Robert Maynard
6c695a1b6e Merge topic 'fixes_184_empty_reduce'
34361dd1 DeviceAdapterAlgorithmSerial ReduceByKey handles zero size key/values

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !965
2017-10-11 08:55:09 -04:00
Sujin Philip
41679cb5f9 Add a CellLocator
Implements a two-level uniform grid cell locator
2017-10-10 14:01:41 -04:00
Sujin Philip
02f48cfaaa Fix multiple declaration of DistributeCellData 2017-10-10 14:01:41 -04:00
Sujin Philip
9e0650adf2 Update Newton's Method to return solution status 2017-10-10 14:01:41 -04:00
Sujin Philip
730fa4390a Update cuda 9 workaround for cuda 9 final release 2017-10-10 11:34:29 -04:00
Matt Larsen
e60e330c57 Merge branch 'connectivity_tracer_additions' into visit_changes 2017-10-10 07:39:53 -07:00
mclarsen
2cb26b2de6 something 2017-10-10 07:32:32 -07:00
Allison Vacanti
8fabece187 Use median point from cluster as representative vertex.
Also uses the recently added StableSortIndices worklet to produce the
cell map.
2017-10-10 10:28:51 -04:00
Allison Vacanti
c7bf0c95f4 Compute PointIdMap while reducing cluster ids. 2017-10-10 10:28:51 -04:00
Allison Vacanti
5dee7c6a5d Select input point from cluster rather than averaging.
This is a bit counterintuitive, but choosing a random point from each
cluster rather than averaging them gives a better visual result. The
averages poorly represent an surface that runs through the grid block and
tends to bias the output points towards the center of each block, creating
very noticeable grid artifacts that look blocky.
2017-10-10 10:28:51 -04:00
Allison Vacanti
28e76ddbfd Update vertex clustering benchmarking code.
Reset the timer after each print to make the output more usable.
2017-10-10 10:28:51 -04:00
Allison Vacanti
e3c9e7bbce Optimize cell map computation.
Rather than sorting and reducing the list by key, sorting and uniquing
an index array with an indirection functor is faster.
2017-10-10 10:28:51 -04:00
Allison Vacanti
d766965000 Use requested grid in VertexClustering worklet.
This is to match the default behavior of vtkQuadricClustering. If we
want to add this functionality back, it should go into the filter as
an option that adjusts nDivisions before calling the worklet.
2017-10-10 10:28:51 -04:00
Allison Vacanti
0472dc1198 Fix warning on Cuda.
assert(false && ""); emitted a

"warning : controlling expression is constant"

Replace the assertion with an exception, which is more appropriate here
anyway.
2017-10-10 10:28:51 -04:00
Allison Vacanti
3f4e17e2a2 Add field mapping to VertexClustering. 2017-10-10 10:28:51 -04:00
Allison Vacanti
9c332674ae Remove unused comparison operator. 2017-10-10 10:28:51 -04:00
Allison Vacanti
5420368ae0 Add fields to the cow nose testing dataset. 2017-10-10 10:28:51 -04:00
Allison Vacanti
c2a7e4faba Adapt ReduceByKey to handle ArrayHandleDiscard for output keys.
Often times we don't care about the output keys, and it's useful to
be able to pass an ArrayHandleDiscard into the algorithm to save
memory in these cases.
2017-10-10 10:28:51 -04:00
Allison Vacanti
9fe7cb4542 Add struct to simplify detection of ArrayHandleDiscards.
This makes it easier to adapt algorithms to avoid reading from
discard arrays.
2017-10-10 10:28:51 -04:00
Robert Maynard
34361dd15a DeviceAdapterAlgorithmSerial ReduceByKey handles zero size key/values 2017-10-10 10:12:59 -04:00
Kenneth Moreland
82c97e0d14 Merge topic 'array-copy-regression'
e149dcf1 Specify device adapter for array copy in worklet tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !961
2017-10-10 09:30:56 -04:00
Robert Maynard
189b668e54 The interop/cuda headers aren't testable.
The headers in this location presume you are linking/including GL which
isn't done as part of the header tests.
2017-10-09 09:40:52 -04:00
Robert Maynard
e20b64151c Merge topic 'consistent_forward_declares'
f8f1adc9 Forward decleare DeviceAdapterAlgorithm correctly as a struct

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !962
2017-10-09 08:42:38 -04:00
Matt Larsen
86b2757505 Merge topic 'simplify_triangulator'
2326dca0 simplify triangulator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !963
2017-10-06 23:30:18 -04:00
Matt Larsen
2326dca0a2 simplify triangulator 2017-10-06 16:08:29 -07:00
Robert Maynard
f8f1adc962 Forward decleare DeviceAdapterAlgorithm correctly as a struct 2017-10-06 09:50:12 -04:00
Allison Vacanti
5ec29128de Merge topic 'install_hooks'
c0a73159 Clean up install/VTK issues in VTKmConfig.cmake.
30f4151b Add missing headers to examples.
a2a55eda Install cuda interop headers.
85062a3a Add version info to installed cmake config files.
75f88b4c Add versioning to VTKM installed include/share dirs.
b3852e8d Add versioning to VTKM libraries.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !958
2017-10-04 10:55:36 -04:00
Kenneth Moreland
e149dcf1c1 Specify device adapter for array copy in worklet tests
Rob noticed a degridation in performance in some worklet tests when
ArrayCopy was added. I hypothesize that this slowdown is doing the array
copy with TBB instead of serial in the serial tests. (There have been
some checks in the existing code to suggest that some operations in TBB
can be slower than serial.) This change forces the array copy to be on
the device for which we are testing.
2017-10-03 14:18:39 -07:00
Robert Maynard
fe028d828a Merge topic 'marching_cubes_faster_structured_normals'
1147edb1 MarchingCubes now uses Gradient fast paths when possible.
d7d5da4f More changes to Neighborhood code to make it more easy to use.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !916
2017-10-03 15:44:16 -04:00
Allison Vacanti
a934ab82f8 Merge topic 'stable_sort_keys'
fd311f57 Update worklet::Keys to stable sort keys and not modify input.
d6b2896a Add StableSortIndices worklet.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !954
2017-10-03 14:04:53 -04:00
Allison Vacanti
a2a55edaff Install cuda interop headers.
Looks like a missing subdirectory call. Also disabled testbuilds since
these need external OpenGL setup.
2017-10-02 12:33:30 -04:00
Allison Vacanti
75f88b4c46 Add versioning to VTKM installed include/share dirs. 2017-10-02 11:39:10 -04:00
Allison Vacanti
fd311f5716 Update worklet::Keys to stable sort keys and not modify input.
This ensures that the order of the values presented to the
WorkletReduceByKey functor is consistent.

After this change, the key array used to build the worklet::Keys object
is no longer modified. The sorted keys can be obtained by using permuting
the input keys with Keys::GetSortedValuesMap().
2017-09-28 13:02:33 -04:00
Allison Vacanti
d6b2896ad9 Add StableSortIndices worklet.
This worklet produces an index array that permutes a key array into a
stable sorted order.
2017-09-28 13:02:33 -04:00
Dave Pugmire
d6edab8e50 Fix comment for streamline filter. 2017-09-28 08:09:57 -04:00
Dave Pugmire
f303c52f20 fix copyright. 2017-09-28 07:30:38 -04:00
Dave Pugmire
3f4a31f43a copyright changes. 2017-09-28 07:23:43 -04:00
Dave Pugmire
4b74c4d506 Fix copyright statement. 2017-09-28 07:09:05 -04:00
Dave Pugmire
78d7f5ba72 Fix return value to reflect that no mapping was done. 2017-09-27 21:38:38 -04:00
Dave Pugmire
f089598280 compiler warning. 2017-09-27 21:38:38 -04:00
Dave Pugmire
ca5507e6f3 compile warning. 2017-09-27 21:38:38 -04:00
Dave Pugmire
33e25c7aa9 Ken inspired fix for compiler errors. 2017-09-27 21:38:38 -04:00
Dave Pugmire
0a0ee460d3 Formating. 2017-09-27 21:38:38 -04:00
Dave Pugmire
ca57343a9b compiler warnings. 2017-09-27 21:38:37 -04:00
Dave Pugmire
99672d75a2 format warnings. 2017-09-27 21:38:37 -04:00
Dave Pugmire
ee9c158449 Compiler errors and warnings. 2017-09-27 21:38:37 -04:00
Dave Pugmire
e7fac3d873 Wrap the streamline functionality with a filter. 2017-09-27 21:38:37 -04:00
Kenneth Moreland
aa0a7bdceb Fix ambiguous make_ArrayHandleCast template
In a previous commit I made a version of make_ArrayHandleCast that
returned the same array if no cast was needed. That should shorten
template type names and make them easier to read. However, some
compilers were having trouble distinguishing between the two versions I
had created. This change uses an internal structure to make the
resolution easier.
2017-09-27 10:56:22 -06:00
Kenneth Moreland
091881d2a4 Use default storage in ArrayHandleCompositeVector test
The idea of the test was to turn off the "default" storage to ensure
that the fancy array was not making assumptions about the storage of its
delegate array. But there is lots of code elsewhere that uses the
default storage (rightly so) to create intermediate arrays, which will
fail if you disable the default storage. This was causing a test to
fail, so turn default storage back on for this case.
2017-09-27 10:05:24 -06:00
Kenneth Moreland
2625ae7866 Update VTK-m source to use new ArrayCopy functionality 2017-09-25 16:54:46 -06:00
Kenneth Moreland
f4ff589a9d Add version of ArrayCopy that takes a device adapter
This is still more convenient than declaring DeviceAdapterAlgorithm just
to copy two arrays. Now the function works whether or not you know what
the device should be.
2017-09-25 16:54:24 -06:00
Kenneth Moreland
65c7324ffe Create ArrayCopy method
This is a convenience method to do a deep copy of an array. This comes
up a lot, but can be a pain if you don't have a specific device adapter
on which to do the copy.
2017-09-25 16:28:44 -06:00
Robert Maynard
1147edb192 MarchingCubes now uses Gradient fast paths when possible.
When running on image data we now use central differences to compute the point
gradient
2017-09-25 14:25:28 -04:00
Robert Maynard
fe8b75f7bf Consistenly use nullptr in vtk-m. 2017-09-25 09:57:23 -04:00