Commit Graph

1732 Commits

Author SHA1 Message Date
Kenneth Moreland
b446abba37 Update examples to filter interface changes. 2016-05-06 15:03:50 -06:00
Kenneth Moreland
eecbb30d96 Make sure all field filters specify a default name for their fields
If the user does not specify a name for the output field in a filter, that
filter should provide some default name. Having blank names for fields is
not a great idea. (In fact, an earlier commit added an assert to make
sure that a ResultField is given a non-empty name.)

This covers issue #61.
2016-05-05 15:27:32 -06:00
Kenneth Moreland
f4362a4902 Give result classes their own header file.
VTK-m style guidelines dictate that all classes part of the API should
be in their own header file. Thus, we have moved the result classes out
of the filter header files and into their own headers.

We have also renamed these clases to ResultField and ResultDataSet to
better match the class naming conventions of VTK-m.

Since we are moving around these result classes, we have also revamped
their structure. They are now in a hierarchy with a common ResultBase
class. Additionally, all result classes have a reference to a complete
DataSet that can be considered the output of the filter. This will make
it easier for users to consistently deal with filter results.

These changes cover issues #60 and #62.
2016-05-05 15:07:55 -06:00
Kenneth Moreland
82949e79cc List template sources in IDE
I like to have all the source files used in VTK-m to be explicitly
declared as source files in CMake so that when CMake builds a project file
for an IDE, all the source files are shown and monitored by the IDE. This
makes working with the files much easier.
2016-05-05 13:00:12 -06:00
Kenneth Moreland
e8d3eda84d Rename filter base classes to follow VTK-m naming convention
The base classes for all the filters are named with 'Filter' at the end.
Generally the convention in VTK-m is to place the most general
descriptor (in this case Filter) first, which makes it easier to find
items in ordered lists.

This commit resolves issue #59.
2016-05-05 12:43:28 -06:00
Robert Maynard
5502db999b Merge topic 'faster_compile_times'
90099d1c Simplify ThreadIndicies so link time is reduced.
08b888f7 Improve the compile speed and binary output by tweaking FunctionInterface.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !400
2016-05-04 16:34:49 -04:00
Robert Maynard
90099d1c55 Simplify ThreadIndicies so link time is reduced.
ThreadIndicies constructor was templated on the invocation type, which created
thousand's of versions of that symbol which all had the same behavior. So now
remove that and move that logic into a Worklet function since it requires
the invocation info.
2016-05-04 14:48:42 -04:00
Robert Maynard
08b888f703 Improve the compile speed and binary output by tweaking FunctionInterface. 2016-05-04 14:48:42 -04:00
Kenneth Moreland
ab765be785 Merge branch 'msvc-warnings' into 'master'
Fix MSVC Warnings

Fix some warnings that were happening with the MSVC compiler.

See merge request !409
2016-05-04 13:53:39 -04:00
Robert Maynard
772e34559e Merge topic 'simplify_benchmark_code'
19a941cc It is now easier to use the device adapter benchmark code.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !408
2016-05-04 13:52:10 -04:00
Robert Maynard
fbfd01a9bd Merge topic 'radix'
eeae5c13 Adding fast path for radix sort sort_by_key

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !407
2016-05-04 13:51:34 -04:00
Robert Maynard
90c664bcaf Merge topic 'uninitialized_warnings_vtkm_assume'
e5d30951 Solve the ParametricCoordinates issue by using VTKM_ASSUME.
1596f403 Silence maybe-uninitialized warnings from ParametricCoordinates.h

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !406
2016-05-04 13:43:51 -04:00
Kenneth Moreland
2da22e612a Merge branch 'fix_splatter' into 'master'
Fix compilation after change to IdCountingType

This has been merged into the hpx branch, but should ideally be a separate merge request

