• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

README.mdH A D23-Dec-20201.7 KiB6245

bgv_basic.cppH A D23-Dec-20204.4 KiB13495

bgv_common.hH A D23-Dec-20202.1 KiB7454

bgv_fatboot.cppH A D23-Dec-20204.7 KiB147110

bgv_thinboot.cppH A D23-Dec-20204.8 KiB147110

ckks_basic.cppH A D23-Dec-20205.7 KiB172134

ckks_common.hH A D23-Dec-20202.2 KiB7050

README.md

1# Some HElib benchmarks
2
3## Prerequisites
4
5### Build and install HElib
6
7Build and install HElib as described in [INSTALL.md](../INSTALL.md).
8
9### Build and install google benchmark
10
11Download the library https://github.com/google/benchmark from github, build and
12then install it.
13
14```
15git clone https://github.com/google/benchmark
16cd benchmark
17mkdir build
18cd build
19cmake -DBENCHMARK_ENABLE_GTEST_TESTS=OFF -DBENCHMARK_ENABLE_INSTALL=ON -DCMAKE_INSTALL_PREFIX=<installation dir> ..
20make
21make install
22```
23
24## Build benchmark
25
26Benchmarks are found in `HElib/benchmarks` and are grouped by themes; the file
27names reflect the themes they belong to. By default, the benchmarks are built as
28separate executables. If you prefer to build a single executable then set the
29`-DSINGLE_EXEC=ON`. Compiled tests appear in the `bin` directory.  Now build
30the project.
31
32```
33cd HElib/benchmarks
34mkdir build
35cd build
36cmake -Dhelib_DIR=<helib installation dir>/share/cmake/helib -Dbenchmark_DIR=<benchmark installation dir>/lib/cmake/benchmark/ ..
37make
38```
39
40When writing benchmarks please use `BENCHMARK_CAPTURE(<custom params>)` for
41custom parameters and do not forget to add the new target to `CMakeLists.txt`.
42Use the extra option `BENCHMARK_CAPTURE()->Iterations(<iterations>)` for a
43specific number of iterations or `BENCHMARK_CAPTURE()->MinTime(<time in
44seconds>)` to set a minimum time for the benchmark to run for.
45
46NOTE: Both `Iterations` and `MinTime` cannot be used together.
47
48## Run benchmark
49
50To execute individual tests run the following
51
52```
53./bin/<benchmark to run>
54```
55
56If you have compiled the tests as a single executable using the
57`-DSINGLE_EXEC=ON` flag, you can execute the tests by running the following
58
59```
60./bin/helib_benchmark
61```
62