Commit Graph

890 Commits

Author SHA1 Message Date
Robert Maynard
589285eb5e Merge topic 'correct_reduce_tbb'
a339f3ac Had to rewrite tbb reduce to correct all the problems.
0120157e Correct tbb reduction algorithm to be correct when using multiple threads.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !654
2017-01-05 09:25:23 -05:00
Robert Maynard
a339f3ac0e Had to rewrite tbb reduce to correct all the problems.
The previous implementation(s) didn't properly handle non identity
initial values properly.
2017-01-04 17:27:21 -05:00
Robert Maynard
0120157e2e Correct tbb reduction algorithm to be correct when using multiple threads. 2017-01-04 13:43:55 -05:00
Robert Maynard
137dffb4a1 CellSetPermutation copy constructor to suppress cuda warnings.
Without an explicit copy constructor when cuda is used it generates a
copy constructor which is marked up as host/device and than emits warnings.
2017-01-02 11:29:32 -05:00
Kenneth Moreland
a5817da438 Fix cow nose data set
It was not properly setting the number of points.
2016-12-19 17:59:16 -07:00
Kenneth Moreland
9ea10317d9 Add passing input domain to transport operator
Previously, the operator for a Transport class took the object being
transported to the execution environment and the size of the output
domain. This change also passes in the control-side argument for the
input domain. This will help check input array sizes as well as make
other potential transformations based on the input domain.
2016-12-19 17:03:15 -07:00
Kenneth Moreland
1c3f1694ea Remove ambiguous CellSetExplicit constructor
CellSetExplicit had a constructor that took a single argument that is
the number of points in the data and another constructor that had two
arguments of the number of points and the name. The problem was that the
latter constructor had a default argument for the second argument. Thus,
if you tried to construct a CellSetExplicit with just the number of
points, it would fail to compile because the compiler would not know
which constructor to use.

