Commit Graph

4598 Commits

Author SHA1 Message Date
Matthew Letter
7eb3556491 Created an execution object for Texture2D
abstracted out the execution object from the execution object factory and removed the device template from the factory.
2018-05-03 14:45:22 -06:00
Matthew Letter
7cb2421edf moved a function out of the execution environment
The factory should not eb being called from the execution environment.
2018-05-03 14:45:22 -06:00
Matthew Letter
35085442b4 cleaning up compilation warings in particles.h 2018-05-03 14:45:22 -06:00
Matthew Letter
b016d5eeaa fixed the compiler errors for particle and particle advection worklet
there was an error involving const and prepareforinput between the particle's const prepareforexecution function and array handle prepareforinput.
2018-05-03 14:45:22 -06:00
Matthew Letter
b693d8bed5 removed particle abstraction
removed the abstraction of particle and stateparticle so they are not inheriting each other
2018-05-03 14:45:22 -06:00
Matthew Letter
d3fde1f870 creating a execution object facotry for particles
abstracted out particles into an execution object and a factory that populates said execution object based on its state. removed the facotries dependance on a device adaptor.
2018-05-03 14:45:22 -06:00
Matthew Letter
0ea68f6c41 removed execution object base from code base
since we no longer use execution object base in the code base it is being removed
2018-05-03 14:45:22 -06:00
Matthew Letter
af250acbfc added PrepareForExecution to compile code base
added prepare for execution function to all the execution object factories that did not have it implemented to compile the code base
2018-05-03 14:45:22 -06:00
Matthew Letter
cc7035ae9e Added new line to file to fit with kitware robot suggestion 2018-05-03 14:45:22 -06:00
Matthew Letter
8f622839b6 added PrepareForExecution() to UnitTestDispatcherBase.cxx
added PrepareForExecution() to UnitTestDispatcherBase.cxx to start resolving all the missing implementations of the new execution object architecture.
2018-05-03 14:45:22 -06:00
Kenneth Moreland
9127029fbb Determine ExecObject type directly from PrepareForExecution
Rather than require all ExecutionObjectFactoryBase classes to declare a
templated ExecObjectType type, get the type of the execution object
directly from the result of the PrepareForExecution method.
2018-05-03 14:45:22 -06:00
Matthew Letter
7c3342c1d8 updated cell locator two level uiniform grid to call LookupStructure
before it was wall prepareforexecution(device) creating an execution object but invoke calls this function now through the transport tag so we just need to give it the factory object not the execution object
2018-05-03 14:45:22 -06:00
Matthew Letter
c024147e6d Updating execution object creation
Updating execution object creation to use a factory for creating the execution object  to be passed to the invoke method.
2018-05-03 14:45:22 -06:00
Matthew Letter
8fb4fc6760 updating basic transport example to use new execution object creation
updating the transport execution object test to use the factory to create an execution object based on the templated device and chaged the trasport tag to call the prepareForExectuion(Device) method to create the execution object.
2018-05-03 14:45:22 -06:00
Matthew Letter
7e5a55881b changes typechecks for execution objects
In order to make the change from the current way execution obejcts are utilized to the new proposed executionObjectFactory process type checks now has to look for the new execution object factory class to check against.
2018-05-03 14:45:21 -06:00
Robert Maynard
9ac466edf7 Merge topic 'maybe_uninitialized_warnings'
36ae705e Suppress maybe-uninitialized warnings from VecTraitsTests
5bc9ecef Add a vtkm::Vec<T,N> fast path for CopyInto a vec of the same type

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1176
2018-05-03 11:58:29 -04:00
Robert Maynard
4649c172c7 Merge topic 'correct_gcc_7_crashes'
f025c218 Suppress conversion warning inside Cell Interpolate code
822d4c61 Marching Cubes test doesn't abuse fall through case statements
dac7ab98 Correct a bad memcpy in ColorTable that gcc 7 found
c6726644 Reformat some test code to stop gcc 7.3 from segfaulting.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Utkarsh Ayachit <utkarsh.ayachit@kitware.com>
Merge-request: !1175
2018-05-03 10:54:08 -04:00
Robert Maynard
569cbdb0c7 Merge topic 'correct_clang_6_warnings'
48aaabf6 Update AssignerMultiBlock to the new diy::Assigner class hierarchy.
03ce61f2 Merge branch 'upstream-diy' into correct_clang_6_warnings
70bc5846 diy 2018-05-02 (a2fdc50d)
ac46a4ce Remove unused variables from UnitTestWaveletCompressor
eb826205 Correct shadowing define warning from GraphConnectivity
bed777f0 Add missing virtual destructor to vtkm::cont::Field

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Acked-by: Utkarsh Ayachit <utkarsh.ayachit@kitware.com>
Merge-request: !1173
2018-05-03 10:53:44 -04:00
Robert Maynard
36ae705e9a Suppress maybe-uninitialized warnings from VecTraitsTests
The maybe uninitialized warnings generated with gcc 5 and gcc 6
are false positives and the variables are properly initialized.
2018-05-02 16:39:25 -04:00
Robert Maynard
5bc9ecef16 Add a vtkm::Vec<T,N> fast path for CopyInto a vec of the same type
Rather than use the general case which has a for loop we can just
use the assignment operator.
2018-05-02 15:54:51 -04:00
Robert Maynard
48aaabf661 Update AssignerMultiBlock to the new diy::Assigner class hierarchy. 2018-05-02 14:29:32 -04:00
Robert Maynard
03ce61f299 Merge branch 'upstream-diy' into correct_clang_6_warnings
* upstream-diy:
  diy 2018-05-02 (a2fdc50d)
