Commit Graph

1437 Commits

Author SHA1 Message Date
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
020975930c Merge topic 'generalize-marchingcubes-input'
15e1f80d Generalize MarchingCubes input with additional template parameters.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !304
2016-01-13 13:49:13 -05:00
Robert Maynard
ede404191e Merge topic 'better_compiler_detection'
f5f9939f Update all of vtkm to understand it can only identify as one compiler.
c706c826 Configure.h can only state a machine is a one compiler.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !307
2016-01-13 13:49:07 -05:00
Robert Maynard
a06becd241 Merge topic 'use_vectorization_helpers_everywhere'
b8e5923a FunctorsTBB now uses VTKM_VECTORIZATION_X macros everywhere.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Chuck Atkins <chuck.atkins@kitware.com>
Merge-request: !306
2016-01-13 12:13:34 -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
Chuck Atkins
429350ab41 Merge topic 'fix-gcc-pragma'
ccdb7bb6 Fix incorrect vectorization pragma for GCC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !308
2016-01-12 12:26:42 -05:00
Chuck Atkins
ccdb7bb6cf Fix incorrect vectorization pragma for GCC 2016-01-12 11:10:20 -05:00
Robert Maynard
f5f9939f26 Update all of vtkm to understand it can only identify as one compiler. 2016-01-12 11:05:40 -05:00
Robert Maynard
c706c8269b Configure.h can only state a machine is a one compiler.
It used to be possible for vtk-m to say it was multiple compilers, for example
it could be both GCC and PGI, Clang and MSVC ( yes possible ), or Intel and
Clang.

This logical restructure now makes that impossible, and instead prefers a system
where we choose the most specialized version of the compiler over the most
general, where general is GCC / Clang.
2016-01-12 11:05:40 -05:00
Robert Maynard
b8e5923ae1 FunctorsTBB now uses VTKM_VECTORIZATION_X macros everywhere. 2016-01-12 08:43:06 -05:00
Robert Maynard
02d10e38c4 Merge topic 'fix-gcc-pragma'
9e9e3caf Fix a misplaced '\' for GCC pragmas in Configure.h.in

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !305
2016-01-11 15:23:51 -05:00
Chuck Atkins
9e9e3caf3c Fix a misplaced '\' for GCC pragmas in Configure.h.in 2016-01-11 14:52:41 -05:00
T.J. Corona
15e1f80ddd Generalize MarchingCubes input with additional template parameters. 2016-01-08 14:56:10 -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
34ad520987 Merge topic 'marching_cubes_normal_generation_option'
82a573f7 MarchingCubes is now able to not generate normals.
502e7c28 Merge branch 'cleanup_scatter_counting_uses' into marching_cubes_normal_generation_option
8079dc28 MarchingCubes generate step now requires a ScatterCounting object.
4cd2f582 Add a default constructor for ScatterCounting.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !300
2016-01-08 11:50:10 -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
Robert Maynard
82a573f712 MarchingCubes is now able to not generate normals. 2016-01-08 10:42:49 -05:00
Kenneth Moreland
378004f629 Merge branch 'point-count' into 'master'
Add PointCount to WorkletMapPointToCell.

WorkletMapPointToCell is a convenience subclass of WorkletMapTopology.
As such, it renames all the From/To signature tags to say Point/Cell to
be easier to read. However, the alias for FromCount was missing. Add the
alias PointCount.

See merge request !303
2016-01-07 18:59:41 -05:00
Kenneth Moreland
23c3cd3020 Add PointCount to WorkletMapPointToCell.
WorkletMapPointToCell is a convenience subclass of WorkletMapTopology.
As such, it renames all the From/To signature tags to say Point/Cell to
be easier to read. However, the alias for FromCount was missing. Add the
alias PointCount.
2016-01-07 15:26:29 -07: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
a0d86165aa Merge topic 'restrict_output_types_on_marching_cubes'
30ac46f2 We know the exact FieldOutCell types for MarchingCubes, so restrict it.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !299
2016-01-05 10:40:06 -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
Kenneth Moreland
d502f6e28b Merge branch 'composite-array-handle-in-control' into 'master'
Support control array portals in ArrayHandleCompositeVector.