Fix the issue by removing the single argument constructor.
2016-12-16 08:41:13 -07:00
Kenneth Moreland
4dd16c5bcb Merge topic 'check-cuda-errors'
98c8cb86 Do not attempt to execute CUDA kernels with no blocks
fda3ec71 Don't call std functions in math nonfinte functions for CUDA
55c159d6 Check error codes from CUDA functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !632
2016-12-16 10:27:06 -05:00
Kenneth Moreland
ce7d2190e4 Fix winding of hexahedrons
While writing a test I noticed that some of the MakeTestDataSet
hexahedrons had improper point ordering. It was close but backwards so
that all the faces pointed in instead of out.
2016-12-16 07:22:01 -07:00
Kenneth Moreland
22b3a4a72a Add a small test data set
This new explicit data set example is interesting in that it contains
several different cell types (one of every 3D cell shape currently
defined).
2016-12-15 16:04:38 -07:00
Kenneth Moreland
98c8cb8657 Do not attempt to execute CUDA kernels with no blocks
I noticed that when I attempted to execute a CUDA kernel with 0 blocks,
it generated a CUDA error. The error did not really matter since nothing
was really supposed to run anyway. However, once we are careful about
checking CUDA errors, it will cause test failures and likely other
misdiagnoses.
2016-12-15 11:33:48 -07:00
Robert Maynard
3c9b8f1793 Merge topic 'add_pointaverage_filter'
854e298b CellAverage filter now verifies the field is a point field.
b85cb2dd Add a PointAverage Filter.
daa75d74 Add a PointAverage worklet which is the twin to CellAverage.
839d8e83 CellAverage first control parameter is now the cellset.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !636
2016-12-15 12:18:57 -05:00
Robert Maynard
854e298be6 CellAverage filter now verifies the field is a point field. 2016-12-15 09:10:33 -05:00
Kenneth Moreland
55c159d6f0 Check error codes from CUDA functions
Most functions in the CUDA runtime API return an error code that must be
checked to determine whether the operation completed successfully. Most
operations in VTK-m just called the function and assumed it completed
correctly, which could lead to further errors. This change wraps most
CUDA calls in a VTKM_CUDA_CALL macro that checks the error code and
throws an exception if the call fails.
2016-12-14 10:43:44 -07:00
Robert Maynard
ce651e479d Merge topic 'de_virtual'
8223eacc De-virtualize classes that have no need of a vtable.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !634
2016-12-14 08:34:47 -05:00
Ben Boeckel
e06a998e5b Merge topic 'render_1D'
8a93ecc4 code alignment tweaks.
6fa448b5 Remove the 1D camera. 1D plots will use a 2D camera.
52aa9b9a Fix some compile errors.
23d8d585 Add explicit 1D rendering. Also added some data model suport.
db522c4c Add GetCanvas calls to the mapper classes.
87b1cdca cleanup. Remove some compiler warnings.
d38e6270 Support for 1D rendering.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !616
2016-12-09 09:34:11 -05:00
Robert Maynard
8223eacc34 De-virtualize classes that have no need of a vtable.
This is desired to help reduce the amount of weak vtables we generate,
for more information on why this is desired see:
https://gitlab.kitware.com/vtk/vtk-m/issues/103
2016-12-08 11:21:04 -05:00
Robert Maynard
c6088fa539 Merge topic 'cellset_explicit_CellToPoint_constant_shape_storage'
80df037f CellSetExplicit Reverse Connectivity is abit more efficient.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !623
2016-12-02 15:30:01 -05:00
Robert Maynard
a74bab02f4 Merge topic 'allow_reduction_to_different_T_type'
b97b4cc7 Allow thrust::reduce to work when iterator and initial value types differ.
64bcc343 Refactor MinAndMax to use vtkm::Vec<T,2> instead of Pair.
8d60ed57 Refactor MinAndMax to be a shared binary operator.
18375b54 Update Bound computations to always use a single Reduce call
2cfc9743 Reduce can support reduce to a T type that isn't the arrayhandles T type.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !614
2016-12-01 07:56:30 -05:00
Robert Maynard
2b5b2ab1f8 Make sure FunctorsGeneral doest produce warnings when parsed by nvcc. 2016-11-30 17:13:12 -05:00
Robert Maynard
295de14deb Merge topic 'consistently_guard_around_windows_h'
6b1094c7 Consistently include windows.h by making a wrapper header.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !620
2016-11-30 13:56:49 -05:00
Robert Maynard
80df037f73 CellSetExplicit Reverse Connectivity is abit more efficient.
Both computing the reverse connectivity and also the total footprint are now
smaller.
2016-11-29 14:17:02 -05:00
Dave Pugmire
52aa9b9ad0 Fix some compile errors. 2016-11-29 09:33:46 -05:00
Dave Pugmire
23d8d585a0 Add explicit 1D rendering. Also added some data model suport. 2016-11-28 16:07:40 -05:00
Robert Maynard
6b1094c767 Consistently include windows.h by making a wrapper header.
We previously included windows.h in numerous locations using different
techniques to guard against bringing in parts of the file that are bad
(min/max macros, etc). This solves the problem by consistently using
vtkm/internal/Windows.h to setup everything.
2016-11-28 09:54:37 -05:00
Robert Maynard
b97b4cc7ef Allow thrust::reduce to work when iterator and initial value types differ.
natively thrust::reduce is unable to handle the use case where the
iterator type and the initial value/return value are two different
types. We use array handle cast to work around this problem when
we detect this usecase.
2016-11-25 13:11:19 -05:00
Robert Maynard
64bcc34389 Refactor MinAndMax to use vtkm::Vec<T,2> instead of Pair.
The types are the same which makes Vec a more suitable container.
2016-11-25 13:11:19 -05:00
Robert Maynard
8d60ed57ad Refactor MinAndMax to be a shared binary operator. 2016-11-25 11:40:46 -05:00
Robert Maynard
18375b5424 Update Bound computations to always use a single Reduce call 2016-11-25 11:40:46 -05:00
Robert Maynard
2cfc9743e3 Reduce can support reduce to a T type that isn't the arrayhandles T type.
This has been done so that operations such as computing the Min/Max of
an array can be done in a single reduce step.
2016-11-25 11:40:46 -05:00
Robert Maynard
53f4e6016d Merge topic 'tbb_parallel_reduce'
c8da8ae3 TBB now uses tbb::parallel_reduce for reductions.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !615
2016-11-25 10:58:03 -05:00
Kenneth Moreland
292500becf Merge topic 're-add-test-builds'
5a444af6 Make ArrayPortalStreaming methods CONT
e1a9264d Re-enable test builds

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !609
2016-11-23 17:54:13 -05:00
Robert Maynard
c8da8ae354 TBB now uses tbb::parallel_reduce for reductions.
This results in a reductions under tbb have a 2x to 4x performance increase.
2016-11-23 14:32:18 -05:00
Dave Pugmire
d38e627057 Support for 1D rendering. 2016-11-23 10:48:22 -05:00
Kenneth Moreland
e43acbac28 Fix issue with private class in CUDA
CUDA has some strange rules about using private classes and anonymous
namespaces. For whatever reason, recent changes have introduced such an
issue. When compiling on CUDA, expose the problematic class. It is
testing code, so it does not matter much.
2016-11-22 17:31:50 -07:00
Kenneth Moreland
c6cd9d02ba Implement CleanGrid filter 2016-11-22 17:16:49 -07:00
Kenneth Moreland
ce338d1484 Add a worklet for copying cell sets 2016-11-22 17:15:10 -07:00
Kenneth Moreland
63c748f049 Implement ArrayHandleGroupVecVariable
This is a fancy array handle that can group entries in another array by
arbitrary amounts. This allows us to implement input and output arrays
with a different sized Vec for each instance. This is necessary for
generating new topologies with cells of different types.
2016-11-22 17:10:09 -07:00
Kenneth Moreland
5a444af67b Make ArrayPortalStreaming methods CONT
Changing the macros of the methods of ArrayPortalStreaming to be only
for CONT (the control environment) rather than both CONT and EXEC (both
the control and export environments). ArrayPortalStreaming is really
only used in the control environment and passed to the default transport
where the data is copied to the execution environment.

