Commit Graph

1904 Commits

Author SHA1 Message Date
Sujin Philip
ee2999d19b Some classes should be exported 2019-04-25 09:50:49 -04:00
Robert Maynard
63c931e639 Correct location of ThrustPatches which clang formatter moved 2019-04-23 15:02:58 -04:00
Robert Maynard
bd544754a4 Merge topic 'no_odr_violation_on_cuda_tag'
ff687016e For VTK-m libs all includes of DeviceAdapterTagCuda happen from cuda files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1648
2019-04-23 14:40:38 -04:00
Robert Maynard
ff687016ee For VTK-m libs all includes of DeviceAdapterTagCuda happen from cuda files
It is very easy to cause ODR violations with DeviceAdapterTagCuda.
If you include that header from a C++ file and a CUDA file inside
the same program we an ODR violation. The reasons is that the C++
versions will say the tag is invalid, and the CUDA will say the
tag is valid.

The solution to this is that any compilation unit that includes
DeviceAdapterTagCuda from a version of VTK-m that has CUDA enabled
must be invoked by the cuda compiler.
2019-04-22 10:39:54 -04:00
Sujin Philip
13ef17eaa7 Remove thread_local from RuntimeDeviceNames
Older Mac compilers that are still supported by VTK don't support
`thread_local`.
2019-04-19 16:03:48 -04:00
Robert Maynard
d8cc067caa Remove DeviceAdapterError as it isn't needed any more.
Fixes #277

DeviceAdapterError existed to make sure that the default device adapter
template was being handled properly. Since the default device adapter doesn't
exist, and nothing is templated over it we can now remove DeviceAdapterError.
2019-04-18 15:09:57 -04:00
Robert Maynard
2c026508b3 Merge topic 'correct_openmp_timeouts'
9c2920072 UnitTestBoundingIntervalHierarchy handles systems under load better
671c1df5c Timer logs the proper device name when called with an invalid device
d3d66a331 GameOfLife example always uses the proper device adapter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1645
2019-04-18 08:05:12 -04:00
Robert Maynard
671c1df5c9 Timer logs the proper device name when called with an invalid device 2019-04-17 16:01:15 -04:00
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Robert Maynard
6c5c197a37 Merge topic 'support_cuda_scheduling_parameters_via_runtime'
047b64651 VTK-m now provides better scheduling parameters controls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1643
2019-04-17 10:04:19 -04:00
Robert Maynard
047b646517 VTK-m now provides better scheduling parameters controls
VTK-m now offers a more GPU aware set of defaults for kernel scheduling.
When VTK-m first launches a kernel we do system introspection and determine
what GPU's are on the machine and than match this information to a preset
table of values. The implementation is designed in a way that allows for
VTK-m to offer both specific presets for a given GPU ( V100 ) or for
an entire generation of cards ( Pascal ).

Currently VTK-m offers preset tables for the following GPU's:
- Tesla V100
- Tesla P100

If the hardware doesn't match a specific GPU card we than try to find the
nearest know hardware generation and use those defaults. Currently we offer
defaults for
- Older than Pascal Hardware
- Pascal Hardware
- Volta+ Hardware

Some users have workloads that don't align with the defaults provided by
VTK-m. When that is the cause, it is possible to override the defaults
by binding a custom function to `vtkm::cont::cuda::InitScheduleParameters`.
As shown below:

```cpp
  ScheduleParameters CustomScheduleValues(char const* name,
                                          int major,
                                          int minor,
                                          int multiProcessorCount,
                                          int maxThreadsPerMultiProcessor,
                                          int maxThreadsPerBlock)
  {

    ScheduleParameters params  {
        64 * multiProcessorCount,  //1d blocks
        64,                        //1d threads per block
        64 * multiProcessorCount,  //2d blocks
        { 8, 8, 1 },               //2d threads per block
        64 * multiProcessorCount,  //3d blocks
        { 4, 4, 4 } };             //3d threads per block
    return params;
  }
  vtkm::cont::cuda::InitScheduleParameters(&CustomScheduleValues);
```
2019-04-17 08:32:16 -04:00
Robert Maynard
ff30684c8e Removes the default device macros from VTK-m
Fixes #116
2019-04-15 08:15:36 -04:00
Robert Maynard
a5dbe1ece3 Merge topic 'bitfields'
661fb64de AtomicInterfaceControl functions are marked with VTKM_SUPPRESS_EXEC_WARNINGS
0c70f9b9a Add BitFieldIn/Out/InOut worklet signature tags.
a66510e81 Add ArrayHandleBitField, a boolean-valued AH backed by a BitField.
56cc5c3d3 Add support for BitFields.
d01b97382 Allow VTKM_SUPPRESS_EXEC_WARNINGS to be used inside macros.
2f2ca9370 Add bit operations FindFirstSetBit and CountSetBits to Math.h.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1629
2019-04-11 12:32:03 -04:00
Robert Maynard
0e847f2cb8 Merge topic 'remove_cellset_need_of_default_device'
46843ff4e CellSetExplicit has no dependency on default vtk-m device

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1636
2019-04-11 10:40:10 -04:00
Robert Maynard
661fb64de8 AtomicInterfaceControl functions are marked with VTKM_SUPPRESS_EXEC_WARNINGS 2019-04-11 10:01:32 -04:00
Allison Vacanti
0c70f9b9ac Add BitFieldIn/Out/InOut worklet signature tags.
These provide an appropriate BitPortal for use in worklets.
2019-04-11 08:27:17 -04:00
Allison Vacanti
a66510e819 Add ArrayHandleBitField, a boolean-valued AH backed by a BitField. 2019-04-11 08:27:17 -04:00
Allison Vacanti
56cc5c3d3a Add support for BitFields.
BitFields are:
- Stored in memory using a contiguous buffer of bits.
- Accessible via portals, a la ArrayHandle.
- Portals operate on individual bits or words.
- Operations may be atomic for safe use from concurrent kernels.

