Commit Graph

280 Commits

Author SHA1 Message Date
Robert Maynard
ab59e34a2f Rename pragma header guard so it makes sense for tbb and thrust.
Boost is not the only thirdparty that we are supressing warnings for, so
make the name more generic.
2015-08-13 09:04:23 -04:00
Robert Maynard
8204db2f6a Use VTKM_BOOST_PRE_INCLUDE around thrust headers too. 2015-08-13 08:26:41 -04:00
Kenneth Moreland
42aba97728 Add in-place (in-out) arrays to worklets.
Previously, all arrays passed to worklets were designated as either
input or output. No in-place operation was permitted. This change adds
the FieldInOut tag for ControlSignature in both WorkletMapField and
WorkletMapTopology that allows you to read and write from the same
array.
2015-08-12 14:41:56 -06:00
Kenneth Moreland
1862970a0b Reintroduce explicit connectivity class for cont environment
(Re-) Add a helper structure that holds the connectivity information for
a particular topology connection (e.g. from points to cells) to make it
easier to manage connections in multiple different directions in
CellSetExplicit.

Unlike the previous version of connectivity, this structure is
considered "internal" and not exposed through the API so that
CellSetExplicit can better manage the data. Also, many of the helper
methods remain in CellSetExplicit since they were specific for point-to-

Also, CellSetExplicit has a mechanism to take an arbitrary pair of
TopologyElementTags and get the appropriate connectivity. This should
simplify adding connections in the future.
2015-08-11 12:42:34 -06:00
Kenneth Moreland
63b45ad1e5 Consistently use from/to for topological links
In the CellSet and related classes, a connection was referred to by a
"from" topology element and a "to" topology element. However, in the
worklet control signature tags the elements were referred to by "src"
and "dest." To make things consistent, use "from" and "to" everywhere.
2015-08-03 10:48:50 -06:00
Kenneth Moreland
01757ea136 Change Node -> Point
Most of VTK-m follows the convention of calling the 0D topology elements
"points" (which follows the convention of VTK). However, there were
several places where they were referred to as "nodes." Make things
consistent by calling them points everywhere.

Also merged some redundant ExecutionSignature tags.
2015-08-03 10:06:59 -06:00
Kenneth Moreland
7212469d04 Roll connectivity information into CellSet in control environment
Previously there was a Connectivity* structure for both the control
environment and the execution environment. This was necessary before
because the connectivity is explicit to the from and to topology
elements, so you would get this structure from the appropriate call to
CellSet*. However, the symantics are changed so that the type of
connectivity is selected in the worklet's dispatcher. Thus, it is now
much cleaner to manage the CellSet structure in the CellSet class itself
and just have a single set of Connectivity* classes in the execution
environment.
2015-08-02 15:59:44 -06:00
Kenneth Moreland
b392dc509e Move RegularStructure to ConnectivityStructuredInternals
Also moved from vtkm namespace to vtkm::internal namespace. This change
is to then move the structured connectivity classes to the cont and exec
namespaces.
2015-07-31 15:48:06 -06:00
Kenneth Moreland
926f04e1d4 Move ExplicitConnectivity to ConnectivityExplicit
This is more consistent with VTK-m's naming convention.

