mirror of
https://github.com/bensuperpc/astar.git
synced 2025-06-29 20:35:50 +02:00
Improve Templates name and readme
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
@ -18,7 +18,7 @@ static void DoSetup([[maybe_unused]] const benchmark::State& state) {}
|
||||
|
||||
static void DoTeardown([[maybe_unused]] const benchmark::State& state) {}
|
||||
|
||||
template <IntegerType T>
|
||||
template <IntegerType CoordinateType>
|
||||
static void astar_bench(benchmark::State& state) {
|
||||
auto range = state.range(0);
|
||||
|
||||
@ -47,7 +47,7 @@ static void astar_bench(benchmark::State& state) {
|
||||
std::vector<uint8_t> blocks = std::vector<uint8_t>(mapWidth * mapHeight, 0);
|
||||
benchmark::DoNotOptimize(blocks);
|
||||
|
||||
AStar::AStar<T, false> pathFinder;
|
||||
AStar::AStar<CoordinateType, false> pathFinder;
|
||||
benchmark::DoNotOptimize(pathFinder);
|
||||
pathFinder.setWorldSize({mapWidth, mapHeight});
|
||||
pathFinder.setHeuristic(AStar::Heuristic::euclidean);
|
||||
@ -104,7 +104,7 @@ BENCHMARK(astar_bench<uint32_t>)
|
||||
->UseRealTime()
|
||||
->Repetitions(repetitions);
|
||||
|
||||
template <IntegerType T>
|
||||
template <IntegerType CoordinateType>
|
||||
static void astar_bench_fast(benchmark::State& state) {
|
||||
auto range = state.range(0);
|
||||
|
||||
@ -133,7 +133,7 @@ static void astar_bench_fast(benchmark::State& state) {
|
||||
std::vector<uint32_t> blocks = std::vector<uint32_t>(mapWidth * mapHeight, 0);
|
||||
benchmark::DoNotOptimize(blocks);
|
||||
|
||||
AStar::AStarFast<T, false, uint32_t> pathFinder;
|
||||
AStar::AStarFast<CoordinateType, false, uint32_t> pathFinder;
|
||||
benchmark::DoNotOptimize(pathFinder);
|
||||
pathFinder.setHeuristic(AStar::Heuristic::euclidean);
|
||||
pathFinder.setDiagonalMovement(true);
|
||||
|
Reference in New Issue
Block a user