The new BitFieldToUnorderedSet device algorithm produces an ArrayHandle
containing the indices of all set bits, in no particular order.

The new AtomicInterface classes provide an abstraction into bitwise
atomic operations across control and execution environments and are used
to implement the BitPortals.
2019-04-11 08:27:17 -04:00
Robert Maynard
9cf1dc1883 Merge topic 'cuda_reduce_handle_pair_output'
89ec4aae2 Reduction on CUDA handles different input and output types better

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1638
2019-04-10 19:17:23 -04:00
Robert Maynard
89ec4aae2f Reduction on CUDA handles different input and output types better
When reducing an input type that differs from the output type
you need to write a custom binary operator that also implements
how to do the unary transformation.
2019-04-10 14:44:44 -04:00
Robert Maynard
46843ff4ee CellSetExplicit has no dependency on default vtk-m device
The default vtk-m device is an outdated concept and this is the
first step of removing it from VTK-m.
2019-04-10 14:28:30 -04:00
Sujin Philip
b391acf4c0 Remove SimplePolymorphicContainer
The last place remaining where it is being used is DynamicCellSet, which can
instead use `vtkm::cont::CellSet` as it itself is polymorphic.
2019-04-10 14:00:39 -04:00
Robert Maynard
ece078b82f Merge topic 'clang_warnings'
0130088b8 Suppress more self-assign-overloaded warnings found by clang
fa5455854 UnitTestArrayPortalValueReference doesn't warn when compiled with appleclang
5cc0d03f6 Merge branch 'upstream-diy' into clang_warnings
dbd3781d5 diy 2019-04-09 (f7a68da4)
5c2f2ebce suppress warnings found by Wself-assign-overloaded
77426f044 Correct casting long to long long warning from clang.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1635
2019-04-09 15:54:57 -04:00
Robert Maynard
77426f0447 Correct casting long to long long warning from clang. 2019-04-09 11:42:45 -04:00
Sujin Philip
e7b26f5c88 Merge topic 'bugfixes-ArrayHandleVirtual'
dae779b9f ArrayHandleVirtual bugfixes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1632
2019-04-09 08:36:12 -04:00
Sujin Philip
2bbf501c53 Fix a bug in MakeTestDataset
In Make3DExplicitDataSetZoo, only 25 cells are added, but the variable `nCells`
is set to 27.
2019-04-08 16:41:56 -04:00
Sujin Philip
dae779b9f8 ArrayHandleVirtual bugfixes
After the change to `ArrayHandleVirtual` where it became a subclass of
`vtkm::cont::ArrayHandle`, a few extra changes are required.

