Commit Graph

730 Commits

Author SHA1 Message Date
Brent Lessley
965d2af99b Reverted previous changed to GetFaceVertex operator() function. Commented out the connectivity printing function call on line 210 of ExplicitConnectivity.h; this change is a temporary fix to remove a Thrust compilation error. A Cuda error still occurrs when ArrayHandle subclasses are passed into the device adapter functions. 2015-08-06 14:31:35 -07:00
Brent Lessley
9ae2957fee Changed the export macro of the GetFaceVertex operator() to support both execution and control environment function calls. 2015-08-06 14:31:35 -07:00
Brent Lessley
eac36c1fcf Revised the GetFaceVertex functor to accept and use an execution const portal, instead of a control environment const portal. This change is necessary for proper Cuda device adapter functionality. 2015-08-06 14:31:35 -07:00
Brent Lessley
77ec743219 Resolved all compilation errors and warnings. Replaced the nested for-loops of the face connectivity construction with an implicit array handle invocation. 2015-08-06 14:31:35 -07:00
Brent Lessley
49eb758532 Resolved all but one of the issues from merge request #78. Currently, there is a compilation error related to new code for sorting based on face vertices, instead of hash key values. 2015-08-06 14:31:35 -07:00
Brent Lessley
365a0a2382 A working implementation of the External Faces algorithm, along with a unit test to verify correctness on a simple dataset. 2015-08-06 14:31:35 -07: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
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
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
Robert Maynard
9e5f24b3b3 Merge branch 'msvc-issues' into 'master'
MSVC issues

Fix various issues encountered with the MSVC compiler.

See merge request !105
2015-07-29 15:32:38 -04: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
fcd07bbbd9 Merge branch 'make_cuda_version_check_faster' into 'master'
Make detecting if we are cuda 3+ gpu running cuda 2 code faster.

The original implementing tried to run 2^31 kernels and detect a
launch failure to determine this use-case. The issue with this approach
is that on a cuda 3+ gpu, this would take multiple seconds and cause
the gpu to terminate the kernel when opengl was also loaded.

See merge request !104
2015-07-29 09:17:35 -04:00
Kenneth Moreland
b8febd1c01 DataSet now holds DynamicCellSet instead of smart_ptr<CellSet>
The Invoke of the topology dispatcher is also changed to expect a
concrete cell set (which the DynamicCellSet is automatically cast to)
rather than a connectivity structure. The dispatcher calls the
GetNodeToCellConnectivity method for you. (That is currently the only
one supported.)
2015-07-28 17:33:52 -06:00
Kenneth Moreland
7d5fc75dd5 Fix issue with MSVC/NVCC determining a type. 2015-07-28 16:48:42 -06:00
Robert Maynard
d9fd702b1c Make detecting if we are cuda 3+ gpu running cuda 2 code faster.
The original implementing tried to run 2^31 kernels and detect a
launch failure to determine this use-case. The issue with this approach
is that on a cuda 3+ gpu, this would take multiple seconds and cause
the gpu to terminate the kernel when opengl was also loaded.
2015-07-28 17:04:24 -04:00
Kenneth Moreland
be045d7a77 Fix warnings about implicit conversions in MSVC.
These occur in the TBB device adapter code.
2015-07-28 14:10:18 -06:00
Kenneth Moreland
514253e103 Use default iterator difference type for IteratorFromArrayPortal
Previously, IteratorFromArrayPortal was declaring its difference_type
to be vtkm::Id. Although this is allowed, there is code that assumes
that iterators have a difference_type that is ptrdiff_t or something
similar. This change makes the difference_type the default for the
boost iterator facade, which should be the type other code that\
neglects to check expects.
2015-07-28 14:06:43 -06:00
Will Usher
eab098b862 Merge topic 'improve-benchmark-statistics'
e982ebe4 Measurement and general improvements to the benchmark suite

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !102
2015-07-28 13:16:45 -04:00
Will Usher
e982ebe41e Measurement and general improvements to the benchmark suite
- A warm up run is done and not timed to allow for any allocation of
  room for output data without accounting for it in the run times.
Previously this time spent allocating memory would be included in the
time we measured for the benchmark.

- Benchmarks are run multiple times and we then compute some statistics
  about the run time of the benchmark to give a better picture of the
expected run time of the function. To this end we run the benchmark
either 500 times or for 1.5s, whichever comes sooner (though these are
easily changeable). We then perform outlier limiting by Winsorising the
data (similar to how Rust's benchmarking library works) and print out
the median, mean, min and max run times along with the median absolute
deviation and standard deviation.

- Because benchmarks are run many times they can now perform some
  initial setup in the constructor, eg. to fill some test input data
array with values to let the main benchmark loop run faster.

- To allow for benchmarks to have members of the data type being
  benchmarked the struct must now be templated on this type, leading to
a bit of awkwardness. I've worked around this by adding the
`VTKM_MAKE_BENCHMARK` and `VTKM_RUN_BENCHMARK` macros, the make
benchmark macro generates a struct that has an `operator()` templated on
the value type which will construct and return the benchmark functor
templated on that type. The run macro will then use this generated
struct to run the benchmark functor on the type list passed. You can
also pass arguments to the benchmark functor's constructor through the
make macro however this makes things more awkward because the name of
the MakeBench struct must be different for each variation of constructor
arguments (for example see `BenchLowerBounds`).

- Added a short comment on how to add benchmarks in
  `vtkm/benchmarking/Benchmarker.h` as the new system is a bit different
from how the tests work.

- You can now pass an extra argument when running the benchmark suite to
  only benchmark specific functions, eg. `Benchmarks_TBB
BenchmarkDeviceAdapter ScanInclusive Sort` will only benchmark
ScanInclusive and Sort. Running without any extra arguments will run all
the benchmarks as before.
2015-07-28 11:03:28 -06:00
Kenneth Moreland
b270438fea Prevent warning about divide by zero.
The test_equal method compares the ratio of the two values to decide if
they are close enough. Although there is a previous check to make sure
that neither value is too close to zero, the MSVC sometimes gives a
warning because it cannot trace the flow of the check. Add another
conditional (that will never actually be executed) to check a second time
that we never divide by 0.
2015-07-28 09:52:04 -06:00
Kenneth Moreland
6b68666d0c Created DynamicCellSet
The DynamicCellSet will be used in place of the pointer to a CellSet
in a DataSet. This will prevent us from having to cast it all the time
and also remove reliance on boost smart_ptr.
2015-07-27 16:58:29 -06:00
Kenneth Moreland
53d669772f Merge branch 'msvc-array-handle-fail' into 'master'
MSVC ArrayHandle fail

Fix the fact that UnitTestArrayHandle is failing on the Windows dashboards. Also fix some of the MSVC warnings.

See merge request !101
2015-07-27 18:36:11 -04:00