Skip to content

Commit

Permalink
move to powers ofg 10 (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
hmacdope authored Dec 3, 2024
1 parent 469102e commit bad0989
Showing 1 changed file with 16 additions and 51 deletions.
67 changes: 16 additions & 51 deletions libdistopia/test/bench.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,19 +177,15 @@ BENCHMARK_TEMPLATE_DEFINE_F(CoordinatesBench, CalcBondsFloat,
float)
(benchmark::State &state) { BM_calc_bonds(state); }

BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsFloat)
->Ranges({{16, 16 << 14}, {0, 0}, {0, 0}})
->RangeMultiplier(4);
BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsFloat)->RangeMultiplier(10)->Ranges({{10, 10000000}, {0, 0}, {0, 0}});



BENCHMARK_TEMPLATE_DEFINE_F(CoordinatesBench, CalcBondsDouble,
double)
(benchmark::State &state) { BM_calc_bonds(state); }

BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsDouble)
->Ranges({{16, 16 << 14}, {0, 0}, {0, 0}})
->RangeMultiplier(4);
BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsDouble)->RangeMultiplier(10)->Ranges({{10, 10000000}, {0, 0}, {0, 0}});


// calc_bonds_ortho
Expand All @@ -198,19 +194,15 @@ BENCHMARK_TEMPLATE_DEFINE_F(CoordinatesBench, CalcBondsOrthoInBoxFloat,
float)
(benchmark::State &state) { BM_calc_bonds_ortho(state); }

BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsOrthoInBoxFloat)
->Ranges({{16, 16 << 14}, {0, 0}, {0, 0}})
->RangeMultiplier(4);
BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsOrthoInBoxFloat)->RangeMultiplier(10)->Ranges({{10, 10000000}, {0, 0}, {0, 0}});



BENCHMARK_TEMPLATE_DEFINE_F(CoordinatesBench, CalcBondsOrthoInBoxDouble,
double)
(benchmark::State &state) { BM_calc_bonds_ortho(state); }

BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsOrthoInBoxDouble)
->Ranges({{16, 16 << 14}, {0, 0}, {0, 0}})
->RangeMultiplier(4);
BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsOrthoInBoxDouble)->RangeMultiplier(10)->Ranges({{10, 10000000}, {0, 0}, {0, 0}});


BENCHMARK_TEMPLATE_DEFINE_F(CoordinatesBench, CalcBondsOrthoOutBoxFloat,
Expand All @@ -219,19 +211,14 @@ BENCHMARK_TEMPLATE_DEFINE_F(CoordinatesBench, CalcBondsOrthoOutBoxFloat,


// coords can be +- 5 over boxlength
BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsOrthoOutBoxFloat)
->Ranges({{16, 16 << 14}, {0, 0}, {5, 5}})
->RangeMultiplier(4);

BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsOrthoOutBoxFloat)->RangeMultiplier(10)->Ranges({{10, 10000000}, {0, 0}, {0, 0}});

BENCHMARK_TEMPLATE_DEFINE_F(CoordinatesBench, CalcBondsOrthoOutBoxDouble,
double)
(benchmark::State &state) { BM_calc_bonds_ortho(state); }

// coords can be +- 5 over boxlength
BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsOrthoOutBoxDouble)
->Ranges({{16, 16 << 14}, {0, 0}, {5, 5}})
->RangeMultiplier(4);
BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsOrthoOutBoxDouble)->RangeMultiplier(10)->Ranges({{10, 10000000}, {0, 0}, {0, 0}});


// calc_bonds_triclinic
Expand All @@ -240,38 +227,30 @@ BENCHMARK_TEMPLATE_DEFINE_F(CoordinatesBench, CalcBondsTriclinicInBoxFloat,
float)
(benchmark::State &state) { BM_calc_bonds_triclinic(state); }

BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsTriclinicInBoxFloat)
->Ranges({{16, 16 << 14}, {0, 0}, {0, 0}})
->RangeMultiplier(4);
BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsTriclinicInBoxFloat)->RangeMultiplier(10)->Ranges({{10, 10000000}, {0, 0}, {0, 0}});


BENCHMARK_TEMPLATE_DEFINE_F(CoordinatesBench, CalcBondsTriclinicInBoxDouble,
double)
(benchmark::State &state) { BM_calc_bonds_triclinic(state); }

BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsTriclinicInBoxDouble)
->Ranges({{16, 16 << 14}, {0, 0}, {0, 0}})
->RangeMultiplier(4);
BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsTriclinicInBoxDouble)->RangeMultiplier(10)->Ranges({{10, 10000000}, {0, 0}, {0, 0}});


