The previous algorithm terminates based on if all pixels are in a root star. It turns out to be in
sufficient and thus terminates much earlier than it is required.
Did a bit of renaming of the support classes used for
WorkletPointNeighborhood. First, the OnBoundary tag is changed to
Boundary to match other tags and reflect some changes in the resulting
methods. Also moved the BoundaryState and Neighborhood classes from
vtkm::exec::arg to vtkm::exec to be more accessible. Finally, the
Neighborhood class name was changed to FieldNeighborhood to be more
specific on what role this class plays with neighborhood.
Previously, WorkletPointNeighborhood had a template argument to select
the size of the neighborhood. This change removes that template
argument. Instead, the vtkm::exec::arg::BoundaryState methods now take
in a size parameter when determining when it overlaps the boundary.
If in the future we want to add the ability to select the neighborhood
size at compile-time (for performance reasons), I suggest adding this
template argument to the OnBoundary tag for ExecutionSignature.
To get the average, we (of course) divide the sum by the amount of
values, which is returned from valuesIn.GetNumberOfComponents(). To do
this, we need to cast the number of components (returned as a
vtkm::IdComponent) to a FieldType. This is a little more complex than it
first seems because FieldType might be a Vec type. If you just try a
static_cast<FieldType>(), it will use the constructor to FieldType which
might be a Vec constructor expecting the type of the component. This in
turn could cause a warning because the vtkm::IdComponent is implicitly
converted to the Vec's component type.
Get around this problem by first casting to the component type of the
field and then constructing a field value from that.
VTK-m has been updated to replace old per device worklet testing executables with a device
dependent shared library so that it's able to accept a device adapter
at runtime.
Meanwhile, it updates the testing infrastructure APIs. vtkm::cont::testing::Run
function would call ForceDevice when needed and if users need the device
adapter info at runtime, RunOnDevice function would pass the adapter into the functor.
Optional Parser is bumped from 1.3 to 1.7.
The field infrastructure has a "trait" that specifies the valid types
for the default active scalar field. Most filters have at most one input
field. The majority of the remaining filters use the same types for
inputs. There are some examples, however, where some auxiliary fields
use different types. This change adds a second template parameter to
FieldTraits to customize the valid types of the input scalar field to
different fields.
These changes are in anticipation of the removal of list specifier tags
on worklet ControlSignature arguments.
9403bac1f VTK-m device side math functions need to use the vtkm:: wrappers
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1436
Previously, UnitTestProbe used a struct templated on the device adapter,
and that necessitated the use of the template keyword when using an
ambiguous type. These recent changes remove that template argument and
thus can cause a warning about using the template keyword in a non-
ambiguous type.
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.
a423cf056 TestBuild header paths are shorter to make windows happy.
e49e21aea Cleanup more of contourtree_augmented to make windows builders happy
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1424
The CUDA compiler is giving us grief while compiling
UnitTestParticleAdvection.cxx even though the code is correct. Disable
it for now until we figure out what can be done with the compiler.
By making these helper classes ExecObject, they no longer need to have a
device to be constructed. This is important for future plans to make the
filters not determine a device adapter now that dispatchers no longer
require a device adapter.
This will make it easier to support integrators as an ExecObject.
One side effect is that the integrators and partical advection
are not templated by the type of the field.
Regardless of the type of the field, there is probably little reason to
compute particle advection with less than 64 bit floats to account for
accumulated errors. This will make it easier to use these classes.
It's a filter that Split sharp manifold edges where the feature angle
between the adjacent surfaces are larger than the threshold value.
When an edge is split, it would add a new point to the coordinates
and update the connectivity of an adjacent surface.
Ex. there are two adjacent triangles(0,1,2) and (2,1,3). Edge (1,2) needs
to be split. Two new points 4(duplication of point 1) an 5(duplication of point 2)
would be added and the later triangle's connectivity would be changed
to (5,4,3).
By default, all old point's fields would be copied to the new point.
Use with caution.
For some unknown reason, on windows these header tests were producing
the following errors:
fatal error C1041: cannot open program database
There might be a better way around this, but the easiest way is to
simply remove those test builds.
c05b04c9d Fix windows warnings of duplicate symbols
12b90c434 Rename PPP2 to Augmented.
6f5c383e1 Move PPP2 over to constexpr instead of defines
f828ebfd4 Update PPP2 to dispatcher that don't require a device adapter template
98fd16d9a Correct PPP2 warnings found from 32bit builders
b460f5611 Make sure ContourTreeApp obeys the desired device
432ee3422 Optimize the PPP2 ActiveGraphs to reduce size of device transfers
2370a6cc5 Refactor the PPP2 work based on Code Review and add UnitTests.
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1376
7e3727fa9 Convert some vtkm/cont classes over to vtkm::worklet::Invoker
eae0eb9b7 Add an easier way to launch vtkm worklets
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1398
Rather than force all dispatchers to be templated on a device adapter,
instead use a TryExecute internally within the invoke to select a device
adapter.
Because this removes the need to declare a device when invoking a
worklet, this commit also removes the need to declare a device in
several other areas of the code.
By facilitating brigand library, we can throw a meaningful compile time
error if the placeholder in execution signature exceeds the bound in
control signature.
96ae94420 Simplified execution object creation for atomic array
0bd197af9 moved TwoLevelUniformGridExecutionObject to vtkm/exec/internal
6ce895be8 simplified how atomic arrays create execution objects
f1ee5b92a fix a rebase error
25d140361 fix bad rabse for wireframer
f892695f1 fixing so wierd merging issue
9bb00ec66 moved the execution object for TwoLevelUniform grid to vrkm::exec
db1c9bfee Change the namespacing of atomic array
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1243
The oscillator is a simple analytical source of time-varying data.
It provides a function value at each point that is computed as a
sum of Gaussian kernels -- each with a specified position, amplitude,
frequency, and phase.
This commit adds a worklet as well as a filter that modify point coordinates by moving points
along point normals by the scalar amount times the scalar factor.
It's a simpified version of the vtkWarpScalar class in VTK. Additionally the filter doesn't
modify the point coordinates, but creates a new point coordinates that have been warped.
This commit adds a worklet as well as a filter that modify point coordinates by moving points
along a vector by a certain scalar amount.
It's a simpified version of the vtkWarpVector in VTK.
It doesn't modify the point coordinates, but creates a new point coordinates that have been warped.
The original design of invoke and the transport infrastructure
relied on the implementation behavior of vtkm::cont types
such as ArrayHandle that used an internal shared_ptr to managed
state. This allowed passing by value instead of passing by
non-const ref when needing to transfer information to the device.
As VTK-m adds support for classes that use virtuals the ability
to pass by base pointer type allows for us to invoke worklets
using a base type without the risk of type slicing.
Additional by moving over to a non-const ref Invocation we
can update all transports that have 'output' to now be
by ref and therefore support types that can't be copied while
being 'more' correct.
80b12e325 Merge branch 'coordSysFilter' of https://gitlab.kitware.com/dpugmire/vtk-m into coordSysFilter
ab5eeab18 Fixes for making the filters non-templated.
27dade145 Fixes for coordinate systems w/ help from Sujin.
db5ded3a6 Add files for coord sys transform filters.
17087a26a Filter for coordinate system transform.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1284
- Reducing the stack allocation for CUDA for the BIH unit test
- Adding changes from Ken's review
- Suppress ptxas stack size warning for BoundingIntervalHierarchy
Found via `codespell` and `grep`
more typos
includes source typo change and a typo that needs further review
follow-up typos
Follow-up typos
Revert a commit
-Changing the existing CellLocator.h to CellLocatorHelper.h,
it's used by CellLocatorTwoLevelUniformGrid.h
-Changing unit tests and worklets that use CellLocator.h to use CellLocatorHelper.h
This warning is emitted when constructing a tuple that contains
an object with `__host__`-only constructors.
warning #2885-D: calling a __host__ function(...) from a __host__ __device__ function(...) is not allowed
This commit adds a worklet and a filter to compute
signed integral measures of cells.
It also begins the practic of adding a markdown
changelog entry in `doc/changelog`. See the
changelog entry for details.
- Use tao::tuple instead of FunctionInterface to hold array/portal
collections.
- Type signatures are simplified. Now just use:
- ArrayHandleCompositeVector<ArrayT1, ArrayT2, ...>
- make_ArrayHandleCompositeVector(array1, array2, ...)
instead of relying on helper structs to determine types.
- No longer support component selection from an input array. All
input arrays must have the same ValueType (See ArrayHandleSwizzle
and ArrayHandleExtractComponent as the replacements for these
usecases.
- Missed a ',' to seperate template argument in GridEvaluator
- Adding initialization of params to Integrators for RK4
- Fixing ExecutionBaseObject changes for Particles
Adding Utkarsh's changes from 86bd81de to Rectilinear grid as well
- To make rectilinear grids work with any storage type
Adding Rob's changes from 7d6fe568 to the RK4Integrator
- Previously the RK4Integrator could compute velocity with uninitialized inputs.
Adding Rob's changes from a6bf830f to ParticleAdvection
- Previous ParticleAdvection would dispatch some of the worklets on the default device adapter
and not the explicitly requested device adapter
Adding Ken's change from 0753131a
- For supporting all the previous merge conflicts with the new ExecutionObjectBase change.
While making changes to how execution objects work, we had agreed to
name the base object ExecutionObjectBase instead of its original name of
ExecutionObjectFactoryBase. Somehow that change did not make it through.
Numerous worklets of ContourTreeUniform generate optimizations that
presume no vtkm::Id overflow. This assumption is correct, and the
related warning about this optimization can be safely ignored.
21b80a5d UnitTestImageConnectivity now uses size_t to index to std::vector
44382300 Make sure all tests use the .cxx extension.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Utkarsh Ayachit <utkarsh.ayachit@kitware.com>
Merge-request: !1190
Some worklets Run() method accidentally used the default device adapter
which should be avoided. Instead they should use a passed in device
adapter so that we support multiple device adapters in the same
binary/executable.
abstracted out execution objects for both tetrahedralize and triangulate and removed the device template requirement from the execution object factory for both classes
cleaned up a logic error texture2d and cleaned how the constructor for execution object was being called. Also, went and cleaned up how the execution object was being created for particle to align it with the same method for creating the execution object.
abstracted out particles into an execution object and a factory that populates said execution object based on its state. removed the facotries dependance on a device adaptor.
In order to make the change from the current way execution obejcts are utilized to the new proposed executionObjectFactory process type checks now has to look for the new execution object factory class to check against.
f025c218 Suppress conversion warning inside Cell Interpolate code
822d4c61 Marching Cubes test doesn't abuse fall through case statements
dac7ab98 Correct a bad memcpy in ColorTable that gcc 7 found
c6726644 Reformat some test code to stop gcc 7.3 from segfaulting.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Utkarsh Ayachit <utkarsh.ayachit@kitware.com>
Merge-request: !1175
This allows for easier host side logic when determining grid and block
sizes, and allows for a smaller library side by moving some logic
into compiled in functions.
It takes CellSetStructured<2> and DynamicArrayHandle and uses CastAndCall
to resolve data type for pixels. Moved implementation to the RunImpl
function object.
ImageConnectivity worklet implements a parallel connected component
labeling algorithm for 2D structured grids/images. For each pixel,
it search for the pixel's 6 neighbors and classify them as the
same connected component if their corresponding "color" field have
the same value.
Previously, when a Worklet needed a scatter, the scatter object was
stored in the Worklet object. That was problematic because that means
the Scatter, which is a control object, was shoved into the execution
environment.
To prevent that, move the Scatter into the Dispatcher object. The
worklet still declares a ScatterType alias, but no longer has a
GetScatter method. Instead, the Dispatcher now takes a Scatter object in
its constructor. If using the default scatter (ScatterIdentity), the
default constructor is used. If using another type of Scatter that
requires data to set up its state, then the caller of the worklet needs
to provide that to the dispatcher. For convenience, worklets are
encouraged to have a MakeScatter method to help construct a proper
scatter object.
Fixing template errors in integrators.
The code used to build locally, but fail on Kitware test machines.
Fixing templates as they were before any temporal advection changes.
- PushOutOfDomain would loop over without exiting indefinately utilizing all max steps.
It's supposed to execute only once the particle goes out of spatio-temporal boundary.
- Removing the check for the steamlines polyline points to be same as the maxSteps from
the unit test, as if the particle has already taken some steps, then the polyline
points written out will always be lower than the total number of steps taken by the
current node.
- Adding code to support taking short steps (minimize boundary errors)
- Adding time of advection to the particle from the Integrator
- API changes for TakeStep
- TakeStep should only care about the maximum steps as it's a field on a Particle
- The check for out of temporal and spatial bounds has been moved to the Worklet
- Changing some of the internal APIs for supporting these new features/fixes
- Changing inheritance in the Integrators class to be more obvious than something convoluted
This warning is emitted when the compiler performs an optimization, and wants
you to verify that the presumptions it is making are valid. For this case
we can correctly promise the compiler that the values will not overflow and
the optimizations are correct.
Bug Fixes in the UniformGridEvaluator
Added Temporal Grid Evaluator for Uniform Grid
Updated Integrator to add temporal integration
Changing the TakeStep method in Particles to only deal with max steps
ideally, particles should be unaware of spatio-temporal constrains
Updating the ParticleAdvectionWorklet file to handle out of spatio-temporal
issues.
Missing: Code to take small steps (AT_SPATIAL_BOUNDARY and AT_TEMPORAL_BOUNDARY).
Updated FieldHistogram worklet to support executing the worklet using a
precomputed range. This will be needed for distributed and multiblock
use-cases.
The new and improved vtkm::cont::ColorTable provides a more feature complete
color table implementation that is modeled after
vtkDiscretizableColorTransferFunction. This class therefore supports different
color spaces ( rgb, lab, hsv, diverging ) and supports execution across all
device adapters.
Due to recent changes to remove static arrays that are not supported on
some devices, the function to return all the local point indices on a
face was removed. That left no way to get the structure of cell faces
short of pulling an internal data structure.
This change resurrects a function to get point indices for a face. The
interface for this method has necessarily changed, so I also changed the
corresponding function for getting edge indices.
In some of the tests there was a field that was using a counting array.
This uses an integer as the value type and has a special implicit
storage type. Currently, this is likely to cause problems whenever it
runs into a cast and call of a dynamic array. For now, let's avoid
these.
In the near future we should have expanded virtual method capabilities
that will make it possible to support these atypical arrays.
86bd81de streamline: handle different storage types for fields.
de4e840e enhance filter API
c255c0eb add `vtkm::cont::ConditionalCastAndCall`
54c2d234 Make it easier to iterator over blocks.
d1a59aad Fixes for CrossProduct and DotProduct.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1100
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.
These changes now allow VTK-m to compile on CUDA 7.5 by using const arrays,
when compiling with CUDA 8+ support we upgrade to static const arrays, and
lastly when CUDA is disabled we fully elevate to static constexpr.
bdb9c37e update based on issues pointed out by Robert
a713a0d8 Generalize and documentation for DeviceAdapterAlgorithm::Transform
29232c49 Revert un-intended change to examples
7ef956a9 Merge branch 'master' into connected_component
a9ed1ecf add CMakeLists.txt for header files
ba3cba64 update copyright statements
aa96874e Merge branch 'connected_component' of gitlab.kitware.com:ollielo/vtk-m into connected_component
2f07119e Merge branch 'master' into connected_component
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1044
The ScalarsToColors is the first step in reproducing the color
capability that exists in VTK. The next step after this is to
provide a comparable lookup table.
a9e64c4b FloatPointReturnType is float if 'T' is < 32bytes instead of being double.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Acked-by: Thomas Otahal <tjotaha@sandia.gov>
Merge-request: !1048
In trying to give error diagnostics with template definitions of invalid
types, the user encounters some pretty confusing error messages at
first. There is no way to get the compiler to give exactly the
diagnostics we want in a nice readable error message, so we are putting
some verbose instructions as comments in the code. However, a user might
not know to look at the source code since the error happens deep in an
unfamiliar (and complicated) class. Thus, add (yet another) error at the
front that gives a (hopefully) clear indication to look at the source
code for help in understanding the errors.
When one of the parameters to DispatcherBase::Invoke is incorrect, you
get an error in a strange place. It is deep in a call stack using some
heavily templated types rather than where the Invoke is actually called.
Formerly, the code was structured to give a very obfuscated error
message. Try to make this easier on users by first adding helpful hints
in the code around where the error is to explain why the error occured
and helpful advice on how to track down the problem. Second, reconfigure
the static_assert so that the compiler gives a readable error message.
Third, add some auxiliary error messages that provide additional
information about the types and classes involved in the error.
Previously FloatPointReturnType would always be double for types that
are not float, which caused Int8/Int16 types to promote to double instead
of float.