Commit Graph

1042 Commits

Author SHA1 Message Date
Robert Maynard
f65f5ea6bb WorkletBase can now transport CellSets as a whole execution object. 2016-11-08 08:54:52 -05:00
Dave Pugmire
80df759238 Force uniform datasets to always produce FloatDefault point coordiantes. 2016-11-07 14:12:32 -05:00
Dave Pugmire
6b16948d0f Force uniform datasets to always produce FloatDefault point coordiantes. 2016-11-07 11:27:00 -05:00
Dave Pugmire
cd842c696e fix warnings. 2016-11-04 15:28:48 -04:00
Dave Pugmire
f413bac78c Fix compiler warnings. 2016-11-04 11:43:30 -04:00
Dave Pugmire
dc547ec671 compiler warnings. 2016-11-04 08:32:46 -04:00
Dave Pugmire
3e306a9d7b compiler warnings... 2016-11-03 16:09:24 -04:00
Dave Pugmire
e1c659a4fb fix compiler warnings. 2016-11-03 15:15:40 -04:00
Robert Maynard
f31d6c2258 Refactor vtkm::Types to be concise and move math helpers out of internal.
I have verified that the optimized assembly for Vec<3> and Vec<4> are consistent
with what we generated before.
2016-10-28 14:57:16 -04:00
Christopher Sewell
9afbdffbf5 Attempt fix warning in streaming 2016-10-25 08:36:24 -06:00
Christopher Sewell
a5a487b365 Attempt 15 to resolve Windows compiler warning with streaming storage 2016-10-23 07:24:28 -06:00
Christopher Sewell
b9d8172635 Attempt 14 to resolve Windows compiler warning with streaming storage 2016-10-21 17:31:45 -06:00
Christopher Sewell
93d7956daf Attempt 13 to resolve Windows compiler warning with streaming storage 2016-10-21 16:08:13 -06:00
Christopher Sewell
92d686fccd Attempt 12 to resolve Windows compiler warning with streaming storage 2016-10-21 15:12:22 -06:00
Christopher Sewell
1ebf0c17b6 Attempt 10 to resolve Windows compiler warning with streaming storage 2016-10-21 13:10:49 -06:00
Christopher Sewell
45208e83cc Attempt 9 to resolve Windows compiler warning with streaming storage 2016-10-21 12:41:23 -06:00
Christopher Sewell
f1af30804e Attempt 8 to resolve Windows compiler warning with streaming storage 2016-10-21 10:58:14 -06:00
Christopher Sewell
c540a699f2 Attempt 7 to resolve Windows compiler warning with streaming storage 2016-10-21 10:12:15 -06:00
Robert Maynard
ab98ae8992 Remove boost CMake logic as VTK-m doesn't require boost now. 2016-10-21 08:41:22 -04:00
Christopher Sewell
6096b6f12a Attempt 6 to resolve Windows compiler warning with streaming storage 2016-10-20 15:35:54 -06:00
Christopher Sewell
2c8d2d3006 Attempt 5 to resolve Windows compiler warning with streaming storage 2016-10-20 14:27:07 -06:00
Christopher Sewell
4af0cd4bfb Attempt 4 to resolve Windows compiler warning with streaming storage 2016-10-20 13:00:43 -06:00
Christopher Sewell
05975a2325 Attempt 3 to resolve Windows compiler warning with streaming storage 2016-10-20 10:32:30 -06:00
Robert Maynard
37efba159c CellSetSingleType now can be constructed with proper number of points
This is important so that when we execute a Cell->Point worklet we
don't have to compute the number of points from the connectivity array.
2016-10-20 08:33:16 -04:00
Christopher Sewell
278db37c08 Attempt 2 to resolve Windows compiler warning with streaming storage 2016-10-19 14:44:48 -06:00
Christopher Sewell
c5bd2a3e80 Attempt 1 to resolve Windows compiler warning with streaming storage 2016-10-19 12:17:01 -06:00
Robert Maynard
788458b0c7 Correct failures finding ptrdiff_t now that boost is gone. 2016-10-19 08:35:45 -04:00
Robert Maynard
5c564b0657 Replace usage of boost::iterator_facade with hand rolled iterator. 2016-10-19 08:35:42 -04:00
Christopher Sewell
72d9783c38 Merge remote-tracking branch 'upstream/master' into StreamingArray 2016-10-17 17:51:23 -06:00
Mark Kim
464da87d5a Merge branch 'master' of gitlab.kitware.com:vtk/vtk-m 2016-10-12 14:40:32 -04:00
Samuel Li
30660bf475 fix comments by Rob 2016-10-11 13:42:51 -07:00
Samuel Li
e4a9304926 Merge branch 'vtkm/master' into wavelet2 2016-10-10 09:16:16 -07:00
Samuel Li
ff16e47229 remove file not needed 2016-10-09 22:07:01 -07:00
Christopher Sewell
c6e15c1240 Merge remote-tracking branch 'upstream/master' into StreamingArray 2016-10-07 18:10:29 -06:00
Christopher Sewell
1aa092e027 Removing unnecessary allocation in streaming scan 2016-10-07 18:09:50 -06:00
Robert Maynard
154a4ab6e5 Make sure tbb doesn't enable autolinking on windows.
Since vtk-m is header only, we don't want everybody that is including
the tbb headers to auto-link to libtbb. So disable this behavior.
2016-10-07 16:08:16 -04:00
Dave Pugmire
827bf10795 compiler warnings. 2016-10-04 12:43:04 -04:00
Dave Pugmire
668e8115af Fix compiler warnings. 2016-10-04 11:59:00 -04:00
Christopher Sewell
3ee96d9fbd Fixing warning about typedef in ArrayHandleStreaming 2016-09-30 14:47:50 -06:00
Robert Maynard
43fe1a92cb Enable the serial backend tests. 2016-09-30 15:12:34 -04:00
Christopher Sewell
58952e1465 Adding streaming reduce 2016-09-29 15:06:34 -06:00
Christopher Sewell
bf9e1366f5 Fixing warning about char* 2016-09-29 14:33:21 -06:00
Christopher Sewell
9e2210927e Adding streaming exclusive scan and fixing bugs with streaming inclusive scan, but still need to make it treat input as const 2016-09-28 18:29:04 -06:00
Robert Maynard
0f58d6fc54 Add vtkm/cont/serial directory for the serial backend. 2016-09-28 14:22:53 -04:00
Robert Maynard
f7a9bbe0e7 All cuda / tbb unit tests follow the same naming pattern. 2016-09-28 14:22:53 -04:00
Robert Maynard
80b220ff0d Remove boost::random usage from DataSetBuilder tests. 2016-09-28 10:54:04 -04:00
Robert Maynard
7ad88b6e5c Use c++11 variadic templates as storage of ListTags. 2016-09-23 16:39:20 -04:00
Samuel Li
edd74febd8 Resolving merge conflicts 2016-09-23 09:27:44 -07:00
Christopher Sewell
8f892bf8a0 Changing namespaces in ArrayHandleStreaming 2016-09-23 10:12:37 -06:00
Dave Pugmire
7a2874cf44 Add 1D support for uniform and rectilinear data. 2016-09-23 09:00:40 -04:00
Christopher Sewell
d92f39df12 Merge branch 'master' into StreamingArray 2016-09-15 17:54:59 -06:00
Christopher Sewell
610f96a831 Adding streaming inclusive scan 2016-09-15 17:46:09 -06:00
Kenneth Moreland
e6686e8be7 Merge branch 'master' into rendering-library 2016-09-09 13:59:15 -06:00
Robert Maynard
4f65da41b9 Remove usage of BOOST_CONCEPT_CHECK.
Instead manually verify the iterator type ourselves inside CopyInto.
2016-09-09 09:43:09 -04:00
Kenneth Moreland
0bcac3eb5d Remove "export" from virtual ArrayHandle destructor
One of the dashboards is complaining about the destructor implementation
not being used in a particular test build. I suspect it is because the
export macro has an inline, so I am trying removing it.
2016-09-08 16:06:09 -06:00
Robert Maynard
310f1bc0a5 Correct missing std::time includes that vtkm::Math was hiding. 2016-09-02 14:44:30 -04:00
Samuel Li
cb87d02ef3 officially abandoned ArrayHandleInterpreter 2016-09-01 16:58:20 -06:00
Robert Maynard
c9834283ea Remove vtkm usage of boost::shared and scoped pointers.
Now we are using c++11 shared_ptr and unique_ptr
2016-09-01 09:38:25 -04:00
Robert Maynard
f81c42b9b4 Replace NULL with nullptr where applicable. 2016-09-01 09:38:25 -04:00
Robert Maynard
12810165bb Switch over to c++11 type_traits. 2016-08-31 16:11:26 -04:00
Samuel Li
7eabf1b44d new implementation on extend 2D seems to be working 2016-08-29 18:20:49 -06:00
Samuel Li
871e040002 ArrayHandleConcatenate2DLeftRight.h works 2016-08-25 17:36:56 -06:00
Samuel Li
e62952fc58 ArrayHandleConcatenate2DTopDown.h works 2016-08-25 14:27:29 -06:00
Kenneth Moreland
40db6c1cd1 Merge branch 'faster-compile' into 'master'
Faster compile

