Commit Graph

9 Commits

Author SHA1 Message Date
Robert Maynard
9eb288419e vtkm::filter now deduces the subset of valid field types.
Previously the ApplyPolicy logic was to use the filters
field set, and ignore the policy field set.

But this caused problems, as a filter couldn't express that
it was able to work on all valid types. This caused
certain complex types Vec of Vec's to fail to work properly,
and would cause compile use code paths that would never
be valid for a given policy.
2016-12-30 08:30:44 -05:00
Kenneth Moreland
bb32e40804 Allow all policies to inherit defaults
Previously, all declared policies had to implement every tag required by
the policy, even if it was the same as the default. In addition to being
annoying, this makes us less forward compatible because if we add a new
item to the policy any unchanged policy would become incorrect.

This change moves the default policy declarations from the default
policy to PolicyBase. The default policy inherits all of them without
any change. Other policies need only override those that are different
than the default.
2016-11-23 14:00:49 -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
Kenneth Moreland
adfb0bba55 Fix ApplyPolicy for CoordinateSystem objects
There was a mismatch in the ApplyPolicy function for CoordinateSystem
objects. The return type declared for the function was not the same as
the type of object actually returned.

Also added a test that actually uses a filter with a CoordinateSystem as
a field to actually test this functionality.
2016-10-23 11:51:09 -04:00
Robert Maynard
5e200528ee Allow filters to have finer control on what cell sets they support
Certain algorithms like VertexClustering only work on certain cellset types.
It is pointless to generate the code paths for structured data cell sets,
when the algorithm can't operate on those dataset types.
2016-05-26 11:32:35 -04:00
Robert Maynard
c0bd0a67d4 Add missing new lines and #endif comments to vtkm::filter 2016-04-07 17:09:11 -04:00
Robert Maynard
2d3d157ecd Properly use the policy to determine the coordiante policy conversions. 2016-03-29 10:12:49 -04:00
Robert Maynard
f699c98602 Renamed the ``Convert` method to `ApplyPolicy``
The original name was a really bad name, so thank to Ken for suggesting
a better name.
2016-03-14 08:39:17 -04:00
Robert Maynard
bcee827097 First draft of vtkm::filter design. 2016-03-14 08:39:17 -04:00