Skip to content

Commit

Permalink
tidy up some of the desperate fix attempts
Browse files Browse the repository at this point in the history
  • Loading branch information
ewanwm committed Aug 7, 2024
1 parent 3af9415 commit 3adf938
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ nuTens uses [Googles benchmark library](https://github.com/google/benchmark) to
- [x] Integrate linting ( [cpp-linter](https://github.com/cpp-linter)? )
- [x] Add instrumentation library for benchmarking and profiling
- [x] Add suite of benchmarking tests
- [x] Integrate benchmarks into CI ( maybe use [hyperfine](https://github.com/sharkdp/hyperfine) and [bencher](https://bencher.dev/) for this? )
- [ ] Integrate benchmarks into CI ( maybe use [hyperfine](https://github.com/sharkdp/hyperfine) and [bencher](https://bencher.dev/) for this? )
- [ ] Add proper unit tests
- [ ] Expand CI to include more platforms
- [ ] Add support for modules (see [PyTorch doc](https://pytorch.org/cppdocs/api/classtorch_1_1nn_1_1_module.html))
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

add_executable(benchmarks benchmarks.cpp)
target_link_libraries(benchmarks benchmark tensor propagator benchmark_main)
target_link_libraries(benchmarks benchmark::benchmark benchmark::benchmark_main tensor propagator )
4 changes: 2 additions & 2 deletions benchmarks/benchmarks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ static void BM_constMatterOscillations(benchmark::State &state)
}

// Register the function as a benchmark
BENCHMARK(BM_vacuumOscillations)->Args({1 << 10, 1 << 10});
BENCHMARK(BM_vacuumOscillations)->Name("Vacuul Oscillations")->Args({1 << 10, 1 << 10});

Check warning on line 143 in benchmarks/benchmarks.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter

benchmarks/benchmarks.cpp:143:11 [cppcoreguidelines-avoid-non-const-global-variables]

variable 'BM_vacuumOscillations' is non-const and globally accessible, consider making it const

// Register the function as a benchmark
BENCHMARK(BM_constMatterOscillations)->Args({1 << 10, 1 << 10});
BENCHMARK(BM_constMatterOscillations)->Name("Const Density Oscillations")->Args({1 << 10, 1 << 10});

Check warning on line 146 in benchmarks/benchmarks.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter

benchmarks/benchmarks.cpp:146:11 [cppcoreguidelines-avoid-non-const-global-variables]

variable 'BM_constMatterOscillations' is non-const and globally accessible, consider making it const

// Run the benchmark
BENCHMARK_MAIN();

0 comments on commit 3adf938

Please sign in to comment.