Some small change to make modest improvements to the
compile time.

See merge request !520
2016-08-25 16:03:58 -04:00
Kenneth Moreland
8ac6ce4501 Add back a condition to zip array test with vec as first
In the test for the ArrayHandleZip fancy array handle, re-add a
condition where the first array being zipped is of type Vec.
2016-08-25 13:11:04 -06:00
Kenneth Moreland
f8442903d8 Replace TryAllTypes with trying exemplar tests
There were many tests that created code paths for every base and Vec
type that VTK-m supports (up to 4 components). Although this is
admirable, it is also excessive, and our compile times for the tests are
very long.

To shorten compile times, remove the TryAllTypes method. Replace it with
a version of TryTypes that uses a default list of "exemplar" set of
integers, floats, and Vecs.
2016-08-24 16:02:18 -06:00
Samuel Li
87e80fc9c0 Merge branch 'master' into wavelet2 2016-08-24 15:53:52 -06:00
Kenneth Moreland
fc0d804ad0 Reduce conditions to check in TestingFancyArrayHandles
By far the source file that was taking the longest to compile was that
for the fancy array handles. This is because this test was being
pedantic about all the different types it was testing. This change
should drastically reduce the types actually compiled for and,
therefore, also drastically reduce the compile time for this test.
2016-08-24 15:43:33 -06:00
Samuel Li
56017a1007 1st version of ArrayHandle2D works 2016-08-24 15:36:39 -06:00
Robert Maynard
51e50d2933 Add DeviceAdapter::CopySubRange to all device adapters.
This allows callers to copy a subsection of an array into another array,
without clearing the contents of the destination array if a resize
is required.
2016-08-24 15:42:51 -04:00
Christopher Sewell
2855512962 Adding ArrayHandleStreaming to CMake and fixing warnings 2016-08-19 13:47:44 -06:00
Samuel Li
372cd6729b merge updates from the 1D wavelets branch 2016-08-18 22:42:29 -06:00
Robert Maynard
9712de8b24 Merge topic 'wavelets'
d677d0d1 small tweaks
816364d2 in an effort to get rid of a warning
778da350 In attempt to fix errors and warnings
bb450c51 fix a warning
49e56b61 two new wavelet filters, HAAR and CDF8/4 supported now
767356bc working on even length filters; need ASYM* support in Extend1D()
a6efad04 half done even length filters implementation
ee32ea4c took off timing code
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !482
2016-08-18 15:47:33 -04:00
Samuel Li
d677d0d175 small tweaks 2016-08-18 10:28:41 -06:00
Samuel Li
816364d204 in an effort to get rid of a warning 2016-08-18 09:10:38 -06:00
Kenneth Moreland
ece53f514a Fix inappropriate placement of typename keyword
How did any compiler accept that?

