Commit Graph

950 Commits

Author SHA1 Message Date
Chun-Ming Chen
a6a29158da Member variables should start with an uppercase letter 2015-07-08 10:00:48 -04:00
Chun-Ming Chen
9504a61411 update testing for the new modification 2015-07-02 17:06:56 -04:00
Chun-Ming Chen
14d1610a0b Sort triangle point ids so that the same triangle will have the same signature 2015-07-02 12:58:26 -04:00
Chun-Ming Chen
f0a98855f4 Hashing id3 to Int64 for sorting 2015-07-01 00:24:45 -04:00
Chun-Ming Chen
b9f8544d4e Remove copy() before sort() 2015-06-30 15:29:37 -04:00
Chun-Ming Chen
0c69960799 Move the definition of an arrayhandle out of worklet 2015-06-30 12:54:58 -04:00
Chun-Ming Chen
63e4ae5acc use vtkm::Id as the ArrayHandle size input type 2015-06-30 12:48:56 -04:00
Chun-Ming Chen
03ef13eaaf release resources during process 2015-06-30 12:39:24 -04:00
Kenneth Moreland
e19e0ea551 Merge branch 'mesh-simplify-changes' into 'master'
Some fixes to VertexClustering

VertexClustering previously only worked with data of a specific floating
point type (32 bit for point coordinates). Add some templates to accept
either 32 bit or 64 bit floating points for point coordintes and be a
bit more careful about implicit type conversions.

I also made some changes to conform better with the VTK-m coding
standards. The most common changes are using 2 space indentation for all
block levels, capitolizing and using camel case for all class members,
and prefixing "this->" to all use of internal class members.

See merge request !64
2015-06-29 18:14:19 -04:00
Kenneth Moreland
ba99e830ae Make sure VertexClustering grid dimensions do not exceed nDimensions
When mixing precision, it is possible for the computation to pick a grid
size greater than the requested number of dimensions. This change
ensures that you never get more dimensions than requested. (Thanks to
Chun-Ming Chen for the fix.)

The test now behaves the same way as it did before the last change.
2015-06-29 16:10:25 -06:00
Kenneth Moreland
cc8a5d35ec Some fixes to VertexClustering
VertexClustering previously only worked with data of a specific floating
point type (32 bit for point coordinates). Add some templates to accept
either 32 bit or 64 bit floating points for point coordintes and be a
bit more careful about implicit type conversions.

I also made some changes to conform better with the VTK-m coding
standards. The most common changes are using 2 space indentation for all
block levels, capitolizing and using camel case for all class members,
and prefixing "this->" to all use of internal class members.
2015-06-29 15:14:50 -06:00
Robert Maynard
99df565f85 Merge branch 'vtkm_exec_array_in' into 'master'
Implement a way to pass a portal to worklet as a parameter.

This is built ontop of the ExecutionObjectBase work, and is designed to show
other developers how they can create custom objects that are shared among
all worklets, but are passed as parameters to the worklet.

See merge request !60
2015-06-29 15:06:41 -04:00
Robert Maynard
40a2ce0645 Merge branch 'MeshSimplifyWorklets' into 'master'
Mesh simplify worklets

Vertex clustering algorithm and a AverageByKey computation are now in vtkm::worklets