See merge request !404
2016-05-04 13:36:40 -04:00
Kenneth Moreland
e27e955931 Turn off warning for fill_n on MSVC
MSVC has a warning for using "unsafe" algorithms such as fill_n that can
easily overrun the end of unchecked pointers. The problem is that there
are lots of valid uses of these algorithms, and the signal that this is
a valid use is MSVC-specific. Even less fortunate is the fact that if
another header violates the warning, it is impossible to suppress it
because it happens in a system header file (xutility), which was included
far before the actual offending code occured. Even less fortunate than
that, a boost header we (indirectly) use sets off this warning, cannot
be suppressed, and is not going to be fixed
(https://svn.boost.org/trac/boost/ticket/11426). The best solution is to
turn off this problematic warning for everybody.
2016-05-04 07:58:25 -06:00
Kenneth Moreland
0af7188708 Remove warning about loss of precision. 2016-05-03 16:13:09 -06:00
Robert Maynard
19a941cc6e It is now easier to use the device adapter benchmark code.
For example to now benchmark only the sortbykey algorithm

  ./bin/BenchmarkDeviceAdapter_TBB sortbykey
2016-05-03 15:53:09 -04:00
Matt Larsen
eeae5c1352 Adding fast path for radix sort sort_by_key 2016-05-03 08:53:42 -07:00
Robert Maynard
e5d3095102 Solve the ParametricCoordinates issue by using VTKM_ASSUME. 2016-04-28 11:15:43 -04:00
Robert Maynard
1596f403ef Silence maybe-uninitialized warnings from ParametricCoordinates.h 2016-04-27 13:11:21 -04:00
Robert Maynard
d22c7794f8 Merge topic 'windows_long_symbol_warning_suppression'
6154e19a Explicitly disable warning C4503 when building with MSVC.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !401
2016-04-26 21:31:48 -04:00
Robert Maynard
6154e19a66 Explicitly disable warning C4503 when building with MSVC. 2016-04-26 12:43:22 -04:00
John Biddiscombe
2cadb8ee62 Fix compilation after change to IdCountingType 2016-04-24 17:12:02 +02:00
Kenneth Moreland
16b71c21bb Merge branch 'assert-redux' into 'master'
Unify assert mechanism

It has been decided that an assert that throws an exception instead of
terminating the program is not all that great of a feature and it causes
some limitations on how it is used. Instead, the two different types
of assert have been replaced with a single version that behaves like
the POSIX version.

See merge request !402
2016-04-21 15:00:51 -04:00
Kenneth Moreland
b20c4fc8ef Fix test that fails during optimization.
After the most recent changes, I noticed that the matrix unit test
started failing for some optimized compiles. I'm not sure if it was
these changes or others. What I think happened is that it was a check
for a Matrix operation that should be invalid. It checked the valid flag
without checking the data (which, of course, is invalid). However, I
think the optimizer saw that the data generated was never used so
removed that part of the computation so the invalid flag was never set.
Add a condition that uses the result even though it should never be
called to hopefully force the compiler to compute it.
2016-04-21 11:02:45 -06:00
Kenneth Moreland
b87cac7492 Fix warnings about unused parameters. 2016-04-21 09:32:02 -06:00
Kenneth Moreland
860649acf6 Fix error about redefinition of GetMessageA or GetMessageB
If Error.h was loaded before windows.h on windows compilers, then it
happily defined GetMessage and then GetMessageA and GetMessageB. However,
if the load order was reversed, then GetMessage is a macro that changes
it to GetMessageA or GetMessageB and you get an error about the same
method being declared twice.

Get around the problem by not defining GetMessage if it is already
declared as a macro.
2016-04-21 08:23:34 -06:00
Kenneth Moreland
cc497e6a1b Remove cont/Assert.h and exec/Assert.h
These asserts are consolidated into the unified Assert.h. Also made some
minor edits to add asserts where appropriate and a little bit of
reconfiguring as found.
2016-04-20 15:41:14 -06:00
Kenneth Moreland
2ddad8bcc5 Add POSIX assert wrapper
Add in the vtkm namespace an assert macro (technically VTKM_ASSERT) that
basically replicates the functionality of the POSIX assert macro. This
form of assert is set to replace the separate control/exection asserts.

It has been decided that an assert that throws an exception instead of
terminating the program is not all that great of a feature and it causes
some limitations on how it is used. The next commit will remove the
other forms of VTK-m assert.
2016-04-20 14:19:22 -06:00
Kenneth Moreland
eede71f918 Merge branch 'fix-vector-analysis-failure' into 'master'
Fix issues with UnitTestVectorAnalysis for MSVC.

We have been having a problem with one of the MSVC dashboards failing
the UnitTestVectorAnalysis test. The test just dies in the middle with
no indication of what problematic thing was run.

After playing with this for quite a while, I found that it could by
triggered exclusively in the Lerp test. I further found that if I
switched the order of the test and check Lerp the test worked. This is
strange behavior and leads me to believe one of the following is going
on:

1. There is an error such as an invalid memory access happening in
the VTK-m code that is sometimes corrupting the stack.
2. Somewhere there is an expression that has undefined behavior. Usually
it works OK, but some optimization sequence causes it to fail.
3. There is a bug in one of the compiler's optimizations.

It concerns me that I cannot identify exactly where the problem lies.
I've looked very hard at the vtkm::Vec and vtkm::Lerp code to try to find
possible problems, but I have not been able to find anything.

See merge request !399
2016-04-20 12:05:31 -04:00
Kenneth Moreland
0efd08d3ef Merge branch 'move-newtons-method' into 'master'
Move NewtonsMethod to the vtkm package

All the other math functions are in the vtkm package. This one was in
vtkm::exec because it uses a callback method. This can be problematic on
CUDA the the declaration of NewtonsMethod does not match the callback
method. However, we now have a VTKM_SUPPRESS_EXEC_WARNINGS macro that
allows a VTKM_EXEC_CONT_EXPORT function (like NewtonsMethod) to call
either a VTKM_EXEC_EXPORT or VTKM_CONT_EXPORT without a warning.

See merge request !398
2016-04-19 16:50:17 -04:00
Kenneth Moreland
7e1b9b8886 Fix issues with UnitTestVectorAnalysis for MSVC.
We have been having a problem with one of the MSVC dashboards failing
the UnitTestVectorAnalysis test. The test just dies in the middle with
no indication of what problematic thing was run.

After playing with this for quite a while, I found that it could by
triggered exclusively in the Lerp test. I further found that if I
switched the order of the test and check Lerp the test worked. This is
strange behavior and leads me to believe one of the following is going
on:

1. There is an error such as an invalid memory access happening in
the VTK-m code that is sometimes corrupting the stack.
2. Somewhere there is an expression that has undefined behavior. Usually
it works OK, but some optimization sequence causes it to fail.
3. There is a bug in one of the compiler's optimizations.

It concerns me that I cannot identify exactly where the problem lies.
I've looked very hard at the vtkm::Vec and vtkm::Lerp code to try to find
possible problems, but I have not been able to find anything.
2016-04-19 14:39:16 -06:00
Robert Maynard
7b608c2470 Merge topic 'fix_cell_to_point_count'
c24d4395 Change max # of cells associated with a point in a 3-D grid from 6 to 8.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !395
2016-04-15 15:18:41 -04:00
Kenneth Moreland
c503e0ce8a Move NewtonsMethod to the vtkm package
All the other math functions are in the vtkm package. This one was in
vtkm::exec because it uses a callback method. This can be problematic on
CUDA the the declaration of NewtonsMethod does not match the callback
method. However, we now have a VTKM_SUPPRESS_EXEC_WARNINGS macro that
allows a VTKM_EXEC_CONT_EXPORT function (like NewtonsMethod) to call
either a VTKM_EXEC_EXPORT or VTKM_CONT_EXPORT without a warning.
2016-04-14 14:36:02 -06:00
Kenneth Moreland
331759099a Merge branch 'consistent-make-arrayhandlecompositevector-return' into 'master'
Have make_ArrayHandleCompositeVector consistent with fancy arrays

Previously the make_ArrayHandleCompositeVector template was declared in
such a way that if you passed it a fancy array handle, it would change
the type to a base ArrayHandle with a fancy storage. This was
inconsistent with types generated from ArrayHandleCompositeVectorType
when using the same fancy array handle types. This change makes that
more consistent.

See merge request !396
2016-04-14 15:35:03 -04:00
Kenneth Moreland
da82d248c9 Merge branch 'rename_opengl_to_interop' into 'master'
Rename the opengl folder / namespace to interop.

To clarify what functionality the classes inside provide.

See merge request !394
2016-04-14 12:07:12 -04:00
Kenneth Moreland
63f8c8abcb Have make_ArrayHandleCompositeVector consistent with fancy arrays
Previously the make_ArrayHandleCompositeVector template was declared in
such a way that if you passed it a fancy array handle, it would change
the type to a base ArrayHandle with a fancy storage. This was
inconsistent with types generated from ArrayHandleCompositeVectorType
when using the same fancy array handle types. This change makes that
more consistent.
2016-04-14 09:25:40 -06:00
T.J. Corona
c24d439532 Change max # of cells associated with a point in a 3-D grid from 6 to 8. 2016-04-13 17:44:29 -04:00
Robert Maynard
1ec3bc0e7a Rename the opengl folder / namespace to interop.
To clarify what functionality the classes inside provide.
2016-04-13 15:52:15 -04:00
Robert Maynard
59f5f24845 Merge topic 'simplify_cellset_permutation_templates'
6883a5ac Simplify using CellSetPermutation by providing a default permutation type.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !391
2016-04-13 09:17:01 -04:00
Robert Maynard
6883a5ac94 Simplify using CellSetPermutation by providing a default permutation type.
Previously you had to explicitly state you wanted a CellSetPermutation
with an ArrayHanlde of Id's, now that is done automatically.
2016-04-12 14:24:51 -04:00
Matt Larsen
5f66fb0015 Merge topic 'fix/remove_unused_file'
80b01154 removing unused file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !393
2016-04-11 18:23:14 -04:00
Matt Larsen
80b011542e removing unused file 2016-04-11 12:12:44 -07:00
T.J. Corona
3c1fb731a9 Merge topic 'marching_cubes_inline_constructor'
2f75d4ee Declare MarchingCubes constructor inline to avoid symbol clashes.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !392
2016-04-11 10:20:03 -04:00
T.J. Corona
2f75d4eec6 Declare MarchingCubes constructor inline to avoid symbol clashes. 2016-04-11 10:16:49 -04:00
Kenneth Moreland
4b725d0dbf Merge branch 'minor-array-handle-changes' into 'master'
Some minor changes to fancy array handles.

This are just some minor things I ran into while documenting these classes.
One change is just an error in a comment. The other change allows you
to specify the type in make_ArrayHandleCast as a template argument instead
of creating an instance.

See merge request !388
2016-04-10 10:42:50 -04:00
Robert Maynard
bb60abb1af Merge topic 'correct_bug_in_TestAtomicArrayWorklet'
6ac50adc Correct an off by 1 error in UnitTestWorkletMapFieldWholeArray.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !390
2016-04-08 00:07:36 -04:00
Robert Maynard
6ac50adcee Correct an off by 1 error in UnitTestWorkletMapFieldWholeArray.
The sum presumption was presuming 1 to 10 inclusive, when we actually have
0 to 9 inclusive.
2016-04-07 22:59:59 -04:00
Robert Maynard
42836b5123 Merge topic 'correct_rendering_warnings'
27f23480 Correct more warnings and formatting issues with vtkm::rendering.
4269e007 Only build the rendering example if MESA has been found.
daf419fe Correct unused and casting warnings in Scene.h

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !389
2016-04-07 20:50:20 -04:00
Robert Maynard
27f23480b3 Correct more warnings and formatting issues with vtkm::rendering. 2016-04-07 20:07:22 -04:00
Robert Maynard
4269e0070c Only build the rendering example if MESA has been found. 2016-04-07 20:07:22 -04:00