Also fix minor warning with topology algorithm benchmark.
2016-08-17 15:51:43 -06:00
Kenneth Moreland
e488967c8f Use general TryExecute for filter execution
The TryExecute function was based off of the ResolveFieldTypeAnd*
classes made for filters. To reduce the amount of code duplication,
modify these two filter classes to use the more general TryExecute
functionality.
2016-08-17 14:13:51 -06:00
Christopher Sewell
11a29a98ce Adding proper headings in ArrayHandleStreaming.h 2016-08-17 12:23:53 -06:00
Samuel Li
778da350d5 In attempt to fix errors and warnings 2016-08-17 09:37:56 -07:00
Samuel Li
bb450c5156 fix a warning 2016-08-17 09:14:29 -07:00
Kenneth Moreland
dd2edcab6c Add general ability to try execution on multiple devices
There are various reasons why you might want to execute something but
not have a specific device to execute on. To mange this, add a general
function that will try a list of devices in order and attempt to run on
them in order.
2016-08-15 17:16:58 -06:00
Robert Maynard
2bbbc7d38e Rename DynamicArrayHandle::IsArrayHandleType to IsType
This way DynamicArrayHandle and DynamicCellSet have a common set
of methods.
2016-08-10 11:03:57 -04:00
Samuel Li
8936ef641e fix a warning in ArrayHandleConcatenate, also add tests to TestingFancyArrayHandles 2016-08-08 16:38:41 -06:00
Samuel Li
8210dcda09 fix throw error 2016-08-08 15:55:49 -06:00
Samuel Li
2b3e2f2fc7 throw an error 2016-08-08 15:20:50 -06:00
Samuel Li
a1bd8ff56d changes to ArrayHandlePermutation reverted 2016-08-06 12:52:55 -07:00
Robert Maynard
08a33675f6 Prefer vtkm::cont::CastAndCall function over the member method. 2016-08-05 15:29:39 -04:00
Robert Maynard
31138293f9 Pass Fields and CoordinateSystems to Dispatcher::Invoke
Now that we can handle scheduling Fields and CoordinateSystems, do
2016-08-05 15:26:17 -04:00
Robert Maynard
146d800968 make CastAndCall a free function instead of a class.
Overloading the function serves the same purpose of specializing the
class, but requires less syntax sugar to do.
2016-08-05 15:18:22 -04:00
Christopher Sewell
767a5f6792 Clean up for streaming dispatcher 2016-08-03 19:47:12 -06:00
Christopher Sewell
504e6f55df Working streaming dispatcher 2016-08-03 18:48:31 -06:00
Christopher Sewell
ced9fd32db Improving streaming dispatcher 2016-08-03 15:34:43 -06:00
T.J. Corona
927387b1a2 Add vtkm::cont::Field,CoordinateSystem as Invokable parameters.
Originally, only array handles could be passed to the dispatcher.
This update extends the list to Field and CoordinateSystem as
dynamic objects.
2016-08-03 15:46:30 -04:00
Kenneth Moreland
dcb032fc00 Merge branch 'expose-storage' into 'master'
Expose storage in ArrayHandle, and Expose data array in StorageBasic.



See merge request !487
2016-08-03 08:51:12 -04:00
Christopher Sewell
2caf81a4af First commit for ArrayHandleStreaming 2016-08-02 16:54:12 -06:00
T.J. Corona
62fa852e12 In CellSetExplicit::AddCell, change vtkm::Vec to template parameter.
This commit is in reference to Issue #40.
2016-08-02 14:40:59 -04:00
T.J. Corona
e07e4aeda7 Merge topic 'expose-cellarray-api'
8ad8eeda In DynamicCellSet, expose CellSet API.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !488
2016-08-02 14:25:15 -04:00
T.J. Corona
2ade3ba8d8 Expose storage in ArrayHandle, and Expose data array in StorageBasic. 2016-08-02 14:05:05 -04:00
T.J. Corona
8ad8eeda77 In DynamicCellSet, expose CellSet API.
Also changes GetCellSet() to CastToBase().
2016-08-02 13:39:25 -04:00
T.J. Corona
2e33f8830f Collapse exec and cont portals into one class. 2016-08-02 11:26:29 -04:00
Samuel Li
1a7bae0335 with a hack on ArrayHandlePermutation.h, wavelet works on CUDA device as well 2016-07-28 17:55:38 -06:00
Samuel Li
951d9fce2c move device copy to a function of itself; other small changes 2016-07-28 14:55:10 -07:00
Samuel Li
ab021ce6f0 Chris helped to eliminate all compiling errors 2016-07-27 15:42:29 -07:00
Robert Maynard
45ada6b55a Rework ArrayHandleCuda to make it stop generate warnings 2016-07-20 12:41:13 -04:00
Samuel Li
9e706d91ab test concatenating empty arrays 2016-07-20 10:04:53 -06:00
Robert Maynard
4ca6ce2ad6 nvcc doesn't have troubles with boost shared_ptr optimizations 2016-07-19 13:26:23 -04:00
Samuel Li
4b380a3d78 Fix a bug in ArrayHandleConcatenate 2016-07-18 13:21:52 -07:00
Samuel Li
9ef986da83 add make handle function to ArrayHandleConcatenate 2016-07-15 18:10:20 -06:00
Samuel Li
06ee72cc9a Update the unit test for ArrayHandleConcatenate 2016-07-15 13:54:32 -06:00
Samuel Li
e2e8133f41 add an array handle: ArrayHandleConcatenate 2016-07-14 18:16:57 -06:00
Robert Maynard
76cd2ac4da More corrections needed to suppress false positive host / device warnings. 2016-06-30 16:04:37 -04:00
Kenneth Moreland
6dbff1b778 Fix template issue with IteratorFromArrayPortal
I don't know why, but under some circumstances when compiling with CUDA
and Visual Studio, the compiler was giving syntax errors when the
IteratorFromArrayPortal was using the typename keyword to reference a
type in its superclass. Get around the problem by looking directly in
the superclass.
2016-06-27 14:30:02 -06:00
Kenneth Moreland
51a35cb4fe Fix warnings about type conversions 2016-06-27 07:50:15 -06:00
Kenneth Moreland
fd29c81bde Fix warnings about redefined macros
The build automatically sets some macros when building CUDA files. Some
of the CUDA sources were setting the same macros, which was causing
warnings. Change the code to be more careful about setting preprocessor
macros.
2016-06-27 07:50:13 -06:00
Kenneth Moreland
968e1b6008 Make sure tests for many devices are using requested devices
There are several tests in the cont directory that are in header files so
that they can be recompiled for different devices. Make sure that the
tests are exclusively using the device being tested by making the error
device adapter the default.

If any part of the test tries to use the default device (which could be
different than the one being tested), a compile error will occur. Several
of these compile errors are fixed in this commit.
2016-06-23 17:34:01 -06:00
Kenneth Moreland
9b82518836 Fix warning about using wrong type in pointer addition
Just use the ArrayPortalToIterator functions. That's what they are there
for.
2016-06-22 13:47:59 -06:00
Kenneth Moreland
7ff20c9230 Fix includes for CUDA builds
The CMake CUDA build targets do not respect the
target_include_directories (yet?). Instead, add the necessary includes
to cuda_include_directories().
2016-06-22 12:53:23 -06:00
Kenneth Moreland
53da35ecc2 Fix some warnings on Visual Studio 2016-06-21 18:03:33 -06:00
Kenneth Moreland
952929a7d0 Merge branch 'msvc-rendering' into 'master'
Fix several issues concerning using rendering library with Visual Studio

Write a comment or drag your files here...

