Commit Graph

743 Commits

Author SHA1 Message Date
Robert Maynard
8204db2f6a Use VTKM_BOOST_PRE_INCLUDE around thrust headers too. 2015-08-13 08:26:41 -04:00
Kenneth Moreland
472dadef00 Merge branch 'in-out-fields' into 'master'
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.

See merge request !124
2015-08-12 18:27:35 -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
Robert Maynard
9fa56cd42f Merge branch 'disable_pragma_diagnostic_on_pgi' into 'master'
Disable #pragma diagnostic on pgi compiler as it doesn't support it.

See merge request !126
2015-08-12 16:21:55 -04:00
Robert Maynard
99589816df Disable #pragma diagnostic on pgi compiler as it doesn't support it. 2015-08-12 15:15:03 -04:00
Kenneth Moreland
8a0f5186f7 Merge branch 'is-sorted-ambiguous' into 'master'
The use of is_sorted in Benchmarker.h was ambiguous

Benchmarker provides its own implementation of is_sorted since this
method was not introduced until C++11 and not all compilers necessarily
support it. However, for those that did, the system is_sorted conflicted
with the provided is_sorted. To get around the problem, specify the full
namespace of the is_sorted being used (which is standard practice in
VTK-m anyway).

See merge request !122
2015-08-12 13:51:23 -04:00
Kenneth Moreland
c637bf94b1 The use of is_sorted in Benchmarker.h was ambiguous
Benchmarker provides its own implementation of is_sorted since this
method was not introduced until C++11 and not all compilers necessarily
support it. However, for those that did, the system is_sorted conflicted
with the provided is_sorted. To get around the problem, specify the full
namespace of the is_sorted being used (which is standard practice in
VTK-m anyway).
2015-08-12 09:16:54 -06:00
Kenneth Moreland
c5c1dee4fc Merge branch 'clean-up-cell-set' into 'master'
Clean up CellSet

Underneath the CellSet implementation is a set of supporting classes that manage the actual structure in both the control and execution environments. However, the implementation of these classes was a bit confusing and inconsistent. The following changes are made:

* Most significantly, there is no longer any Connectivity classes in the control environment. This functionality has been wrapped up into the CellSet classes, which is more consistent and easier to understand. (There was a definite distinction between CellSet and Connectivity, but it was subtle and difficult to understand.) This also means that edits to CellSets happen to CellSets directly.

* The set of classes for structured and explicit cell sets match. There is different functionality within, but the class naming and meaning are consistent.

* Make the class names more consistent with the rest of VTK-m class names. Specifically classes like ExplicitConnectivity become ConnectivityExplicit. Also, the words regular and structured were being used interchangeably. Now, always use structured except when dealing specifically with grids of regular spacing.

* The connectivity classes were using the nomenclature "From" and "To" to specify topological elements of links. The same concept in worklet classes were using the nomenclature "Src" and "Dest."  For consistency, all references are changed to "From" and "To".

* Unlike explicit cell sets, structured cell sets have functionality shared between control and execution environments. Rather than duplicate it or create unique exposed classes, have a shared internal implementation in vtkm::internal.

See merge request !117
2015-08-11 19:44:10 -04:00
Will Usher
28ad02eb75 Merge topic 'add-aligned-storage'
046cd2d2 Change StorageBasic to use an aligned allocator.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !119
2015-08-11 16:03:37 -04:00
Will Usher
046cd2d2b9 Change StorageBasic to use an aligned allocator.
The storage used will now be aligned to `VTKM_CACHE_LINE_SIZE bytes,
resulting in slightly better cache usage and load/store performance.
This define is set in `StorageBasic.h We also now detect if Posix is
available in Configure.h and will define VTKM_POSIX with _POSIX_VERSION
if it's available.