See merge request !57
2015-06-29 09:49:19 -04:00
Robert Maynard
d7e85bb6ae Implement a way to pass a portal to worklet as a parameter.
This is built ontop of the ExecutionObjectBase work, and is designed to show
other developers how they can create custom objects that are shared among
all worklets, but are passed as parameters to the worklet.
2015-06-26 16:26:51 -04:00
Robert Maynard
5fa6afed2e Cleanup the worklet UnitTests. Mainly move everything into namespaces. 2015-06-26 15:52:59 -04:00
Chun-Ming Chen
00382a3b8b fix warning: && with || 2015-06-25 15:33:25 -04:00
Jimmy
0fd5556cae Move DataSet related codes in VertexClustering to UnitTestVertexClustering 2015-06-25 13:16:16 -04:00
Jimmy
05b550b574 change double to vtkm::Float64 2015-06-25 11:46:28 -04:00
Jimmy
7d1e3f8b1d set the invlid_id to -1, so the Id3Less will have to take care of this. 2015-06-25 11:43:29 -04:00
Jimmy
e234f29148 remove vc_debug 2015-06-25 10:52:02 -04:00
Jimmy
314c1b9da2 remove if 0 blocks in averageByKey 2015-06-25 10:38:34 -04:00
Jimmy
a5a4fb36ad remove internal namespace to expose AverageByKey 2015-06-25 10:37:11 -04:00
Jimmy
03823d96a1 Fix VertexClustering and missing iteratortype in ArrayHandleImplicit.h for CUDA 2015-06-24 16:35:11 -04:00
Jimmy
73564d7a2c Fix VortexClustering for thrust backend (partially) 2015-06-24 15:52:56 -04:00
Jimmy
3c25024781 hide debug / benchmark outputs 2015-06-24 15:13:16 -04:00
Jimmy
4220b37135 Finish testing codes for VertexClustering 2015-06-24 14:55:22 -04:00
Chun-Ming Chen
470c93fe69 move VertexClustering codes to /vtkm/cont/worklet 2015-06-24 14:55:22 -04:00
Chun-Ming Chen
71974e4cd3 Add vtkm/worklet/testing/UnitTestVertexClustering.cxx 2015-06-24 14:55:22 -04:00
Chun-Ming Chen
ebd6e43409 Added VertexClustering test 2015-06-24 14:55:22 -04:00
Chun-Ming Chen
4f813ca4c5 Prepare for vertex clustering algorithm 2015-06-24 14:55:21 -04:00
Robert Maynard
36c2740072 Teach DispatcherMapTopology how to do 2d and 3d scheduling.
The requirements for 2d/3d scheduling are that the input domain must be a
regularly structured grid.
2015-06-22 16:05:32 -04:00
Robert Maynard
4175ff2915 Allow dispatching based on a vtkm::Id2.
This is being added so that it is easy to schedule 2d grids easily, without
them having to pass in a 3d range.
2015-06-22 09:07:27 -04:00
Sujin Philip
5241cab738 Add PointElevation Worklet 2015-06-09 11:28:55 -04:00
Robert Maynard
44deb3c870 Allow creation of vtkm::cont::Field without any data.
This is needed to allow Field's to be used as output.
2015-06-08 16:14:49 -04:00
Robert Maynard
eb572169a5 Make sure each worklet test uses a different namespace.
Otherwise NVCC compiler has issues are we are breaking ODR, since it smashes
all these files into a single compilation unit.
2015-06-08 09:02:23 -04:00
Sujin Philip
0127e4d9d7 Add cell average worklet 2015-06-05 12:48:29 -04:00
Robert Maynard
73d27435f1 Merge branch 'dynamic_handles_to_worklet_warnings' 2015-06-04 13:49:28 -04:00
Robert Maynard
60e8166290 Add a simple example on how to handle multiple params to a worklet.
Mainly showing how to constrain the type for all parameters to be the
same, and to throw an error otherwise.
2015-06-04 13:12:52 -04:00
Robert Maynard
ae9914e9c8 Add full support for dynamic array handles to Topology test worklets.
Currently the topology test worklets only worked for Float32, and produced
warnings when generating the Float64 code paths, this solves this problem.
2015-06-04 13:11:49 -04:00
Robert Maynard
342a9989a5 Correct double to float conversion warnings. 2015-06-04 09:06:47 -04:00
Robert Maynard
0a433303e6 Correct headers to have the new copyright. 2015-06-03 15:06:43 -04:00
Robert Maynard
7f2ee8d050 Merge branch 'master' into datamodel-design 2015-06-03 14:36:53 -04:00
Robert Maynard
f88992e2f7 cuda can't handle invoking worklets from anonymous namespaces. 2015-06-01 17:20:02 -04:00
Sujin Philip
08f88b1cb9 Add TBB backend. 2015-06-01 13:57:37 -04:00
Robert Maynard
81450f2317 CellSetExplicit can now use different storage backends.
CellSetExplicit can now use different storage backends to allow
for cheaper representations of the data. For example a pool of triangles
can now implicit handles for shape and num indices.