See merge request !457
2016-06-16 19:40:50 -04:00
Robert Maynard
8f2ec46d9c Merge topic 'DeviceAdapterCopyCheck'
bafee5dd Add a Copy benchmark
208b1ddd Add a DeviceAdapter Copy test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !456
2016-06-16 14:29:31 -04:00
John Biddiscombe
bafee5dd71 Add a Copy benchmark 2016-06-16 09:18:26 -04:00
Kenneth Moreland
dc15a6bedb Get around issue with min/max macros defined
There were a few places in the source code where
std::numeric_limits::min and max were used. There is an issue with these
methods on windows because the standard libraries there define macros
with the same name. Get around this problem by either places parentheses
so that they do not look like macros or use the vtkm::Infinity methods
instead.
2016-06-15 17:44:45 -06:00
John Biddiscombe
208b1ddda3 Add a DeviceAdapter Copy test 2016-06-15 16:27:06 -04:00
Robert Maynard
1e19101eee Obey VisualStudio checked iterator levels, and NULL checked iterators
When compiling under VisualStudio we need to first determine if checked
iterators are enabled ( _ITERATOR_DEBUG_LEVEL ). We don't want to use the
NDEBUG key, as we could be inside a project that is in Debug mode with
disabled checked iterators.

Secondly if they are enabled we need to handle the use case of NULL iterators
that get advanced by length zero. This last case is valid, but isn't supported
by the checked iterators so we need to work around it
2016-06-15 13:13:02 -04:00
Kenneth Moreland
b5415169e2 Change Field and related methods to use Range and Bounds
First, be more explicit when we mean a range of values in a field or a
spacial bounds. Use the Range and Bounds structs in Field and
CoordinateSystem to make all of this more clear (and reduce a bit of
code as well).
2016-05-29 18:49:36 -06:00
Robert Maynard
f1146f7474 Merge topic 'simplify_bounds_computation'
06a06b52 Simplify the bounds computation code to reduce library size.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !426
2016-05-26 15:51:21 -04:00
Robert Maynard
5c7adbd208 Merge topic 'add_policies_to_convert_to_certain_cell_types'
5e200528 Allow filters to have finer control on what cell sets they support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !428
2016-05-26 15:49:14 -04:00
Robert Maynard
0908a91fc9 Merge topic 'support_explicit_instantiation'
6da2dc0c ArrayPortalFromIterators now can be explicitly instantiated.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !427
2016-05-26 14:28:26 -04:00
Robert Maynard
06a06b529d Simplify the bounds computation code to reduce library size.
The previous version of the bounds code required once less pass across
the data, but significantly increase the size of the resulting library:

Data for VTK-VTK-m interop:
  - 7k more symbol table entries
  - 1.5MB larger library

Because of the significant savings we need to use a less efficient
implementation that minimized the code size.
2016-05-26 13:48:30 -04:00
Robert Maynard
5e200528ee Allow filters to have finer control on what cell sets they support
Certain algorithms like VertexClustering only work on certain cellset types.
It is pointless to generate the code paths for structured data cell sets,
when the algorithm can't operate on those dataset types.
2016-05-26 11:32:35 -04:00
Robert Maynard
6da2dc0cda ArrayPortalFromIterators now can be explicitly instantiated.
Template instantiation is useful because when you are creating object files, as
uninstantiated template definitions are not are not added. Fully supporting
explicit instantiation like ITK does will require more code changes, but
this is a very minor step towards that goal.
2016-05-26 08:23:27 -04:00
Robert Maynard
8dfe8cd385 Rename ControlSignature tag TopologyIn to CellSetIn. 2016-05-17 15:07:08 -04:00
Jeremy Meredith
d560cf1d85 Merge branch 'master' into cellsetdim 2016-05-13 14:53:08 -04:00
Jeremy Meredith
0c18278028 removing cell set dimensionality and splitting tetrahedralizer. 2016-05-13 14:26:59 -04:00
Robert Maynard
e5c3f9c42d Solve reduce by key bugs with cuda 7.5 + maxwell hardware.
The concern is now all architectures are doing a hardware sync on reduce_by_key.
This isn't a super serious concern, but it is a downside.
2016-05-12 13:24:59 -04: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
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
Kenneth Moreland
0af7188708 Remove warning about loss of precision. 2016-05-03 16:13:09 -06:00
Matt Larsen
eeae5c1352 Adding fast path for radix sort sort_by_key 2016-05-03 08:53:42 -07: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
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
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
Kenneth Moreland
6543ae4cb8 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.
2016-04-07 16:48:49 -06:00
Kenneth Moreland
0bcd172d39 Merge branch 'atomic-improvements' into 'master'
Add AtomicArrayInOut ControlSignature tag

This makes it easier to pass arrays with atomics to a worklet.

See merge request !382
2016-04-05 15:23:37 -04:00
Robert Maynard
12ffd536fd Suppress false positive warnings from nvcc about host/device. 2016-04-01 15:50:52 -04:00
Robert Maynard
43bb6acdb8 Merge topic 'mclarsen/vtk-m-rendering'
76b6179a Add missing copyright headers.
6a2a47d3 Remove order from new entries in MakeTestDataSet
d7c295f4 added rectilinear to test.
a8c7f92d Move mesa package to right place. Also, add in code for rectlinear mesh.
294b73e0 Make the rendering part of the build optional. Add the mesa libs to the link line.
719b715b Support for explicit cell sets.
98837735 Corrected error in projection matrix that was causing mismatches with ray tracing image and depth buffers.
f9c6f9cd cleanup of code.
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !383
2016-03-29 13:15:00 -04:00
Chuck Atkins
8d5833ef41 Add a missing switch default to cleanup more warnings. 2016-03-28 09:51:04 -04:00
Robert Maynard
6a2a47d3e6 Remove order from new entries in MakeTestDataSet 2016-03-28 08:51:36 -04:00
Dave Pugmire
719b715b59 Support for explicit cell sets. 2016-03-28 08:51:36 -04:00
mclarsen
693b98b92a Merging 2016-03-28 08:51:36 -04:00
Kenneth Moreland
43ed18b0e1 Add AtomicArrayInOut ControlSignature tag.
This makes it easier to pass arrays with atomics to a worklet.
2016-03-24 17:12:17 -06:00
Jeremy Meredith
b53a466f48 Merge branch 'removeorder' into 'master'
removing all references to field order.

This removes all references to Field::order, since it is currently unused.  If we decide to re-add it, it will be done in a more flexible and robust way.

