Commit Graph

3169 Commits

Author SHA1 Message Date
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
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