This does raise the question if runtime polymorphism is the best approach
for CellSet, or if we should do some from of CRTP.
2015-06-01 09:55:53 -04:00
Robert Maynard
895a0dff6c Correct testing results for UnitTestWorkletMapTopologyExplicit.
Looking at the cell fields in MakeTestDataSet, I have computed the corrected
average values that we should expect.
2015-05-29 09:07:24 -04:00
Robert Maynard
41a22b7bfb mark variables in Topology tests as vtkmNotUsed. 2015-05-28 16:53:53 -04:00
Robert Maynard
b1dfa20d45 All test vtkm::cont::DataSets are now made on the stack.
No need to heap allocate vtkm::cont::DataSet now.
2015-05-28 15:35:19 -04:00
Robert Maynard
a7bfc99579 DataSet now holds all CellSets by shared pointer.
This clarifies the ownership semantics of the CellSets.
2015-05-28 15:30:13 -04:00
Brent Lessley
0a72789304 Resolved all implicit conversions between unsigned int and vtkm::Id. 2015-05-26 09:34:43 -04:00
Robert Maynard
6b8e7822be The Copyright statement now has all the periods in the correct location. 2015-05-21 10:30:11 -04:00
Jeremy Meredith
8a7f0add99 removing some debug code. 2015-05-20 12:56:16 -04:00
Jeremy Meredith
019e30a263 allow requesting fields by name, and make test data set names more sensible. 2015-05-20 11:46:04 -04:00
Dave Pugmire
21d31e6548 verify results 2015-05-20 10:21:04 -04:00
Jeremy Meredith
4e36d05fac moderately substantial cleanup to fields. 2015-05-19 16:49:17 -04:00
Jeremy Meredith
a7eabbc73c wrapping returned sets of values from topology map within a new class. 2015-05-19 15:16:13 -04:00
Dave Pugmire
3e681d96f0 Merge branch 'datamodel-design' of public.kitware.com:vtkm into datamodel-design 2015-05-19 14:35:29 -04:00
Jeremy Meredith
39b1b9cc18 adding convenience methods and cleaning up explicit connectivity. 2015-05-19 14:30:41 -04:00
Dave Pugmire
65e4fa32b9 Merge branch 'datamodel-design' of public.kitware.com:vtkm into datamodel-design 2015-05-19 14:11:58 -04:00
Dave Pugmire
885ba3e36b Re-organize worklet tests, add an other test. Check for right answers. 2015-05-19 14:11:26 -04:00
Jeremy Meredith
bd4bfb175a Merge branch 'datamodel-design' of public.kitware.com:vtkm into datamodel-design 2015-05-19 13:11:17 -04:00
Jeremy Meredith
4e67adca8c moving explicit data set creation to make test data set file. 2015-05-19 13:10:56 -04:00
Dave Pugmire
a8ff5af670 check for cell set. 2015-05-19 11:17:04 -04:00
Dave Pugmire
3a4966fef3 check assert for cell set. 2015-05-18 17:12:34 -04:00
Dave Pugmire
4dd186eda6 add worklet test for regular 2015-05-18 17:08:15 -04:00
Kenneth Moreland
0011e9d809 Check that appropriate exception thrown in UnitTestDispatcherBase. 2015-05-18 07:38:52 -06:00
Kenneth Moreland
4276b0cdcb Fix warning about uninitialized object
It is not important for this test, but we might as well make the
compiler happy.
2015-05-17 18:32:07 -06:00
Jeremy Meredith
6816ec4293 updating reg struct usage in cell set 2015-05-15 13:15:11 -04:00
Jeremy Meredith
9768070aed fixing problems with cuda build. 2015-05-14 15:59:37 -04:00
Kenneth Moreland
c83b585b14 Fix ExecObject tag in WorkletBase
The ExecObject tag for the ControlSignature was not declared right so
would cause a compile error if it was ever used. Clearly this was not
being tested properly, so the dispatcher base unit test now passes an
ExecObject parameter.
2015-05-13 18:44:44 -06:00
Robert Maynard
269ac3a8af Add in the MapTopologyExplicit worklet test.
Currently only works on serial backend.
2015-05-12 15:42:48 -04:00
Jeremy Meredith
b2fdff2873 Merge branch 'master' into datamodel-design 2015-05-11 15:14:08 -04:00
Kenneth Moreland
dad18e1170 Improve 3D scheduling mechanism in DispatcherBase
Previously, DispatcherBase had an ivar to determine whether to use the
numInstances passed on the stack or to use a 3D range held in a
different ivar. This change allows either a 1D range or 3D range to be
passed on the stack, which I expect to be closer to how we we handle
this when 3D ranges are fully supported.