My hope is that this change will eliminate some rather odd and non-
descriptive warnings on the dashboard.
2016-11-16 09:55:15 -07:00
Kenneth Moreland
fdaccc22db Remove exports for header-only functions/methods
Change the VTKM_CONT_EXPORT to VTKM_CONT. (Likewise for EXEC and
EXEC_CONT.) Remove the inline from these macros so that they can be
applied to everything, including implementations in a library.

Because inline is not declared in these modifies, you have to add the
keyword to functions and methods where the implementation is not inlined
in the class.
2016-11-15 22:22:13 -07:00
Robert Maynard
c867b9bcca Remove unused variable 'coordinates' 2016-11-11 08:34:05 -05:00
Robert Maynard
b879ce84bc Merge topic 'remove_unused_class'
d52fc1f7 Remove PointCoordinatesBase which is not used.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !605
2016-11-10 15:34:51 -05:00
Robert Maynard
d52fc1f76c Remove PointCoordinatesBase which is not used. 2016-11-10 15:07:34 -05:00
Robert Maynard
3a9bcca016 Merge topic 'add_whole_topology_tag'
c4183cfa Refactor WholeCellSetIn to handle Point->Cell and Cell->Point
f65f5ea6 WorkletBase can now transport CellSets as a whole execution object.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !601
2016-11-10 14:50:04 -05:00
Christopher Sewell
f779e8a1bd Removing streaming scan inclusive for now 2016-11-09 15:43:57 -07:00
Christopher Sewell
faa69e539d vtkm::internal::Add to vtkm::Add 2016-11-09 14:21:50 -07:00
Christopher Sewell
8a8b409d4c Merge remote-tracking branch 'upstream/master' into StreamingArray 2016-11-09 12:15:58 -07:00
Robert Maynard
ad0593e845 Merge topic 'wavelet2'
35a81df0 change variable names to avoid confusion
b2719157 simplify functions to get the approximation and detail coefficients length
d7e94e3a update 2D idwt to not assign zero to the last element of cDTemp
568bd63f fix a few warnings
514dcf4b see if unused warning shows up
30660bf4 fix comments by Rob
97118931 improved error message when test failing
9b45dba3 fix 2 warnings
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !577
2016-11-08 16:10:15 -05:00
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