BENCHMARK_TEMPLATE_DEFINE_F(CoordinatesBench, CalcBondsTriclinicOutBoxFloat,
float)
(benchmark::State &state) { BM_calc_bonds_triclinic(state); }


BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsTriclinicOutBoxFloat)
->Ranges({{16, 16 << 14}, {0, 0}, {5, 5}})
->RangeMultiplier(4);
BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsTriclinicOutBoxFloat)->RangeMultiplier(10)->Ranges({{10, 10000000}, {0, 0}, {0, 0}});


BENCHMARK_TEMPLATE_DEFINE_F(CoordinatesBench, CalcBondsTriclinicOutBoxDouble,
double)
(benchmark::State &state) { BM_calc_bonds_triclinic(state); }


BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsTriclinicOutBoxDouble)
->Ranges({{16, 16 << 14}, {0, 0}, {5, 5}})
->RangeMultiplier(4);
BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsTriclinicOutBoxDouble)->RangeMultiplier(10)->Ranges({{10, 10000000}, {0, 0}, {0, 0}});


// MDA functions
Expand All @@ -284,41 +263,31 @@ BENCHMARK_TEMPLATE_DEFINE_F(CoordinatesBench, CalcBondsMDAFloat,
(benchmark::State &state) { BM_calc_bonds_MDA(state); }


BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsMDAFloat)
->Ranges({{16, 16 << 14}, {0, 0}, {0, 0}})
->RangeMultiplier(4);
BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsMDAFloat)->RangeMultiplier(10)->Ranges({{10, 10000000}, {0, 0}, {0, 0}});


BENCHMARK_TEMPLATE_DEFINE_F(CoordinatesBench, CalcBondsMDADouble,
double)
(benchmark::State &state) { BM_calc_bonds_MDA(state); }


BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsMDADouble)
->Ranges({{16, 16 << 14}, {0, 0}, {5, 5}})
->RangeMultiplier(4);

BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsMDADouble)->RangeMultiplier(10)->Ranges({{10, 10000000}, {0, 0}, {0, 0}});
// calc_bonds_ortho

BENCHMARK_TEMPLATE_DEFINE_F(CoordinatesBench, CalcBondsMDAOrthoOutBoxFloat,
float)
(benchmark::State &state) { BM_calc_bonds_ortho_MDA(state); }


BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsMDAOrthoOutBoxFloat)
->Ranges({{16, 16 << 14}, {0, 0}, {5, 5}})
->RangeMultiplier(4);
BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsMDAOrthoOutBoxFloat)->RangeMultiplier(10)->Ranges({{10, 10000000}, {0, 0}, {0, 0}});;


BENCHMARK_TEMPLATE_DEFINE_F(CoordinatesBench, CalcBondsMDAOrthoOutBoxDouble,
double)
(benchmark::State &state) { BM_calc_bonds_ortho_MDA(state); }


BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsMDAOrthoOutBoxDouble)
->Ranges({{16, 16 << 14}, {0, 0}, {5, 5}})
->RangeMultiplier(4);

BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsMDAOrthoOutBoxDouble)->RangeMultiplier(10)->Ranges({{10, 10000000}, {0, 0}, {0, 0}});


// calc_bonds_triclinic
Expand All @@ -329,19 +298,15 @@ BENCHMARK_TEMPLATE_DEFINE_F(CoordinatesBench, CalcBondsMDATriclinicOutBoxFloat,
(benchmark::State &state) { BM_calc_bonds_triclinic_MDA(state); }


BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsMDATriclinicOutBoxFloat)
->Ranges({{16, 16 << 14}, {0, 0}, {5, 5}})
->RangeMultiplier(4);
BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsMDATriclinicOutBoxFloat)->RangeMultiplier(10)->Ranges({{10, 10000000}, {0, 0}, {0, 0}});


BENCHMARK_TEMPLATE_DEFINE_F(CoordinatesBench, CalcBondsMDATriclinicOutBoxDouble,
double)
(benchmark::State &state) { BM_calc_bonds_triclinic_MDA(state); }


BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsMDATriclinicOutBoxDouble)
->Ranges({{16, 16 << 14}, {0, 0}, {5, 5}})
->RangeMultiplier(4);
BENCHMARK_REGISTER_F(CoordinatesBench, CalcBondsMDATriclinicOutBoxDouble)->RangeMultiplier(10)->Ranges({{10, 10000000}, {0, 0}, {0, 0}});


BENCHMARK_MAIN();

0 comments on commit bad0989

Please sign in to comment.