Commit Graph

22 Commits

Author SHA1 Message Date
Kenneth Moreland
bddad9b386 Remove TryExecute from filters
Now that the dispatcher does its own TryExecute, filters do not need to
do that. This change requires all worklets called by filters to be able
to execute without knowing the device a priori.
2018-10-16 15:59:53 -06:00
Haocheng LIU
5c797169ec Use the strong typed enums for vtkm::cont::Field
Since Field association is used either when creating or working
with 'vtkm::cont::Field', it's put in the class itself.
2018-05-22 11:44:51 -04:00
Utkarsh Ayachit
3da8b5be66 Remove vtkm::filter::Result
This commit removes `vtkm::filter::Result`. All methods that used
`vtkm::filter::Result` simply change to use `vtkm::cont::Dataset` instead.
The utility API on `Result` that was used to add fields to the resulting
dataset is now available via `vtkm::filter::internal::CreateResult`.
2018-04-03 16:55:03 -04:00
Utkarsh Ayachit
eda68a6fec Make MapFieldOntoOutput private API.
MapFieldOntoOutput is no longer public API. Since `vtkm::cont::Filter`
invokes it when appropriate, we no longer need to keep it public.

Also removes the overload of MapFieldOntoOutput that doesn't take
policy. That is no longer needed since vtkm::cont::Filter always can
provide the current policy being used.
2018-04-02 09:30:58 -04:00
Utkarsh Ayachit
de4e840eae enhance filter API
Filters now support executing on a dataset to produce a result dataset
with automatic mapping of fields to the output dataset. Fields to map
can be selected using `vtkm::filter::FieldSelection` class, which provides
constructors to map all or no fields, along with a selection of fields.

This updates all tests to use the new filter API.
2018-03-07 13:42:23 -05:00
Robert Maynard
182f4707e7 vtkm prefers 'using' over typedef. 2018-02-23 10:47:20 -05:00
Robert Maynard
203205a171 TryExecute RuntimeDeviceTracker can't be a const ref anymore.
Previously we allowed a const ref as we would make a copy, this only works
as it relies on  RuntimeDeviceTracker implementing state through a shared_ptr.
Instead if we require modifiable types only we can make TryExecute more
efficient and clearer on what it does.
2017-11-10 10:02:45 -05:00
Kenneth Moreland
c3a3184d51 Update copyright for Sandia
Sandia National Laboratories recently changed management from the
Sandia Corporation to the National Technology & Engineering Solutions
of Sandia, LLC (NTESS). The copyright statements need to be updated
accordingly.
2017-09-20 15:33:44 -06:00
dongliangchu
a0cdad52e5 reviewed version 1 2017-08-30 10:30:29 -04:00
dongliangchu
424b37ec97 reviewed version 1 2017-08-18 16:28:33 -04:00
Allison Vacanti
565896cc49 Combine ResultField + ResultDataSet into Result. 2017-08-11 08:25:42 -04:00
Robert Maynard
5dd346007b Respect VTK-m convention of parameters all or nothing on a line
clang-format BinPack settings have been disabled to make sure that the
VTK-m style guideline is obeyed.
2017-05-26 13:53:28 -04:00
Kitware Robot
4ade5f5770 clang-format: apply to the entire tree 2017-05-25 07:51:37 -04:00
Kenneth Moreland
3e77f4e18b Merge topic 'refactor-runtime-device-tracker'
18c4190d Update classes using RuntimeDeviceTracker
200928ef Add a global RuntimeDeviceTracker
a3573117 Compile RuntimeDeviceTracker.cxx with CUDA when appropriate
814b2db1 Add the implementation of RuntimeDeviceTracker to cont library
b9d3206e Move RuntimeDeviceTracker to vtkm::cont

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !707
2017-02-24 10:50:19 -05:00
Kenneth Moreland
18c4190d85 Update classes using RuntimeDeviceTracker
They now grab the global runtime device tracker. In some cases, I've
added the ability to set/get the tracker to change it from the global.
In others I just removed the local copy, since it was just hooked into
the global tracker.
2017-02-23 09:54:41 -07:00
David C. Lonie
ab9e1f6e9d Ignore filter traits when mapping fields to output.
The input type restrictions in FilterTraits should not be used to
restrict the arrays that can be mapped to the output dataset.
2017-02-22 14:30:56 -05:00
David C. Lonie
f601e38ba8 Simplify exception hierarchy.
Remove the ErrorControl class such that all subclasses now inherit from
error. Renamed all exception classes via s/ErrorControl/Error/.

See issue #57.
2017-02-07 15:42:38 -05:00
Kenneth Moreland
eb26b88cec Change DefaultPolicy to PolicyDefault
This is more in line with the VTK-m coding standards.
2016-11-23 14:05:16 -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
08a33675f6 Prefer vtkm::cont::CastAndCall function over the member method. 2016-08-05 15:29:39 -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
e8d3eda84d Rename filter base classes to follow VTK-m naming convention
The base classes for all the filters are named with 'Filter' at the end.
Generally the convention in VTK-m is to place the most general
descriptor (in this case Filter) first, which makes it easier to find
items in ordered lists.

This commit resolves issue #59.
2016-05-05 12:43:28 -06:00