2018-05-02 14:28:46 -04:00
Diy Upstream
70bc5846fd diy 2018-05-02 (a2fdc50d)
Code extracted from:

    https://gitlab.kitware.com/third-party/diy2.git

at commit a2fdc50d3f499fd926f0d3253d4097246cde892e (for/vtk-m).
2018-05-02 14:28:46 -04:00
Robert Maynard
f025c2187b Suppress conversion warning inside Cell Interpolate code
When converting integer fields the interpolate code generates lots
of warnings that we are promoting into floating point space.
The quickest solution is to suppress these conversion warnings
all together for all interpolation functions.
2018-05-02 13:32:02 -04:00
Robert Maynard
822d4c61e1 Marching Cubes test doesn't abuse fall through case statements
The fall through case statement was causing numerous warnings
with gcc 7.
2018-05-02 13:32:02 -04:00
Robert Maynard
dac7ab987a Correct a bad memcpy in ColorTable that gcc 7 found 2018-05-02 13:32:02 -04:00
Robert Maynard
c6726644b9 Reformat some test code to stop gcc 7.3 from segfaulting.
Somehow deducing the parameters to a static function was causing
gcc to segfault and crash. Changed around the code to use a free
function and everything works properly
2018-05-02 13:32:02 -04:00
Robert Maynard
ac46a4ced7 Remove unused variables from UnitTestWaveletCompressor 2018-05-02 13:31:30 -04:00
Robert Maynard
eb82620539 Correct shadowing define warning from GraphConnectivity 2018-05-02 13:31:30 -04:00
Robert Maynard
bed777f078 Add missing virtual destructor to vtkm::cont::Field 2018-05-02 13:31:30 -04:00
Robert Maynard
9edd5cd383 Merge topic 'correct_delve_vs2015_cuda_errors'
c9ba80ad Replace uint with vtkm::Id in DeviceAdapterAlgorithmThrust

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1174
2018-05-02 13:30:53 -04:00
Robert Maynard
c9ba80ad93 Replace uint with vtkm::Id in DeviceAdapterAlgorithmThrust
The usage of uint was causing problems with CUDA + MSVC2015 as
type was not defined. Instead we use vtkm::Id as that was the expect
type to be passed to the task
2018-05-02 09:55:56 -04:00
Kenneth Moreland
bb54d9d411 Merge topic 'scatter-on-dispatcher'
edc4c85f Move Scatter from Worklet to Dispatcher

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1172
2018-05-01 12:17:32 -04:00
Robert Maynard
06e15e601d Merge topic 'vtkm_vec_constructor_bug'
adcabb03 VTK-m Vec<> constructors are now more conservative.
6267deb6 CellDerivativeFor3DCell has a better version for Vec of Vec fields.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1170
2018-05-01 08:29:45 -04:00
Robert Maynard
e32eebeae9 Merge topic 'cuda_task_strided'
b56894dd Move VTK-m Cuda backend over to a grid-stride iteration pattern.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1171
2018-05-01 08:15:45 -04:00
Robert Maynard
b56894dd09 Move VTK-m Cuda backend over to a grid-stride iteration pattern.
This allows for easier host side logic when determining grid and block
sizes, and allows for a smaller library side by moving some logic
into compiled in functions.
2018-04-30 17:29:26 -04:00
Robert Maynard
adcabb034b VTK-m Vec<> constructors are now more conservative.
When you have a Vec<Vec<float,3>> it was possible to incorrectly correct
it with the contents of a Vec<double,3>. An example of this is:

using Vec3d = vtkm::Vec<double, 3>;
using Vec3f = vtkm::Vec<float, 3>;
using Vec3x3f = vtkm::Vec<Vec3f, 3>;