See merge request !380
2016-03-23 16:08:26 -04:00
Jeremy Meredith
ba8517eb67 removing all references to field order. 2016-03-23 10:38:14 -04:00
Kenneth Moreland
316ccc04a9 Remove the Extent class and related functions.
We have decided that we do not need the concept of an Extent in our data
model. Instead, we simply use dimensions, which can be represented in a
vtkm::Id3.
2016-03-22 15:41:42 -06:00
Robert Maynard
589da1f66a Simplify the General DeviceAdapter Unique method. 2016-03-18 16:39:21 -04:00
Chuck Atkins
ab1ac55b29 Merge topic 'cleanup-gcc-warnings'
af7bba06 Refactor liner interpolation to use (1-w)*v0+w*v1
635f8c79 Add a CTestCustom file to to filter out warnings that cant be eliminated
f74c0d3c Remove type conversion related warnings for GCC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !351
2016-03-18 11:47:34 -04:00
Kenneth Moreland
345c360be1 Merge topic 'consistent-io-interface'
f81e8c64 Fix example that was using the old interface to VTKDataSetWriter
6aaf85ba Fix compile error with ofstream.
e863ee99 Change interface of VTKDataSetWriter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !364
2016-03-17 14:42:02 -04:00
Chuck Atkins
f74c0d3c88 Remove type conversion related warnings for GCC 2016-03-17 13:05:38 -04:00
Kenneth Moreland
e863ee991a Change interface of VTKDataSetWriter
Make it match VTKDataSetReader better. It's also a bit easier to use
because you just have to give it a filename rather than open your own file
stream.
2016-03-16 15:35:38 -06:00
Robert Maynard
73b90a2e44 Don't provide vectorization hints for operations that can be done inplace.
Previously we hinted to the compiler that it should vectorized operations
where the input and output are the same array. This obviously caused problems,
and these hints had to be removed.

In the future we need to first check for aliased arrays, and go from there.
2016-03-16 08:29:00 -04:00
Robert Maynard
2f352f90f4 Merge topic 'vtkm_filters'
e4237c3a Fix warnings found by the dashboard machines.
179b48e0 Reduce compile time for MarchingCubes by passing less info by Invoke.
8e4a47ef Update IsosurfaceUniformGrid to use the marching cubes filter.
d370155e MarchingCubes filter now generates coordinates when point merging is enabled.
c00fb53b Marching Cubes now generates vertices when merge duplicates is enabled.
f699c986 Renamed the ```Convert``` method to ```ApplyPolicy```
8e72ec8e Switch filter::threshold over to have a lower and upper bounds.
bcee8270 First draft of vtkm::filter design.
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !311
2016-03-15 13:07:20 -04:00
Robert Maynard
62dd5e6a2a Merge topic 'proper_atomics_with_serial_device'
ee4e490f Moved SMP atomic operations from TBB to General.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !357
2016-03-14 16:56:23 -04:00
Robert Maynard
ee4e490f1d Moved SMP atomic operations from TBB to General.
Even when running with the serial backend, the compiler might enable SIMD
vectorization when optimizations are turned on. When this occurs, we need
to use properly atomic Add's and CAE's.
2016-03-14 10:40:42 -04:00
Robert Maynard
f01fd68b7e DataSetBuilderUniform now builds when the float default is double. 2016-03-14 10:36:13 -04:00
Robert Maynard
aaa10f0c50 Remove the ability to get bounds from Make3DExplicitDataSetCowNose.
This isn't needed now that vtkm::cont::Field can compute bounds.
2016-03-14 08:39:17 -04:00
Robert Maynard
4b7054f4da Changes to computing bounds to allow custom types and storage. 2016-03-14 08:39:17 -04:00
Robert Maynard
52d8a4d9b7 Fix vtkm::cont::Field default constructor to have valid values. 2016-03-14 08:39:17 -04:00
Matt Larsen
e5c4aa3f78 Fixing cuda index error 2016-03-08 12:41:11 -08:00
Matt Larsen
00a7f6c14b Correcting function call 2016-03-08 12:04:55 -08:00
Matt Larsen
249cce352b Adding type restrictions to serial atomics 2016-03-08 10:39:23 -08:00
Matt Larsen
43131ee02b Adding comments about CAS 2016-03-08 09:58:20 -08:00
Matt Larsen
40b6db7eee Inserted missing , 2016-03-08 09:51:50 -08:00
Matt Larsen
3b46706e1f Adding compare and swap and removing unsigned atomics 2016-03-08 09:41:02 -08:00
Matt Larsen
12632de34b Casting Uint64 to long long 2016-03-04 15:17:56 -08:00
Matt Larsen
ecc12dddb7 using reinterpret cast and removing warning from atomic array test 2016-03-04 14:46:45 -08:00
Matt Larsen
72f2549bb9 Removing shadow variable 2016-03-04 12:12:25 -08:00
Matt Larsen
f3c7f188ee Fixing problem with function signatures matching long * to int * 2016-03-04 11:52:52 -08:00
Matt Larsen
733edc8325 changing MS method signatures to long instead of int 2016-03-04 11:13:53 -08:00
Matt Larsen
47452d82bc fixing typo 2016-03-04 10:49:43 -08:00
Matt Larsen
6d63961311 Misplaced bracket 2016-03-04 10:42:07 -08:00
Matt Larsen
da66ea6a15 Refactoring TBB atomics 2016-03-04 10:18:35 -08:00
Matt Larsen
e8b08f2e00 Merge branch 'master' into feature/atomics 2016-03-04 08:03:33 -08:00
Matt Larsen
f0f8f0b556 attempt 6 2016-03-03 23:36:21 -05:00
Matt Larsen
5df9088e1d Adding volatile 2016-03-03 23:13:26 -05:00
Matt Larsen
25604a0288 Another typo 2016-03-03 22:46:15 -05:00
Matt Larsen
4a28124658 Fixing typo 2016-03-03 22:17:29 -05:00
Matt Larsen
29ca4f38f6 Attempting type match 2016-03-03 19:42:35 -05:00
Matt Larsen
1448d0d3b4 Adding another typename 2016-03-03 16:04:04 -05:00
Matt Larsen
23e801da55 Adding typename 2016-03-03 15:34:44 -05:00
Matt Larsen
f0c20903b3 Sorting out iterator type 2016-03-03 15:30:28 -05:00
mclarsen
78888e6542 Testing Interlock exchange 2016-03-02 13:53:28 -08:00
Robert Maynard
7ca13aa9cd Merge topic 'add_missing_return_statement_to_ArrayHandleGroupVec'
230e651d Add missing return statement to ArrayHandleGroupVec

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !348
2016-02-26 15:02:59 -05:00
Robert Maynard
7c84e32835 Merge topic 'correct_namespace_for_ChooseCudaDevice'
2f98cdf7 Resolves Issue #56: ChooseCudaDevice functions are in the proper namespace.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !347
2016-02-26 14:38:17 -05:00
Robert Maynard
230e651d1b Add missing return statement to ArrayHandleGroupVec 2016-02-26 14:26:22 -05:00
Robert Maynard
2f98cdf717 Resolves Issue #56: ChooseCudaDevice functions are in the proper namespace. 2016-02-26 13:51:28 -05:00
Robert Maynard
9f687a64f3 Derived CellSetExplicit classes can now modify the incremental build state. 2016-02-24 08:38:11 -05:00
mclarsen
ca37b2e9cb Fixed compiler error with atomics 2016-02-10 08:21:38 -08:00
Matt Larsen
2baac9cd8b initial commit of atomic adds 2016-02-10 07:51:31 -08:00
Robert Maynard
7161baacd1 Merge topic 'more_cellset_dimensionality_docs'
3f2c68a4 Finish writing the comment explaining what GetDimensionality values mean.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !335
2016-02-03 14:16:19 -05:00
Robert Maynard
3f2c68a4d6 Finish writing the comment explaining what GetDimensionality values mean. 2016-02-03 13:35:10 -05:00
Kenneth Moreland
f4e4dc9ebe Use serial device for copies in DataSetBuilderRectilinear
A previous change used the Copy method of DeviceAdapterAlgorithm to
perform the actual copy in the CopyInto method. This works fine, except
that it uses the default device adapter, and the default device adapter
may need to copy the data to the device just to copy it to another
array. Instead, use the serial device adapter, which is guaranteed to
only perform one copy of the data.
2016-01-27 08:45:29 -07:00
Kenneth Moreland
cadf0e53ab Fix MSVC warnings
Fix your typical batch of MSVC warnings including picky type conversions
and using "unsafe" std functions on pointers for iterators.
2016-01-26 16:23:00 -07:00
Sujin Philip
3b94d350f4 Merge topic 'fix-VTKM_VECTORIZATION_IN_LOOP-placement'
6efc1920 Fix VTKM_VECTORIZATION_IN_LOOP placement

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !321
2016-01-25 16:03:16 -05:00
Sujin Philip
6efc1920df Fix VTKM_VECTORIZATION_IN_LOOP placement
It is only applicable on the statement on following line.
2016-01-25 10:59:08 -05:00
Robert Maynard
1d28a6dd04 Add a small amount of documentation to CellSet Dimensionality. 2016-01-25 09:23:08 -05:00
Kenneth Moreland
f9750e83f7 Fix issues with Field constructor overloads
I ran into a few minor issues with the constructors to the Field class.