Previously, the ArrayHandleCompositeVector had a separate implementation
of ArrayPortal for the control and execution environments. Because I was
lazy when I implemented it, the control version did not support Get.

Since originally implementing this class, VTK-m now allows defining
methods that are declared as working in both control and execution
environments (VTKM_EXEC_CONT_EXPORT) but only work in one or the other
depending on methods of templated subclasses they call. Thus, solve this
problem by simply removing the control version of the portal and use the
same portal for both.

See merge request !296
2016-01-04 19:32:32 -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
502e7c28f2 Merge branch 'cleanup_scatter_counting_uses' into marching_cubes_normal_generation_option 2016-01-04 16:52:46 -05:00
Robert Maynard
30ac46f20e We know the exact FieldOutCell types for MarchingCubes, so restrict it.
By restricting the types explicitly in the ControlSignature we reduce
the code bloat, if we ever pass in a DynamicArrayHandle as one of those
parameters.
2016-01-04 16:43:28 -05:00
Robert Maynard
8079dc28f0 MarchingCubes generate step now requires a ScatterCounting object.
Instead of having the generate step templated on the device adapter and
the counting handle, we take in a fully constructed scatter counting object.
2016-01-04 16:38:11 -05:00
Robert Maynard
4cd2f582f4 Add a default constructor for ScatterCounting.
Without a default constructor for ScatterCounting any class that wants
to hold onto a ScatterCounting object is required to know what device
they are running on. By allowing default construction, we can move that
requirement to just have a method on the object require a device adapter
object.
2016-01-04 16:00:29 -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
Kenneth Moreland
e874b52f18 Support control array portals in composite vector.
Previously, the ArrayHandleCompositeVector had a separate implementation
of ArrayPortal for the control and execution environments. Because I was
lazy when I implemented it, the control version did not support Get.

Since originally implementing this class, VTK-m now allows defining
methods that are declared as working in both control and execution
environments (VTKM_EXEC_CONT_EXPORT) but only work in one or the other
depending on methods of templated subclasses they call. Thus, solve this
problem by simply removing the control version of the portal and use the
same portal for both.
2016-01-04 12:53:56 -07:00
dpugmire
bd929c207b Fix compiler warnings. 2016-01-04 14:45:39 -05:00
dpugmire
0372acbe4f Fix compiler warnings. 2016-01-04 14:45:27 -05:00
Robert Maynard
b93658b403 Merge topic 'correct_serial_sort_by_key'
c9751b0d Serial SortByKey works now when the key is a ArrayHandleZip.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !295
2015-12-31 15:13:17 -05:00
Robert Maynard
c9751b0d40 Serial 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.
2015-12-31 14:45:18 -05:00
dpugmire
fe1ab945a2 This commit has several changes.
1. Additional ASSERT calls to validate arguments in: DataSetBuilderRegular
2. Fix some untested compile errors in DataSetBuilderRectilinear
3. Added a new unit test, cont/testing/UnitTestDataSetBuilderRectilinear.cxx
4. Provided additional tests for UnitTestDataSetBuilderRegular.cxx.
The new tests in (4) were also included in (3), and provide a much more robust way of validating datasets created. It has nested for loops to do an all-all test on various ways to specify the X,Y, and Z coordinates.  It computes the bounds on the coordinate system and make sure they are correct.
Note: The GetBounds() call for Rectilinear is not working, and is an item for future discussion. It is disabled for now.
2015-12-30 12:34:04 -05:00
dpugmire
482341562f Add more robust testing for DataSetBuilderRegular class. Also, add options for creating rectilinear dataset from ArrayHandle. 2015-12-29 12:17:46 -05:00
dpugmire
c0d188c2da Add tests for ArrayHandleCartesianProduct. 2015-12-29 09:44:30 -05:00
Dave Pugmire
acd4dae229 Change interface to DataSetBuilderRegular::Create to better match the VTKM philosophy. Modify the MakeTestDataSet class to use the new interface. 2015-12-24 11:46:07 -05:00
Dave Pugmire
665427dbb0 Merge branch 'dataset-builder2' of gitlab.kitware.com:dpugmire/vtk-m into dataset-builder2 2015-12-24 11:21:08 -05:00