1. Functions with `ArrayHandleVirtual` as parameters will not be callable
with the superclass `ArrayHandle`. This is fixed by changing the argument
types to the superclass.
2. Add Serialization classes specializations for the superclass, as "is-a"
relation is not considered for class template parameters.
2019-04-08 15:42:53 -04:00
Robert Maynard
107edaff75 Merge topic 'move_device_adapter_tag_to_vtkm_cont'
1d20ae4f7 Move DeviceAdapterTag to vtkm/cont

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1624
2019-04-05 08:03:53 -04:00
Robert Maynard
30aedf287f Refactor the design of CellLocator::PrepareForExecution
The try execute functor now doesn't need to be a member of the
class. This helps with the separation of concerns.
2019-04-04 13:17:49 -04:00
Robert Maynard
1d20ae4f7b Move DeviceAdapterTag to vtkm/cont 2019-04-04 11:58:51 -04:00
Robert Maynard
6306ca66ce Merge topic 'refactor_cast_and_call_location'
72cb6343b Move vtkm::cont::CastAndCall into a header in vtkm/cont

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1622
2019-04-04 10:05:22 -04:00
Robert Maynard
96cb87c50a Merge topic 'make_cellset_api_consistent'
18f3b0dcc Document all the free functions for VariantArrayHandle
5180d6a73 DynamicCellSet has the same free function support as VariantArrayHandle
8f545662d CellSet uses NewInstance to be consistent with the rest of VTK-m

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1620
2019-04-04 09:36:05 -04:00
Robert Maynard
7f612502ac Merge topic 'remove_unneeded_cont_exec_markup'
f1056affa Move select functions to host only to remove host/device suppressions
4f2156dfa Thrust detail::aligned_reinterpret_cast doesn't warn now
f4840618c Make sure ThrustPatches is included before thrust.
b2bbd66e6 Merge branch 'upstream-taotuple' into update_taoo
4ec6fc812 taotuple 2019-04-03 (8e70fa8a)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1607
2019-04-04 09:32:04 -04:00
Robert Maynard
18f3b0dccc Document all the free functions for VariantArrayHandle 2019-04-03 18:10:31 -04:00
Robert Maynard
5180d6a733 DynamicCellSet has the same free function support as VariantArrayHandle 2019-04-03 18:10:31 -04:00
Robert Maynard
8f545662d7 CellSet uses NewInstance to be consistent with the rest of VTK-m 2019-04-03 18:10:31 -04:00
Robert Maynard
813484d9b1 Merge topic 'remove_arrayhandlevirtual_cast_and_call'
3dd4d292f Remove unneeded code from ArrayHandleVirtual

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1623
2019-04-03 16:08:20 -04:00
Sujin Philip
e408537608 Merge topic 'update-CellLocatorTwoLevelUniformGrid'
566e220ea Suppress dashboard warnings
f20d7e788 Document the changes that are part of this MR.
f78e763be Add CellLocatorGeneral
c6bead838 Rename CellLocatorTwoLevelUniformGrid to CellLocatorUniformBins
ee838b829 Stylistic changes to CellLocators to match VTK-m

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1615
2019-04-03 15:56:27 -04:00
Robert Maynard
3dd4d292f5 Remove unneeded code from ArrayHandleVirtual
The CastAndCall for ArrayHandleVirtual was always a bad idea.
The ArrayHandleVirtual is not considered a dynamic type by the
dispatch engine so it would never have tried to use this specialization.
2019-04-03 14:50:04 -04:00
Robert Maynard
72cb6343b8 Move vtkm::cont::CastAndCall into a header in vtkm/cont
Since CastAndCall is meant to be a user callable function,
we should make sure it is part of the vtkm cont headers
2019-04-03 14:15:26 -04:00
Sujin Philip
f78e763be4 Add CellLocatorGeneral
A general purpose `CellLocator` that should work with any type of dataset.
Internally, it tries to chose one of the existing cell locators that would be
optimal for the input data.

Also removes `CellLocatorHelper`.
2019-04-03 10:22:05 -04:00
Sujin Philip
c6bead8388 Rename CellLocatorTwoLevelUniformGrid to CellLocatorUniformBins
Also make it a concrete sub-class of vtkm::cont::CellLocator
Fixes issue #251
2019-04-03 10:21:56 -04:00
Robert Maynard
f4840618cf Make sure ThrustPatches is included before thrust. 2019-04-03 08:51:05 -04:00
Robert Maynard
aef087fc00 Merge topic 'remove_runtime_device_tracker_from_try_execute'
2d477fd53 Remove ability to pass a runtime device tracker to TryExecute

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1616
2019-04-02 14:43:16 -04:00
Kenneth Moreland
04254dbd25 Merge topic 'specialize-worklet-for-device'
4e34feecb Add ability to specialize worklet for device

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1608
2019-04-02 12:08:01 -04:00
Sujin Philip
ee838b8296 Stylistic changes to CellLocators to match VTK-m 2019-04-02 11:21:12 -04:00
Robert Maynard
2d477fd531 Remove ability to pass a runtime device tracker to TryExecute
Since runtime device trackers are single instance per thread
the ability to pass them around to other functions is unneeded.
2019-04-02 10:44:30 -04:00
Robert Maynard
f350517de2 Merge topic 'less_vtkm_cont_files_bring_in_cuda_device'
18ff6681f Less vtkm_cont cxx files bring in the cuda device

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1612
2019-04-01 12:02:55 -04:00
Kenneth Moreland
4e34feecb4 Add ability to specialize worklet for device
This adds an ExecutionSignature tag named Device that passes the
DeviceAdapterTag as an argument to the worklet's operator(). This allows
worklets to specialize their code based on the device.
2019-04-01 10:01:54 -06:00
Robert Maynard
e787d52afc Merge branch 'optionparser-to-third-party' into 'master'
Wrap third party optionparser.h in vtkm/cont/internal/OptionParser.h

See merge request vtk/vtk-m!1593
2019-04-01 10:56:01 -04:00