Commit Graph

19 Commits

Author SHA1 Message Date
Allison Vacanti
40441e78e6 Fix some additional warnings. 2017-10-23 11:48:19 -04:00
Allison Vacanti
d0fa70deb5 Reduce overhead and fix bugs in device adapter benchmarks. 2017-10-18 10:14:09 -04:00
Allison Vacanti
05419719d5 Add more options to the device adapter algorithm benchmark. 2017-10-17 16:21:17 -04:00
Allison Vacanti
d6b2896ad9 Add StableSortIndices worklet.
This worklet produces an index array that permutes a key array into a
stable sorted order.
2017-09-28 13:02:33 -04:00
Kenneth Moreland
c3a3184d51 Update copyright for Sandia
Sandia National Laboratories recently changed management from the
Sandia Corporation to the National Technology & Engineering Solutions
of Sandia, LLC (NTESS). The copyright statements need to be updated
accordingly.
2017-09-20 15:33:44 -06:00
Allison Vacanti
de44c58bb2 Prevent compiler from optimizing out benchmark body.
Since the result of the Reduce call was not used, several compilers
were omitting the call completely on release builds.
2017-09-19 14:22:42 -04:00
Robert Maynard
5dd346007b Respect VTK-m convention of parameters all or nothing on a line
clang-format BinPack settings have been disabled to make sure that the
VTK-m style guideline is obeyed.
2017-05-26 13:53:28 -04:00
Kitware Robot
4ade5f5770 clang-format: apply to the entire tree 2017-05-25 07:51:37 -04:00
Kitware Robot
efbde1d54b clang-format: sort include directives 2017-05-18 12:59:33 -04:00
Sujin Philip
9eddce6c99 Rename StreamCompact to CopyIf
Plus, removes the version that uses one array as both input and stencil.
2017-03-06 11:08:27 -05:00
Robert Maynard
6b1094c767 Consistently include windows.h by making a wrapper header.
We previously included windows.h in numerous locations using different
techniques to guard against bringing in parts of the file that are bad
(min/max macros, etc). This solves the problem by consistently using
vtkm/internal/Windows.h to setup everything.
2016-11-28 09:54:37 -05:00
Kenneth Moreland
fdaccc22db Remove exports for header-only functions/methods
Change the VTKM_CONT_EXPORT to VTKM_CONT. (Likewise for EXEC and
EXEC_CONT.) Remove the inline from these macros so that they can be
applied to everything, including implementations in a library.

Because inline is not declared in these modifies, you have to add the
keyword to functions and methods where the implementation is not inlined
in the class.
2016-11-15 22:22:13 -07:00
Robert Maynard
f31d6c2258 Refactor vtkm::Types to be concise and move math helpers out of internal.
I have verified that the optimized assembly for Vec<3> and Vec<4> are consistent
with what we generated before.
2016-10-28 14:57:16 -04:00
Robert Maynard
c2769b81e6 Move over from boost/random to c++11 random. 2016-09-08 17:10:39 -04:00
John Biddiscombe
bafee5dd71 Add a Copy benchmark 2016-06-16 09:18:26 -04:00
Kenneth Moreland
7f005562ac Make all benchmarking sources listed in build
The benchmarking header files were not listed. Not a huge deal since
these files do not need to be installed, but they should be listed
anyway. Changed the vtkm_save_benchmarks CMake macro to be able to list
headers.

Also moved everything from BenchmarkDeviceAdapter.h to
BenchmarkDeviceAdapter.cxx. Since this code shouldn't need to be
included by anything except this benchmark, there is no need to have it
in a header file. Plus, the build changes would mean that any change in
the header (where most of the source was) could cause all code in this
directory to recompile. I do not want to set that precedent.
2016-06-02 10:24:21 -06:00
Robert Maynard
19a941cc6e It is now easier to use the device adapter benchmark code.
For example to now benchmark only the sortbykey algorithm

  ./bin/BenchmarkDeviceAdapter_TBB sortbykey
2016-05-03 15:53:09 -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
Will Usher
238d4fa759 Adding micro benchmark suite 2015-07-09 13:56:06 -06:00