This also fixes a bug introduced with commit
fdac208acbfa47b613d899a36cefc32a01e8f0a8 where the Use3DSchedule ivar
was not set correctly in UnitTestDispatcherBase.
2015-05-05 08:46:23 -06:00
Jeremy Meredith
75971e9abb fixing comments and removing old worklet. 2015-04-15 10:52:09 -04:00
Robert Maynard
fdac208acb use cuda scheduling versus thrust scheduling. 2015-04-03 10:18:05 -04:00
Jeremy Meredith
d807c1d865 map cell is now map topology -- the type of map depends on the passed-in topology. 2015-02-10 15:01:27 -05:00
Jeremy Meredith
f4975e7629 making all map cell related parameters use max cell size in control signature topology template arg. 2015-02-09 16:43:31 -05:00
Jeremy Meredith
5a40bb2657 fit margins. 2015-02-09 15:06:25 -05:00
Jeremy Meredith
27ef6f262f making node value input tuplelen be first argument so that there's no default value. 2015-02-09 15:02:16 -05:00
Jeremy Meredith
fb8639f1eb allow arbitrary length vecs for node value sets. 2015-02-09 14:28:57 -05:00
Jeremy Meredith
c3ff52353c adding ability to get nodal fields in cell map 2015-02-05 13:41:23 -05:00
Jeremy Meredith
20d9c60398 add direct fetch tag for topology which returns cell type. 2015-02-05 13:30:01 -05:00
Jeremy Meredith
67557a51bc making connectivity fully general (mixed element meshes) and more ways of getting at it in worklets. 2015-02-04 17:40:31 -05:00
Jeremy Meredith
6bd04efef2 changing mapcell input domain from input cell array to topology GetNumberOfCells. 2015-02-04 15:51:13 -05:00
Jeremy Meredith
2f83e08b7d changing exec output for topology to be Id3. 2015-02-04 15:48:15 -05:00
Jeremy Meredith
6214fa6629 adding execution output value type for node id set. 2015-02-04 15:24:50 -05:00
Jeremy Meredith
da73c67f4a first steps in getting real topology to worklet map cell. 2015-02-04 15:02:59 -05:00
Jeremy Meredith
455ef255da forcing connectivity to triangle-only (Id3) to get simple WorkletMapCell. 2015-02-04 11:47:15 -05:00
Jeremy Meredith
5a0a658d7d adding worklet map cell framework (so far, identical to field version). 2015-02-04 11:00:15 -05:00
Robert Maynard
9f60876a0a Move the MapField testing worklets to a worklet namespace.
NVCC is unable to handle finding the worklets when they are in an anonymous
namespace. It only looks at the the anonymous namespaces included by the
files that device code uses, and misses our anon namespace. Moving to a named
namespace solves these issues.
2015-01-19 14:25:54 -05:00
Kenneth Moreland
51b5cc63c4 Merge branch 'no-function-interface-zip' into cuda_DeviceAdapterAlgorithm 2015-01-15 22:35:38 -07:00
Kenneth Moreland
37dac92052 Add index tags to FunctionInterface features.
The functors in the ForEach, StaticTransform, and DynamicTransform
methods sometimes can use the index of the parameter that they are
operating on. This can be a helpful diagnostic in compile and run-time
errors. It is also helpful when linking parameters from one
FunctionInterface with those of another.

This new features are now replacing implementations using the Zip
functionality that was removed earlier. The implementation is actually
simplified a bit.
2015-01-15 22:13:47 -07:00
Robert Maynard
3e8ac22fe6 Allow worklet tests to be built for the cuda device adapter. 2014-12-19 13:47:28 -05:00
Kenneth Moreland
4ab4dc9cf2 Use test_equal instead of == for comparing numbers in exec worklets.
A couple of tests were failing with the Intel compiler due to
imprecision in comparing floating point values.

Also snuck in some minor documentation fixes in a comment for
FunctionInterface.
2014-11-12 08:53:03 -07:00
Kenneth Moreland
51e3b2bb1d Add checks for signature tags
It's easy to put accidently put something that is not a valid tag in a
ControlSignature or ExecutionSignature. Previously, when you did that
you got a weird error at the end of a very long template instantiation
chain that made it difficult to find the offending worklet.

This adds some type checks when the dispatcher is instantated to check
the signatures. It doesn't point directly to the signature or its
parameter, but it is much closer.
2014-10-23 08:28:50 -06:00
Kenneth Moreland
6b1db2cf04 Check value type in Invoke input arrays.
Instead of just checking that a dispatcher's Invoke input is an
ArrayHandle, also check that the ValueType of the ArrayHandle is
compatible with the types of the worklet operator. This is done by
adding a template argument to the ControlSignature tags that is a type
list tag that gets passed to the type check.
2014-10-22 16:51:42 -06:00
Kenneth Moreland
421746d041 Add basic support for type checking of Invoke arguments 2014-10-22 15:21:18 -06:00
Kenneth Moreland
80809a8f0f Add DispatcherMapField.
This is a simple version of a dispatcher, but an important one.

Note that there is an issue brought up with UnitTestWorkletMapField in
that there needs to be better ways to specify worklet argument types.
2014-10-21 13:10:00 -06:00
Kenneth Moreland
53a454fe77 Add basic dispatcher functionality.
These changes support the implementation of DispatcherBase. This class
provides the basic functionality for calling an Invoke method in the
control environment, transferring data to the execution environment,
scheduling threads in the execution environment, pulling data for each
calling of the worklet method, and actually calling the worklet.
2014-10-21 11:49:23 -06:00
Kenneth Moreland
01d6619774 Add basic worklet superclasses and signature tags 2014-10-15 15:47:39 -06:00