The big change I made was that I removed the Field constructors that
take an example type and create an empty field of that type. The problem
was that the example type was easily confused with some other type that
was supposed to describe an array. This lead to some odd behavior in the
compiler and resulted in errors in unexpected places.

The use case for this constructor is dubious. There were several tests
in the code that would create an empty field, add it to a data set, then
get it back out to pass to the worklet. The code is much simpler if you
just make an ArrayHandle of the right type and use that in the worklet
invoke directly. It is also faster to compile with smaller code because
the type is known statically (whereas it is lost the other way).

The other change was to declare references to ArrayHandle and
DynamicArrayHandle as const. There is nothing in the behavior that
invalidates the const, and it accepts arrays constructed in the
parameter.
2016-01-21 13:54:05 -07:00
Kenneth Moreland
e066214090 Add methods to DataSetFieldAdd that accept a DynamicArrayHandle 2016-01-21 13:00:41 -07:00
Kenneth Moreland
d626f7317d Make DataSetBuilder methods static
This makes is slightly easier to use as you do not actually have to
construct the DataSetBuilder object but just call its static method.

The DataSetBuilderExplicitIterative methods are not static because they
use state of the builder object to create the data.
2016-01-21 10:45:33 -07:00
Kenneth Moreland
020c31caf9 Merge branch 'get-cell-dimensions' into 'master'
Add GetCellDimensions to CellSetStructured

There was not an easy way to get the dimensions of cells in a structured
data set. Add a method to get that.

See merge request !323
2016-01-20 14:42:42 -05:00
Robert Maynard
8070586ea7 Merge topic 'less_temporary_copies'
4153c2c7 Found a few more places where we don't need to return by value.
dd85fc13 Document why we certain classes member variables need to be const ref.
6fb86da8 DynamicArrayHandle Casting methods now holds by const * const.
c1560e2d Perform less unnecessary copies when deducing a worklets parameters.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !320
2016-01-20 12:02:57 -05:00
Kenneth Moreland
384727d00e Add GetCellDimensions to CellSetStructured.
There was not an easy way to get the dimensions of cells in a structured
data set. Add a method to get that.
2016-01-20 09:24:31 -07:00
Kenneth Moreland
dec61fe51a Merge branch 'regular-to-uniform' into 'master'
Change Regular to Uniform

There was an inconsistency in naming classes where axes-aligned grids
with even spacing were sometimes called "uniform" and sometimes called
"regular". Maintain consistency by always calling them uniform.

See merge request !322
2016-01-20 11:04:44 -05:00
Kenneth Moreland
9ccd7fa9c7 Change Regular to Uniform
There was an inconsistency in naming classes where axes-aligned grids
with even spacing were sometimes called "uniform" and sometimes called
"regular". Maintain consistency by always calling them uniform.
2016-01-19 15:54:05 -07:00
Robert Maynard
2ae3f13a79 Don't use DeviceAdapter inside DataSetBuilderRectilinear.
No need to use the device adapter, just do a manual host side copy.
2016-01-19 15:43:49 -05:00
Robert Maynard
4153c2c786 Found a few more places where we don't need to return by value. 2016-01-19 10:54:37 -05:00
Robert Maynard
6fb86da8f9 DynamicArrayHandle Casting methods now holds by const * const.
This is to make it more clear to developers that the handle is a
reference that could be NULL.
2016-01-19 09:29:55 -05:00
Robert Maynard
c1560e2d3f Perform less unnecessary copies when deducing a worklets parameters.
One of the causes of the large library size and slow compile times has been
that vtkm has been creating unnecessary copies when not needed. When the
objects being copied use shared_ptr this causes a bloom in library size. I
presume this bloom is caused by the atomic increment/decrement that is
required by shared_ptr.