Also made some minor changes and corrections.
2015-07-31 14:18:13 -06:00
Kenneth Moreland
04fce28ae3 Deal with small integer promotions
C and C++ has a funny feature where operations on small integers (char
and short) actually promote the result to a 32 bit integer. Most often
in our code the result is pushed back to the same type, and picky compilers
can then give a warning about an implicit type conversion (that we
inevitably don't care about). Here are a lot of changes to suppress
the warnings.
2015-07-30 17:41:58 -06:00
Kenneth Moreland
21b3b318ba Always disable conversion warnings when including boost header files
On one of my compile platforms, GCC was giving conversion warnings from
any boost include that was not wrapped in pragmas to disable conversion
warnings. To make things easier and more robust, I created a pair of
macros, VTKM_BOOST_PRE_INCLUDE and VTKM_BOOST_POST_INCLUDE, that should
be wrapped around any #include of a boost header file.
2015-07-30 17:40:40 -06:00
Robert Maynard
bb582ae4ec Update the cuda IteratorFromArrayPortal to use ptrdiff_t.
This make the advance / distance_to function signatures constant no matter
if we are building with 32/64 bit ids.
2015-07-29 09:57:42 -04:00
Robert Maynard
98d6e99275 Correct some warnings about 64bit to 32bit conversion. 2015-07-23 09:29:10 -04:00
Robert Maynard
e74ded809a Defer more thrust iterator deduction logic to ArrayPortalToIterators. 2015-07-14 10:11:12 -04:00
Robert Maynard
4ba1f7c853 Remove the need for any portal to define an IteratorType. 2015-07-13 17:16:27 -04:00
Kenneth Moreland
4fc3626712 Fix compiler directives for icc
The Intel icc compiler tries to pretend it is gcc, but it sometimes
behaves differently. Add more explicit checks for what compiler is
being used.
2015-07-06 10:35:06 -06: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
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
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
2d7e44de62 Make it so that we actually use cuda texture memory loads.
By mistake the cuda texture memory load code was not being used, so correct
that issue and allow loading of vtkm::Vec and primitive types. Currently
the only issue is loading int8/int16 uint8/uint16 through texture memory.
2015-06-25 08:21:49 -04:00
Robert Maynard
9ef7fa9b3a Merge branch 'iterator_operator_square_bracket_corrected' into 'master'
Make sure we use ptrdiff_t for index into arrays.

This is a requirement since you can use negative indices into arrays.

See merge request !41
2015-06-16 13:09:17 -04:00
Robert Maynard
726c914ee5 Make sure we use ptrdiff_t for index into arrays.
This is a requirement since you can use negative indices into arrays.
2015-06-16 11:00:01 -04:00
Robert Maynard
eb6c698e63 Remove un-needed overloads from WrappedOperators for cuda. 2015-06-16 09:48:12 -04:00
Robert Maynard
2c91cdfa3b Update cuda/thrust backend scan algorithms to work with vec types. 2015-06-16 08:28:31 -04:00
Robert Maynard
2a2159b1e1 Generalize the support for zip handles inside the cuda backend.
Instead of having a single specialization for sort and zip handles,
we know handle any fancy handles being passed to the cuda device adapter.
This was done by reworking how we represent fancy iterators inside thrust,
and instead of using a transform iterator + counting iterator we just use
a iterator_facade.
2015-06-12 11:56:46 -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
ecec6945bf ExplicitConnectivity can now use different storage backends.
ExplicitConnectivity 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.
2015-06-01 09:42:10 -04:00
Robert Maynard
9eb84295fa correct a bad file being in the cmakelists. 2015-05-29 15:53:20 -04:00
Robert Maynard
25722fec2e Merge 'origin/datamodel-design' into datamodel-design
Conflicts:
	vtkm/cont/ExplicitConnectivity.h
	vtkm/cont/Field.h
2015-05-29 13:54:10 -04:00
Dave Pugmire
089864d6f3 minor fixes and code cleanup for merge to trunk.
added vtkm_cont_export to ExplicitConnectivity classes.
2015-05-29 12:48:31 -04:00
Robert Maynard
7552509e4b Include all the new DataSet header in CMakeLists.
This will make sure that we properly install these headers.
2015-05-29 12:07:46 -04:00
Robert Maynard
07970cf476 Correct all signed / unsigned and narrowing warnings ( 64bit to 32bit ). 2015-05-28 09:05:17 -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
ed66fde8ae adding missing file 2015-05-19 15:24:36 -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
Jeremy Meredith
9768070aed fixing problems with cuda build. 2015-05-14 15:59:37 -04:00
Robert Maynard
4086119f0e Correct propagation of const types where they don't make sense. 2015-05-13 13:25:55 -04:00
Robert Maynard
c56b9602f5 Add some whitespace to make the class easier to read. 2015-05-12 16:00:40 -04:00
Robert Maynard
bcda989641 Correct issues with using function level statics.
You can use function level statics, but instead you must use class level
statics, this is due to how nvcc treats method statics as being shared
across all threads in a warp.
2015-05-12 15:58:53 -04:00
Jeremy Meredith
9c4bd54424 getting exec version of connectivity working 2015-05-12 12:50:30 -04:00
Dave Pugmire
959bd0a9a8 add explicit connectivity code for exec side. 2015-05-12 12:13:43 -04:00
Jeremy Meredith
9ff5832909 adding wrapper for exec connectivity. 2015-05-12 09:39:00 -04:00
Jeremy Meredith
b2fdff2873 Merge branch 'master' into datamodel-design 2015-05-11 15:14:08 -04:00
Robert Maynard
078d623173 Allow ArrayPortalFromThrust to be used inside a zip portal. 2015-05-05 14:03:40 -04:00
Robert Maynard
1348aa0ec1 Don't try to include vtkm/exec/cuda unless cuda is enabled. 2015-05-05 07:59:44 -04:00
Kenneth Moreland
ec0adf8b16 Change interface of ArrayTransfer to be more like ArrayHandle.
This includes changing methods like LoadDataForInput to PrepareForInput.
It also changed the interface a bit to save a reference to the storage
object. (Maybe it would be better to save a pointer?) These changes also
extend up to the ArrayManagerExecution class, so it can effect device
adapter implementations.
2015-04-30 21:07:36 -06:00
Dave Pugmire
8d99a7f0d1 Merge branch 'master' into datamodel-design 2015-03-25 09:59:55 -04:00
Robert Maynard
63b1f03187 Simplify the implementation of loading through textures.
We don't need this super complicated system for texture loading.
2015-03-09 16:37:45 -04:00
Robert Maynard
9b49973621 Use __ldg instead of texture object. 2015-03-05 18:31:44 -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
c741d3cccf allowing variable number of values to return for ID set. 2015-02-09 13:42:01 -05:00
Jeremy Meredith
2caf35602b fixing bug with node values in map cell. 2015-02-05 14:08:37 -05:00
Jeremy Meredith
475c4bb5ee renaming some node references to topology and removing unused files. 2015-02-05 13:45:08 -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
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
Kenneth Moreland
ef093d5c07 The DoWorkletInvokeFunctor methods were missing VTKM_EXEC_EXPORT. 2015-01-15 22:47:28 -07:00
Robert Maynard
1b5c5a6ce5 Add in initial support for texture binding of input arrays. 2014-12-19 13:47:28 -05:00
Robert Maynard
d9270e408d Adding a cuda device adapter to vtkm.
Porting the dax device adapter over to vtkm. Unlike the dax version, doesn't
use the thrust::device_vector, but instead uses thrust::system calls so that
we can support multiple thrust based backends.

Also this has Texture Memory support for input array handles. Some more work
will need to be done to ArrayHandle so that everything works when using an
ArrayHandle inplace with texture memory bindings.
2014-12-19 13:47:28 -05:00
Kenneth Moreland
343c12b500 Fix ICC warnings.
ICC can be pretty thorough about finding unused elements. In this case
it was picking up an unused method in instances of a templated class
in an anonymous namespace. It was a method that should be there due to
the nature of the class, but it happened to not be used (which was OK,
too). To get around the problem, I just added some use of that method
in another method.
2014-10-23 10:59:18 -06: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
40efb51342 Fix MSVC warnings
MSVC is picky about type conversions. To get it to shut up, explicitly
cast the worklet return value to the fetch value in the
WorkletInvokeFunctor. The good is that it will help with needing
explicit conversions on these return values. But that is also bad in
that it might make some unexpected conversions possible.
2014-10-23 07:12:01 -06:00
Kenneth Moreland
9ac538b6b9 MSVC fixes
One fix is a simple (pointless) compiler warning about precision. The
other fix is an error in one of the test codes that did not clear out
the message string in an error message buffer like it was supposed to.
2014-10-22 10:52:35 -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
Kenneth Moreland
79399c210e Add Fetch class
The Fetch class is responsible for moving data in and out of some
collection in the execution environment. The Fetch class is templated
with a pair of tags (the type of fetch and the aspect) that control the
mechanism used for the fetch.
2014-10-15 13:52:27 -06:00
Kenneth Moreland
30558cf7ed Add Transport class
The Transport class is responsible for moving data from the control
environment to the execution environment. (Actually, it might be more
accurate to say it gets the execution environment associated with a
given control object.) The Transport class is templated with a tag that
controls the mechanism used for the transport.
2014-10-14 10:44:48 -06:00
Kenneth Moreland
b012668345 Add a FunctorBase class for scheduling non-worklets
Whenever creating a functor to be launched in the execution environment
using the device adapter Schedule algorithm, you had to also create a
couple of methods to handle error message buffers. For convenience, lots
of code started to just inherit from WorkletBase. Although this worked,
it was a misnomer (and might cause problems in the future if worklets
later require different things from its base). To get around this
problem, add a FunctorBase class that is intended to be used as the
superclass to functors called with Schedule.
2014-06-10 11:35:13 -06:00
Kenneth Moreland
3ed7093945 Add test for ErrorMessageBuffer 2014-06-10 11:21:55 -06:00
Kenneth Moreland
b692cb3d89 Add CMake configuration for execution environment code 2014-06-10 11:14:11 -06:00
Robert Maynard
c80fb9259f Update the initial repository to use the correct indentation style. 2014-02-11 16:20:30 -05:00
Robert Maynard
c2101b8ffc Add in a serial device adapter and required supporting classes.
We now can verify that the array handle is usable by a device adapter.
2014-02-11 12:34:56 -05:00