Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 33d67a6cb374
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 25cf2fb70c51
Choose a head ref
  • 5 commits
  • 3 files changed
  • 1 contributor

Commits on Oct 23, 2019

  1. Copy the full SHA
    f68454f View commit details

Commits on Oct 24, 2019

  1. benchmark

    eggrobin committed Oct 24, 2019
    Copy the full SHA
    239d795 View commit details
  2. after pleroy’s review

    eggrobin committed Oct 24, 2019
    Copy the full SHA
    61fa927 View commit details
  3. batcch size

    eggrobin committed Oct 24, 2019
    Copy the full SHA
    9f767f3 View commit details

Commits on Oct 25, 2019

  1. Merge pull request #2362 from eggrobin/fukushima-notation

    Templatize on the need for the integral of the third kind
    eggrobin authored Oct 25, 2019
    Copy the full SHA
    25cf2fb View commit details
Showing with 172 additions and 52 deletions.
  1. +25 −0 benchmarks/elliptic_integrals_benchmark.cpp
  2. +140 −52 numerics/elliptic_integrals.cpp
  3. +7 −0 numerics/elliptic_integrals.hpp
25 changes: 25 additions & 0 deletions benchmarks/elliptic_integrals_benchmark.cpp
Original file line number Diff line number Diff line change
@@ -18,6 +18,30 @@ using quantities::si::Radian;

namespace numerics {

void BM_EllipticF(benchmark::State& state) {
constexpr int size = 20;

std::mt19937_64 random(42);
std::uniform_real_distribution<> distribution_φ(0.0, π / 2);
std::uniform_real_distribution<> distribution_mc(0.0, 1.0);
std::vector<Angle> φs;
std::vector<double> mcs;
for (int i = 0; i < size; ++i) {
φs.push_back(distribution_φ(random) * Radian);
mcs.push_back(distribution_mc(random));
}

while (state.KeepRunningBatch(size * size)) {
Angle f;
for (Angle const φ : φs) {
for (double const mc : mcs) {
f += EllipticF(φ, mc);
}
}
benchmark::DoNotOptimize(f);
}
}

void BM_EllipticFEΠ(benchmark::State& state) {
constexpr int size = 20;

@@ -84,6 +108,7 @@ void BM_FukushimaEllipticBDJ(benchmark::State& state) {
}
}

BENCHMARK(BM_EllipticF);
BENCHMARK(BM_EllipticFEΠ);
BENCHMARK(BM_FukushimaEllipticBDJ);

Loading