For testing I used the following example:
```
struct ExampleFieldWorklet : public vtkm::worklet::WorkletMapField
{
  typedef void ControlSignature( FieldIn<>, FieldIn<>, FieldIn<>,
                                 FieldOut<>, FieldOut<>, FieldOut<> );
  typedef void ExecutionSignature( _1, _2, _3, _4, _5, _6 );

  template<typename T, typename U, typename V>
  VTKM_EXEC_EXPORT
  void operator()( const vtkm::Vec< T, 3 > & vec,
                   const U & scalar1,
                   const V& scalar2,
                   vtkm::Vec<T, 3>& out_vec,
                   U& out_scalar1,
                   V& out_scalar2 ) const
  {
    out_vec = vec * scalar1;
    out_scalar1 = scalar1 + scalar2;
    out_scalar2 = scalar2;
  }

  template<typename T, typename U, typename V, typename W, typename X, typename Y>
  VTKM_EXEC_EXPORT
  void operator()( const T & vec,
                   const U & scalar1,
                   const V& scalar2,
                   W& out_vec,
                   X& out_scalar,
                   Y& ) const
  {
  //no-op
  }
};

int main(int argc, char** argv)
{
  std::vector< vtkm::Vec<vtkm::Float32, 3> > inputVec;
  std::vector< vtkm::Int32 > inputScalar1;
  std::vector< vtkm::Float64 > inputScalar2;

  vtkm::cont::ArrayHandle< vtkm::Vec<vtkm::Float32, 3> > handleV =
    vtkm::cont::make_ArrayHandle(inputVec);

  vtkm::cont::ArrayHandle< vtkm::Vec<vtkm::Float32, 3> > handleS1 =
    vtkm::cont::make_ArrayHandle(inputVec);

  vtkm::cont::ArrayHandle< vtkm::Vec<vtkm::Float32, 3> > handleS2 =
    vtkm::cont::make_ArrayHandle(inputVec);

  vtkm::cont::ArrayHandle< vtkm::Vec<vtkm::Float32, 3> > handleOV;
  vtkm::cont::ArrayHandle< vtkm::Vec<vtkm::Float32, 3> > handleOS1;
  vtkm::cont::ArrayHandle< vtkm::Vec<vtkm::Float32, 3> > handleOS2;

  std::cout << "Making 3 output DynamicArrayHandles " << std::endl;
  vtkm::cont::DynamicArrayHandle out1(handleOV), out2(handleOS1), out3(handleOS2);

  typedef vtkm::worklet::DispatcherMapField<ExampleFieldWorklet> DispatcherType;

  std::cout << "Invoking ExampleFieldWorklet" << std::endl;
  DispatcherType dispatcher;

  dispatcher.Invoke(handleV, handleS1, handleS2, out1, out2, out3);

}
```

Original vtkm would generate a binary of size 4684kb and would perform 91
ArrayHandle copies or assignments. With this branch the binary size is
reduced to 2392kb and will perform 36 copies or assignments.
2016-01-19 09:20:49 -05:00
Robert Maynard
8cf9b979c7 Don't use DeviceAdapter inside DataSetBuilderExplicit.
No need to use the device adapter, just do a manual host side copy.
2016-01-19 08:56:50 -05:00
Kenneth Moreland
c62937d612 Fix warning about uninitialized value. 2016-01-18 15:58:07 -07:00
Kenneth Moreland
ed43dad6ca Simplify and unify cast interface.
Previously, DynamicArrayHandle and DynamicCellSet had slightly different
interfaces to their CastTo feature. It was a bit confusing and not all
that easy to use.

This change simplifies and unifies them by making each class have a single
CopyTo method that takes a reference to a cast object (an ArrayHandle or
CellSet, respectively) and fills that object with the data contained if
the cast is successfull. This interface gets around having to declare
strange types.

Each object also has a Cast method that has to have a template parameter
specified and returns a reference of that type (if possible).

In addition, the old behavior is preserved for DynamicArrayHandle (but
not DynamicCellSet). To avoid confusion, the name of that cast method is
CastToTypeStorage. However, the method was chaned to not take parameters
to make it consistent with the other Cast method.

Also, the IsType methods have been modified to reflect changes in
cast/copy. IsType now no longer takes arguments. However, an alternate
IsSameType does the same thing but does take an argument.
2016-01-18 15:58:04 -07:00
Kenneth Moreland
92d2ad6a72 Consolidate dynamic_cast calls.
Previously in DynamicArrayHandle the dynamic_cast was contained in a
method that was reimplemented for every different instance of
DynamicArrayHandleBase. Change that to put the dynamic_cast in a
function outside of the class so that there is only one implementation
created per ArrayHandle type.

Similarly, DynamicCellSet had its dynamic_cast in a method plus there
was a second version in the functors used for the CastAndCall method.
Consolidate all of these into a function outside of either much like
DynamicArrayHandle.
2016-01-18 15:55:02 -07:00
Robert Maynard
eba2fb493f Fixed some warnings in the DataSetBuilder code. 2016-01-18 15:04:18 -05:00
Robert Maynard
dd312516f6 Fix issue found be moving over to DataSetBuilderExplicit.
Mainly issue dealing with dimensionality of cell sets and what that represents.
Have added in code to allow user to specify a custom dimensionality so that
tests continue to work properly.
2016-01-15 16:16:38 -05:00
Robert Maynard
e7456fa120 Update vtkm tests and examples to use DataSetBuilders. 2016-01-15 15:44:56 -05:00
Robert Maynard
449c425a23 Allow DataSetBuilderExplicit to create CellSetSingleType.
If you have only a single cell shape, you can now efficiently create
a vtkm::cont::DataSet whose CellSet is vtkm::cont::CellSetSingleType.
2016-01-15 15:06:09 -05:00
Kenneth Moreland
f71b59e733 Merge branch 'cuda-timer-bug' into 'master'
Synchronize the CUDA timer on both the start and end events

Previously, the timer for CUDA devices only called cudaEventSynchronize
at the end event when asking for the elapsed time. This, however, could
allow time to pass from when the timer was reset to when the start event
happened that was not recorded in the timer. This added synchronization
should make sure that all time spent in CUDA is recorded.

See merge request !291
2016-01-14 18:22:08 -05:00
Kenneth Moreland
0b2823ba55 Make UnitTestArrayHandleCartesianProduct faster
Reduce the number of conditions UnitTestArrayHandleCartesianProduct
tries so that it is faster. All the conditions are pretty similar, so it
should be OK to reduce some.
2016-01-14 15:22:33 -07:00
Kenneth Moreland
427f3cf57d Make Rectilinear and Regular builder tests faster
Previously UnitTestDataSetBuilderRectilinear and
UnitTestDataSetBuilderRegular did an exhaustive test of all possible
grid sizes within a certain amount of dimensions and with some number of
ways to build point arrays. This created hundreds of thousands of cases
that were checked, and it was running a long time. At best it wasted
time and at worst ctest reported the test as timed out.