The AlignedAllocator used by StorageBasic is also STL compatible
and can be used in STL containers so user's can use it in their
std::vector and pass aligned user memory to the storage.
2015-08-11 13:42:55 -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
Robert Maynard
aeabacfc77 Merge branch 'teach_vtkm_to_workaround_pgi_float128_issues' into 'master'
Workaround the PGI compiler stating it is gcc when looking for float128.

See merge request !120
2015-08-10 14:32:21 -04:00
Robert Maynard
a2e718acb1 Workaround the PGI compiler stating it is gcc when looking for float128. 2015-08-10 12:33:46 -04:00
Robert Maynard
bae6ff7f55 Merge branch 'introduce_binary_and_unary_operators' into 'master'
Introduce binary and unary operators

See merge request !94
2015-08-06 15:14:28 -04:00
Robert Maynard
06f1345316 Suppress bad conversion warnings generated by gcc. 2015-08-06 14:06:43 -04:00
Will Usher
b88f03f990 Merge topic 'benchmarks-tweaks'
1ea6f732 Add our own version of is_sorted to check the assert
311b5dcc Remove C++11 feature is_sorted and increase time alloted to run bench

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !115
2015-08-05 13:13:33 -04:00
Robert Maynard
0b4cb9c2c6 Add UnitTest for BinaryOperators. 2015-08-04 16:55:53 -04:00
Robert Maynard
f96a02adcb Add UnitTest for BinaryPredicates. 2015-08-04 16:55:53 -04:00
Robert Maynard
7bf0e41844 Add UnitTest for UnaryPredicates. 2015-08-04 16:55:53 -04:00
Robert Maynard
8839e8a019 Add vtkm/BinaryOperators header.
Currently includes the following predicates:
  - Sum
  - Product
  - Maximum
  - Minimum
  - BitwiseAnd
  - BitwiseOr
  - BitwiseXor
2015-08-04 16:55:53 -04:00
Robert Maynard
f20b1ea99a Add vtkm/BinaryPredicates header.
Currently includes the following predicates:
  - Equal
  - NotEqual
  - SortLess
  - SortGreater
  - LogicalAnd
  - LogicalOr
2015-08-04 16:55:53 -04:00
Kenneth Moreland
8f4fec555b Merge branch 'tbb-is-fixed' into 'master'
Don't use patched version of TBB on newer versions.

We have a patched version of TBB's parallel_for.h in our files that
fixes a problem with using std::swap. This issue has since been fixed in
TBB, so for newer versions we should revert back to TBB's
implementation.

See merge request !118
2015-08-04 12:21:22 -04:00
Kenneth Moreland
923fac45dd Allow TBB back to version 4.0.
Robert Maynard tells me that the TBB backend has been tried on versions
of TBB back to 4.0. Since the patch appears to work across them, allow
those versions too.
2015-08-04 10:13:43 -06:00
Kenneth Moreland
ce8ecf9e8b Don't use patched version of TBB on newer versions.
We have a patched version of TBB's parallel_for.h in our files that
fixes a problem with using std::swap. This issue has since been fixed in
TBB, so for newer versions we should revert back to TBB's
implementation.
2015-08-04 09:14:24 -06:00
Will Usher
1ea6f73297 Add our own version of is_sorted to check the assert
Also caught a bug where I incorrectly assumed abs_deviations would be sorted
in MedianAbsDeviation
2015-08-03 10:56:59 -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
Will Usher
311b5dcc6b Remove C++11 feature is_sorted and increase time alloted to run bench 2015-07-31 16:33:04 -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
d6b8c8f510 Change TopologyType identifiers from enumeration to tags.
Previously, the items used to identify parts of topology like points,
cells, faces, etc. were in an enumeration. However, they are only really
used in template specialization, and it is easier to use tags in this
case. So, change the enumeration to a set of tag structures. Also made
the following changes:

* Renamed TopologyType to TopologyElement, which is more indicative of
what we are referring to.
* Moved the structures from the vtkm::cont namespace to the vtkm
namespace. There is no reason not to be able to use them from either the
control or execution environments.
* Added a VTKM_IS_TOPOLOGY_ELEMENT_TAG macro to do type checks on
template arguments that are supposed to be topology element tags.
2015-07-31 13:59:37 -06:00
Kenneth Moreland
91ce7b12c1 Merge branch 'sha-in-system-information' into 'master'
Add git SHA to information reported in SystemInformation test

See merge request !113
2015-07-31 14:28:54 -04:00
Kenneth Moreland
3410c877cb Add git SHA to information reported in SystemInformation test 2015-07-31 12:10:52 -06:00
Kenneth Moreland
7ece9b501b Merge branch 'gcc-warnings' into 'master'
GCC warnings

Attempt to fix any compiler warnings that appear on GCC dashboards.

I also was using a pretty picky compiler, so there is probably several fixes that have no impact on the current dashboard set.

See merge request !110
2015-07-31 14:05:30 -04:00
Kenneth Moreland
eee7dd9cc4 Ignore unused parameter warnings in boost headers
One of the dashboards gave yet another warning in the boost random
library. This time the warning is on unused parameters. Go ahead and add
that to the list of things to not check in boost.
2015-07-31 10:10:31 -06:00
Kenneth Moreland
77783dc8e3 Ignore shadow warnings in boost headers
The renar dashboard gave some warnings about shadowed variables in the
boost random library (version 1.57.0). This might be a bug in boost that
is already fixed (I didn't get the same warning on my gcc compile with
boost 1.58.0), but I don't see a problem with disabling the shadow
warning everywhere in boost.
2015-07-31 08:32:32 -06:00
Kenneth Moreland
a5d0fc7ad4 Remove an unnecessary friend declaration.
This is some old development code that was supposed to be deleted but
was not.
2015-07-30 17:42:53 -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
Sujin Philip
25162d0b6e Merge branch 'fix-field-constructors' into 'master'
Minor fixes to Field class

See merge request !109
2015-07-30 16:18:49 -04:00
Kenneth Moreland
5e5203d6be Merge branch 'dynamic-cell-set' into 'master'
DynamicCellSet

Add a ```DynamicCellSet``` class to use in place of raw pointers or boost ```smart_ptr```s to make managing the anonymous class and casting easier.

See merge request !103
2015-07-30 14:58:05 -04:00
Kenneth Moreland
4ccb9bc374 Use std::string() instead of "" to initialize strings.
As per Robert Maynard's request.
2015-07-30 12:55:24 -06:00
Robert Maynard
d3fd571ef2 Add vtkm/UnaryPredicates header.
Currently includes the following predicates:
  - IsDefaultConstructor
  - NotDefaultConstructor
  - LogicalNot
2015-07-30 13:12:59 -04:00
Robert Maynard
640d9ae6fb Merge topic 'include_contribution_docs'
2ff210f3 Add a contributing guide to vtk-m.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !107
2015-07-30 11:55:50 -04:00
Sujin Philip
b8e23e3736 Minor fixes to Field class 2015-07-30 11:16:07 -04:00
Kenneth Moreland
f25c45b10b Merge branch 'msvc-issues' into 'master'
MSVC issues

Fixes on fixes to MSVC warnings.

See merge request !108
2015-07-29 23:11:06 -04:00
Kenneth Moreland
57d64f4a20 Use ptrdiff_t instead of size_t with TBB iterators.
Math on random iterators needs signed numbers, otherwise signed/unsigned
warnings can occur.
2015-07-29 19:13:30 -06:00
Robert Maynard
2ff210f32a Add a contributing guide to vtk-m. 2015-07-29 17:33:30 -04:00
Robert Maynard
c93ff8691a Merge branch 'make_cuda_IteratorFromArrayPortal_use_default_difference_type' into 'master'
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.

See merge request !106
2015-07-29 16:20:23 -04:00