Commit Graph

28 Commits

Author SHA1 Message Date
Kenneth Moreland
b1f288aaea Add non-templated base class to Keys class.
The only reason Keys has a template is so that it can hold a UniqueKeys
array and provide the key for each group. If that is not needed and you
want to implement a library function that takes a keys object, you can
now grab the Keys superclass KeysBase. KeysBase is not templated, so you
can pass it to a standard method in a library.
2020-05-21 08:34:07 -06:00
Vicente Adolfo Bolea Sanchez
4797426e1f silenced doxygen unsupported c++ syntax
Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2020-03-23 19:55:46 -04:00
Kenneth Moreland
76ce9c87f0 Support using Token calling PrepareForExecution in ExecutionObject
The old version of ExecutionObject (that only takes a device) is still
supported, but you will get a deprecated warning if that is what is
defined.

Supporing this also included sending vtkm::cont::Token through the
vtkm::cont::arg::Transport mechanism, which was a change that propogated
through a lot of code.
2020-02-25 07:41:39 -07:00
Robert Maynard
36161b42c7 Renamed to SchedulingRange to follow VTK-m naming convention 2020-01-29 10:39:41 -05:00
Robert Maynard
40c0c0fefd Allow for easier overloads of scheduling_range
This is needed to support custom types that need 3D scheduling
or to call custom methods to get the 1D scheduling size
2020-01-28 11:17:42 -05:00
Robert Maynard
4ff021b086 Improve VTK-m compilation times by compiling more keys<T> types
We have split the compilation of the different `vtkm::worklet:Keys`
types over multiple implementation units to improve parallel build
performance.
2019-09-13 16:17:11 -04:00
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Robert Maynard
8114e9e627 VTK-m now doesn't use reserved C++ identifiers
Fixes #340
2019-02-28 15:08:08 -05:00
Kenneth Moreland
fb0ad1a13d Reduce the number of precompiled Keys instantiations
Previously, we precompiled just about any version of Keys that you could
be expected to use. This caused the time to compile Keys to be
unnecessarily long.

This reduces the compilation to types that are actually likely to be
used as keys. Also removed the less likely to be used build methods.
2019-01-28 15:44:37 -05:00
Kenneth Moreland
55570a16ad Add most common implementations of Keys templates to library
Also moved the Keys<>::SortType outside to KeysSortType. The problem
with having it inside the Keys class was that there was a different
object created for every instances of Keys.
2019-01-24 13:18:10 -07:00
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
Allison Vacanti
bd337854ec Initial implementation of general logging.
Addresses #291.
2018-10-02 11:37:55 -04:00
Robert Maynard
7c54125b66 Switch over from static const to static constexpr where possible. 2018-03-10 11:39:58 -05:00
Robert Maynard
93bc0198fe Suppress false positive warnings about calling host device functions. 2018-01-02 10:40:49 -05:00
Allison Vacanti
fd311f5716 Update worklet::Keys to stable sort keys and not modify input.
This ensures that the order of the values presented to the
WorkletReduceByKey functor is consistent.

After this change, the key array used to build the worklet::Keys object
is no longer modified. The sorted keys can be obtained by using permuting
the input keys with Keys::GetSortedValuesMap().
2017-09-28 13:02:33 -04: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
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
d68b211346 Remove TransportTagReducedValuesIn
Now that the transport takes the input range as one of its arguments,
this functionality can be implemented by the more general
TransportTagArrayIn.
2017-03-24 15:32:27 -06:00
Kenneth Moreland
dc192b793d Add input range to arguments of transport
Previously the arguments to the operator of a vtkm::cont::arg::Transport
were the control object, the input domain object, and the output range.
If you wanted to, for example, check the size of an input array to make
sure it matched the input range, you would have to know the meaning of
the input domain object to query its range. This made it hard to create
generic transports, like TransportTagArrayIn, that accept data from
multiple different input domains but need to know the input range.
2017-03-24 15:14:18 -06:00
Kenneth Moreland
dcbbb72784 Merge branch 'master' into external-face-more-generic
Update exception methods to new names.
2017-02-08 17:10:17 -07: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
0703139a3d Make Keys class do in-place sort
Previously, the Keys class constructor took an array of keys, made a
copy of it, and sorted the copy. This was to protect the caller in case
it needed the original keys array again. However, this copy takes a
significant chunk of time and it is probably rare in practice to ever
need the original keys array again. So instead just do an in-place sort.
2017-01-26 13:35:53 -07:00
Kenneth Moreland
058439851e Remove static assert from templated function
There was a static assert in a templated function that was never
supposed to be used. Some compilers were fine as long as there was no
use of the templated function, but others errored out anyway. Change the
implementation to use the =delete keyword instead.

This won't have as nice of an error message, but you would have to jump
through some hoops to get to this point anyway. If this still does not
work, we could just probably remove the invalid templated function. The
compiler error would get even more obfuscated, but again I don't expect
anyone to actually run into it.
2017-01-17 15:53:15 -07:00
Kenneth Moreland
72b85559c2 Add ReducedValues[In][Out] tags to WorkletReduceByKey 2017-01-17 15:53:13 -07:00
Kenneth Moreland
add10f56cf Add Value[In][Out] tags for WorkletReduceByKey
This lets you give arrays of values paired with the keys that will be
grouped into (hopefully) small Vecs.
2017-01-17 15:53:08 -07:00
Kenneth Moreland
58eb8f168d Add WorkletReduceByKey and dispatcher
And the basic type for a reduce by key worklet and its associated
adapter. Right now the worklet only supports passing in keys. Values
come next.
2017-01-17 15:53:06 -07:00
Kenneth Moreland
cd64b69a55 Add Keys class
This class will manage the keys during a reduce-by-key worklet
execution.
2017-01-17 15:53:04 -07:00