It is not really necessary to perform an exhaustive test. The tests are
changed to do 10 trials using random values for dimensions and fill
methods.
2016-01-14 15:15:19 -07:00
Kenneth Moreland
e0184e6648 Fixed warnings about sign conversion. 2016-01-14 14:01:28 -07:00
Dave Pugmire
a5972e6a15 Merge topic 'dataset-builder2'
f86382f0 Fix support for CoordinateSystems using ArrayHandleCartesianProduct.
d6a2a142 Add toleranced compare for values. Add tests for vtkm::Float32,Float64,Id typed arrays.
5d438353 Add toleranced comparisions for bounds validation. Also, add vtkm::Float32 and vtkm::Float64 to the testing for rectilinear and regular datasets.
b225ae97 Rectilinear coordinates (created with DataSetBuilderRectilinear) are now converted to vtkm::FloatDefault. This reduces the number of types to consider when casting inside CoordinateSystem, and was felt by all to be a reasonable restriction.
d755e43d Use ArrayHandleCompositeVector to represent separated point arrays for DataSetBuilderExplicit.h.
c7b0ffb8 Add tests for DataSetBuilderExplicit. Added cont/testing/ExplicitTestData.h which includes several explicit datasets.  These datasets come from VTK data generated in VisIt.  The new unit tests build datasets in several different ways and do some basic validation.
b4d04fff Add specialization of printSummary_ArrayHandle for UInt8. It prints them as characters, which are a little hard to understand to this computer scientist.
bd929c20 Fix compiler warnings.
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !262
2016-01-14 14:57:02 -05:00
Robert Maynard
719ee34a60 Merge topic 'dynamic_cell_set_use_default'
4e94617f Make DynamicCellSet use VTKM_DEFAULT_CELL_SET_LIST_TAG.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !309
2016-01-14 08:37:36 -05:00
Robert Maynard
4e94617f89 Make DynamicCellSet use VTKM_DEFAULT_CELL_SET_LIST_TAG.
It was previously using vtkm::cont::CellSetListTagCommon which would
break the ability for people to specify a custom value for
VTKM_DEFAULT_CELL_SET_LIST_TAG.
2016-01-13 11:05:58 -05:00
Kenneth Moreland
3f446ad261 Add ErrorControlCuda for better CUDA error checking.
Add lots of checks to CUDA calls in the timer to try to identify any
problems that might be showing up on the dashboard.

Also adding some print statements around the sleep function in the
device adapter testing. For some reason the problem just went away with
them.
2016-01-12 15:19:54 -07:00
Kenneth Moreland
f582729803 Synchronize the CUDA timer on both the start and end events
Previously, the timer for CUDA devices only called cudaEventSynchronize
at the end event when asking for the elapsed time. This, however, could
allow time to pass from when the timer was reset to when the start event
happened that was not recorded in the timer. This added synchronization
should make sure that all time spent in CUDA is recorded.
2016-01-12 15:13:56 -07:00
Robert Maynard
b8e5923ae1 FunctorsTBB now uses VTKM_VECTORIZATION_X macros everywhere. 2016-01-12 08:43:06 -05:00
Robert Maynard
360694b54c Merge topic 'reset_type_and_storage_in_single_call'
b70a000a Allow resetting the Type and Storage of a DynamicArrayHandle in a single call.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !302
2016-01-08 12:25:39 -05:00
Robert Maynard
b70a000ac0 Allow resetting the Type and Storage of a DynamicArrayHandle in a single call.
vtkm::filter has the use case where we need to reset both the type and
storage of an array handle, by doing both at the same time we can reduce
the number of temporary objects, and invalid conversions of arrays.
2016-01-08 11:47:59 -05:00
dpugmire
f86382f0a9 Fix support for CoordinateSystems using ArrayHandleCartesianProduct. 2016-01-07 14:17:23 -05:00
dpugmire
d6a2a14271 Add toleranced compare for values.
Add tests for vtkm::Float32,Float64,Id typed arrays.
2016-01-07 11:04:38 -05:00
dpugmire
5d438353d7 Add toleranced comparisions for bounds validation.
Also, add vtkm::Float32 and vtkm::Float64 to the testing for rectilinear and regular datasets.
2016-01-07 10:52:31 -05:00
dpugmire
b225ae97a2 Rectilinear coordinates (created with DataSetBuilderRectilinear) are now converted to vtkm::FloatDefault.
This reduces the number of types to consider when casting inside CoordinateSystem, and was felt by all to be a reasonable restriction.
2016-01-07 10:23:52 -05:00
dpugmire
d755e43dec Use ArrayHandleCompositeVector to represent separated point arrays for DataSetBuilderExplicit.h. 2016-01-06 13:47:34 -05:00
dpugmire
c7b0ffb8a3 Add tests for DataSetBuilderExplicit.
Added cont/testing/ExplicitTestData.h which includes several explicit datasets.  These datasets come from VTK data generated in VisIt.  The new unit tests build datasets in several different ways and do some basic validation.

Add some new methods for DataSetFieldAdd class to improve usability.
2016-01-05 16:28:57 -05:00
dpugmire
b4d04fffe9 Add specialization of printSummary_ArrayHandle for UInt8. It prints them as characters, which are a little hard to understand to this computer scientist. 2016-01-05 14:41:19 -05:00
Robert Maynard
a6088807c0 Merge topic 'correct_tbb_sort_by_key'
c7756c78 TBB SortByKey works now when the key is a ArrayHandleZip.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !301
2016-01-05 10:40:33 -05:00
Robert Maynard
5500bae951 Merge topic 'allow_empty_field_construction'
c2ba8baf Allow vtkm::cont::Field to have a default constructor.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !297
2016-01-05 10:39:36 -05:00
Robert Maynard
c7756c78bb TBB SortByKey works now when the key is a ArrayHandleZip.
The issue was that the temporary index array storage container
was the same as the input ArrayHandleZip which is not correct.
2016-01-04 16:55:47 -05:00
Robert Maynard
c2ba8baf7c Allow vtkm::cont::Field to have a default constructor.
When designing vtkm::filter we needed the ability to construct invalid Fields.
This now allows us to do exactly that.
2016-01-04 15:40:37 -05:00