Vec3d x(0.0, 1.0, 2.0);
Vec3x3f b(x); // becomes [[0,0,0],[1,1,1],[2,2,2]]
Vec3x3f c(x, x, x); // becomes [[0,1,2],[0,1,2],[0,1,2]]
Vec3x3f d(Vec3f(0.0f,1.0f,2.0f)) //becomes [[0,0,0],[1,1,1],[2,2,2]]

So the solution we have chosen is to disallow the construction of objects such
as b. This still allows the free implicit cast to go from double to float.

So while `Vec3x3 b = x is supported by vtk-m, it produces very incorrect results.
2018-04-27 16:47:54 -04:00
Robert Maynard
6267deb67e CellDerivativeFor3DCell has a better version for Vec of Vec fields.
Previously we would compute a 3x3 matrix where each element was a Vec. Using
the jacobain of a single component is sufficient so by using that we safe 2 to
3 times the memory space.

Additionally by moving to doing the derivative as a per component algorithm
we work around the issues found in bug
https://gitlab.kitware.com/vtk/vtk-m/issues/221. In effect when trying to
construct a Vec of Vec from a component of a different floating type e.g.:

  Vec3d x(0.0, 1.0, 2.0);

  Vec3f a = x;
  Vec3x3f b = x;
  Vec3x3f c(x, x, x);

Generates bad values vectors such as b which look like:

b: [[0,0,0],[1,1,1],[2,2,2]]
c: [[0,1,2],[0,1,2],[0,1,2]]
2018-04-27 08:14:34 -04:00
Kenneth Moreland
edc4c85fd9 Move Scatter from Worklet to Dispatcher
Previously, when a Worklet needed a scatter, the scatter object was
stored in the Worklet object. That was problematic because that means
the Scatter, which is a control object, was shoved into the execution
environment.

To prevent that, move the Scatter into the Dispatcher object. The
worklet still declares a ScatterType alias, but no longer has a
GetScatter method. Instead, the Dispatcher now takes a Scatter object in
its constructor. If using the default scatter (ScatterIdentity), the
default constructor is used. If using another type of Scatter that
requires data to set up its state, then the caller of the worklet needs
to provide that to the dispatcher. For convenience, worklets are
encouraged to have a MakeScatter method to help construct a proper
scatter object.
2018-04-27 00:43:51 -04:00
Kenneth Moreland
5c5fb020a8 Merge topic 'fix-test-header-builds'
d393468e Add any OpenGL link targets to test builds
8b9c0f50 Re-add non testable files to test build sources
ffd98463 Load correct file extension in header test build
7c5f44a6 Fix warnings about no symbols
289a4bc1 Differentiate between header files with different extensions
9571c9b5 Fix vtkm_add_header_build_test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1160
2018-04-25 23:01:10 -04:00
Robert Maynard
4e7837e9f9 Merge topic 'reduce_unneeded_copies_in_colortable_code'
1ec478ce ColorTable now converts to and from double less often.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1169
2018-04-25 16:27:35 -04:00
Robert Maynard
1ec478ce62 ColorTable now converts to and from double less often.
Previously we would convert to double to perform some operations instead
of always staying in float space.
2018-04-25 15:35:27 -04:00
Robert Maynard
370eddae7b Merge topic 'vtkm_type_calls_consistently_inline'
dc6e7d1a Make all Vec types consistently mark methods as inline

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1168
2018-04-25 14:35:54 -04:00
Robert Maynard
dc6e7d1ac8 Make all Vec types consistently mark methods as inline 2018-04-25 10:48:28 -04:00
Robert Maynard
e10ee281c7 Merge topic 'correct_more_build_warnings'
4b9a8143 Correct 'may be used uninitialized in this function' warnings in wavelets
ebf96077 Correct casting warnings found inside vtkm_rendering

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1167
2018-04-24 15:27:56 -04:00
Robert Maynard
4b9a8143c8 Correct 'may be used uninitialized in this function' warnings in wavelets 2018-04-24 13:27:51 -04:00
Robert Maynard
ebf96077fd Correct casting warnings found inside vtkm_rendering 2018-04-24 13:00:33 -04:00
Kenneth Moreland
d393468e9c Add any OpenGL link targets to test builds 2018-04-24 11:47:26 -04:00
Robert Maynard
666a9c4f71 Merge topic 'improve_cuda_debug_build_warnings'
7c7b1ed5 Make sure when compiling CUDA code we suppress unknown pragma
b7e63718 Correct issues found be enabling more CUDA warnings.
4ca2522c VTK-m when building CUDA code in debug now checks for more warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1164
2018-04-24 08:14:15 -04:00
Robert Maynard
7c7b1ed54a Make sure when compiling CUDA code we suppress unknown pragma 2018-04-23 15:27:08 -04:00