Skip to content

Commit

Permalink
rng benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
KRM7 committed Sep 4, 2023
1 parent 59e648a commit 4289978
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
15 changes: 15 additions & 0 deletions test/benchmark/random.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* Copyright (c) 2023 Krisztián Rugási. Subject to the MIT License. */

#include <catch2/catch_test_macros.hpp>
#include <catch2/benchmark/catch_benchmark.hpp>
#include "utility/rng.hpp"

using namespace gapp::rng;

TEST_CASE("prng", "[benchmark]")
{
BENCHMARK("randomBool") { return randomBool(); };
BENCHMARK("randomInt") { return randomInt(0, 100); };
BENCHMARK("randomReal") { return randomReal(0.0, 1.0); };
BENCHMARK("randomNorm") { return randomNormal(0.0, 10.0); };
}
1 change: 0 additions & 1 deletion test/benchmark/sample_unique.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* Copyright (c) 2023 Krisztián Rugási. Subject to the MIT License. */

#include <catch2/catch_test_macros.hpp>
#include <catch2/generators/catch_generators.hpp>
#include <catch2/benchmark/catch_benchmark.hpp>
#include "utility/rng.hpp"

Expand Down

0 comments on commit 4289978

Please sign in to comment.