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: f9519ec9018f
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cbc3f205d74e
Choose a head ref
  • 7 commits
  • 8 files changed
  • 2 contributors

Commits on Nov 15, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b615af0 View commit details
  2. Fix PoissonSeries.

    pleroy committed Nov 15, 2020
    Copy the full SHA
    ce99e0b View commit details
  3. Fix PiecewisePoissonSeries.

    pleroy committed Nov 15, 2020
    Copy the full SHA
    be30f25 View commit details

Commits on Nov 16, 2020

  1. Remove unneeded changes.

    pleroy committed Nov 16, 2020
    Copy the full SHA
    41b4511 View commit details
  2. Copy the full SHA
    e2b1114 View commit details
  3. Bogus formatting change.

    pleroy committed Nov 16, 2020
    Copy the full SHA
    be2225f View commit details
  4. Merge pull request #2786 from pleroy/CxxLatest

    Use c++latest everywhere with MSVC
    eggrobin authored Nov 16, 2020
    Copy the full SHA
    cbc3f20 View commit details
14 changes: 14 additions & 0 deletions base/macros.hpp
Original file line number Diff line number Diff line change
@@ -176,6 +176,20 @@ inline void noreturn() { std::exit(0); }
// For templates in macro parameters.
#define TEMPLATE(...) template<__VA_ARGS__>

// For circumventing
// https://developercommunity.visualstudio.com/content/problem/1256363/operator-call-incorrectly-marked-as-ambiguous-with.html.
#if PRINCIPIA_COMPILER_MSVC_HAS_CXX20
#define PRINCIPIA_MAX(l, r) ((l) > (r) ? (l) : (r))
#define PRINCIPIA_MAX3(x1, x2, x3) \
PRINCIPIA_MAX((x1), PRINCIPIA_MAX((x2), (x3)))
#define PRINCIPIA_MAX4(x1, x2, x3, x4) \
PRINCIPIA_MAX((x1), PRINCIPIA_MAX((x2), PRINCIPIA_MAX((x3), (x4))))
#else
#define PRINCIPIA_MAX(l, r) std::max((l), (r))
#define PRINCIPIA_MAX3(x1, x2, x3) std::max({(x1), (x2), (x3)})
#define PRINCIPIA_MAX4(x1, x2, x3) std::max({(x1), (x2), (x3), (x4)})
#endif

// Forward declaration of a class or struct declared in an internal namespace
// according to #602.
// Usage:
60 changes: 30 additions & 30 deletions numerics/piecewise_poisson_series.hpp
Original file line number Diff line number Diff line change
@@ -151,37 +151,37 @@ class PiecewisePoissonSeries {
S const& right);
template<typename V, int al, int pl, int ar, int pr,
template<typename, typename, int> class E>
PiecewisePoissonSeries<V, std::max(al, ar), std::max(pl, pr), E>
PiecewisePoissonSeries<V, PRINCIPIA_MAX(al, ar), PRINCIPIA_MAX(pl, pr), E>
friend operator+(PoissonSeries<V, al, pl, E> const& left,
PiecewisePoissonSeries<V, ar, pr, E> const& right);
template<typename V, int al, int pl, int ar, int pr,
template<typename, typename, int> class E>
PiecewisePoissonSeries<V, std::max(al, ar), std::max(pl, pr), E>
PiecewisePoissonSeries<V, PRINCIPIA_MAX(al, ar), PRINCIPIA_MAX(pl, pr), E>
friend operator+(PiecewisePoissonSeries<V, al, pl, E> const& left,
PoissonSeries<V, ar, pr, E> const& right);
template<typename V, int al, int pl, int ar, int pr,
template<typename, typename, int> class E>
PiecewisePoissonSeries<V, std::max(al, ar), std::max(pl, pr), E>
PiecewisePoissonSeries<V, PRINCIPIA_MAX(al, ar), PRINCIPIA_MAX(pl, pr), E>
friend operator-(PoissonSeries<V, al, pl, E> const& left,
PiecewisePoissonSeries<V, ar, pr, E> const& right);
template<typename V, int al, int pl, int ar, int pr,
template<typename, typename, int> class E>
PiecewisePoissonSeries<V, std::max(al, ar), std::max(pl, pr), E>
PiecewisePoissonSeries<V, PRINCIPIA_MAX(al, ar), PRINCIPIA_MAX(pl, pr), E>
friend operator-(PiecewisePoissonSeries<V, al, pl, E> const& left,
PoissonSeries<V, ar, pr, E> const& right);
template<typename L, typename R, int al, int pl, int ar, int pr,
template<typename, typename, int> class E>
PiecewisePoissonSeries<Product<L, R>,
std::max({al + ar, al + pr, pl + ar, pl + pr}),
std::max({al + pr, pl + ar, pl + pr}),
PRINCIPIA_MAX4(al + ar, al + pr, pl + ar, pl + pr),
PRINCIPIA_MAX3(al + pr, pl + ar, pl + pr),
E>
friend operator*(PoissonSeries<L, al, pl, E> const& left,
PiecewisePoissonSeries<R, ar, pr, E> const& right);
template<typename L, typename R, int al, int pl, int ar, int pr,
template<typename, typename, int> class E>
PiecewisePoissonSeries<Product<L, R>,
std::max({al + ar, al + pr, pl + ar, pl + pr}),
std::max({al + pr, pl + ar, pl + pr}),
PRINCIPIA_MAX4(al + ar, al + pr, pl + ar, pl + pr),
PRINCIPIA_MAX3(al + pr, pl + ar, pl + pr),
E>
friend operator*(PiecewisePoissonSeries<L, al, pl, E> const& left,
PoissonSeries<R, ar, pr, E> const& right);
@@ -273,8 +273,8 @@ template<typename Value,
int aperiodic_rdegree, int periodic_rdegree,
template<typename, typename, int> class Evaluator>
PiecewisePoissonSeries<Value,
std::max(aperiodic_ldegree, aperiodic_rdegree),
std::max(periodic_ldegree, periodic_rdegree),
PRINCIPIA_MAX(aperiodic_ldegree, aperiodic_rdegree),
PRINCIPIA_MAX(periodic_ldegree, periodic_rdegree),
Evaluator>
operator+(PoissonSeries<Value,
aperiodic_ldegree, periodic_ldegree,
@@ -288,8 +288,8 @@ template<typename Value,
int aperiodic_rdegree, int periodic_rdegree,
template<typename, typename, int> class Evaluator>
PiecewisePoissonSeries<Value,
std::max(aperiodic_ldegree, aperiodic_rdegree),
std::max(periodic_ldegree, periodic_rdegree),
PRINCIPIA_MAX(aperiodic_ldegree, aperiodic_rdegree),
PRINCIPIA_MAX(periodic_ldegree, periodic_rdegree),
Evaluator>
operator+(PiecewisePoissonSeries<Value,
aperiodic_ldegree, periodic_ldegree,
@@ -303,8 +303,8 @@ template<typename Value,
int aperiodic_rdegree, int periodic_rdegree,
template<typename, typename, int> class Evaluator>
PiecewisePoissonSeries<Value,
std::max(aperiodic_ldegree, aperiodic_rdegree),
std::max(periodic_ldegree, periodic_rdegree),
PRINCIPIA_MAX(aperiodic_ldegree, aperiodic_rdegree),
PRINCIPIA_MAX(periodic_ldegree, periodic_rdegree),
Evaluator>
operator-(PoissonSeries<Value,
aperiodic_ldegree, periodic_ldegree,
@@ -318,8 +318,8 @@ template<typename Value,
int aperiodic_rdegree, int periodic_rdegree,
template<typename, typename, int> class Evaluator>
PiecewisePoissonSeries<Value,
std::max(aperiodic_ldegree, aperiodic_rdegree),
std::max(periodic_ldegree, periodic_rdegree),
PRINCIPIA_MAX(aperiodic_ldegree, aperiodic_rdegree),
PRINCIPIA_MAX(periodic_ldegree, periodic_rdegree),
Evaluator>
operator-(PiecewisePoissonSeries<Value,
aperiodic_ldegree, periodic_ldegree,
@@ -333,13 +333,13 @@ template<typename LValue, typename RValue,
int aperiodic_rdegree, int periodic_rdegree,
template<typename, typename, int> class Evaluator>
PiecewisePoissonSeries<Product<LValue, RValue>,
std::max({aperiodic_ldegree + aperiodic_rdegree,
aperiodic_ldegree + periodic_rdegree,
periodic_ldegree + aperiodic_rdegree,
periodic_ldegree + periodic_rdegree}),
std::max({aperiodic_ldegree + periodic_rdegree,
periodic_ldegree + aperiodic_rdegree,
periodic_ldegree + periodic_rdegree}),
PRINCIPIA_MAX4(aperiodic_ldegree + aperiodic_rdegree,
aperiodic_ldegree + periodic_rdegree,
periodic_ldegree + aperiodic_rdegree,
periodic_ldegree + periodic_rdegree),
PRINCIPIA_MAX3(aperiodic_ldegree + periodic_rdegree,
periodic_ldegree + aperiodic_rdegree,
periodic_ldegree + periodic_rdegree),
Evaluator>
operator*(PoissonSeries<LValue,
aperiodic_ldegree, periodic_ldegree,
@@ -353,13 +353,13 @@ template<typename LValue, typename RValue,
int aperiodic_rdegree, int periodic_rdegree,
template<typename, typename, int> class Evaluator>
PiecewisePoissonSeries<Product<LValue, RValue>,
std::max({aperiodic_ldegree + aperiodic_rdegree,
aperiodic_ldegree + periodic_rdegree,
periodic_ldegree + aperiodic_rdegree,
periodic_ldegree + periodic_rdegree}),
std::max({aperiodic_ldegree + periodic_rdegree,
periodic_ldegree + aperiodic_rdegree,
periodic_ldegree + periodic_rdegree}),
PRINCIPIA_MAX4(aperiodic_ldegree + aperiodic_rdegree,
aperiodic_ldegree + periodic_rdegree,
periodic_ldegree + aperiodic_rdegree,
periodic_ldegree + periodic_rdegree),
PRINCIPIA_MAX3(aperiodic_ldegree + periodic_rdegree,
periodic_ldegree + aperiodic_rdegree,
periodic_ldegree + periodic_rdegree),
Evaluator>
operator*(PiecewisePoissonSeries<LValue,
aperiodic_ldegree, periodic_ldegree,
44 changes: 22 additions & 22 deletions numerics/piecewise_poisson_series_body.hpp
Original file line number Diff line number Diff line change
@@ -327,8 +327,8 @@ template<typename Value,
int aperiodic_rdegree, int periodic_rdegree,
template<typename, typename, int> class Evaluator>
PiecewisePoissonSeries<Value,
std::max(aperiodic_ldegree, aperiodic_rdegree),
std::max(periodic_ldegree, periodic_rdegree),
PRINCIPIA_MAX(aperiodic_ldegree, aperiodic_rdegree),
PRINCIPIA_MAX(periodic_ldegree, periodic_rdegree),
Evaluator>
operator+(PoissonSeries<Value,
aperiodic_ldegree, periodic_ldegree,
@@ -355,8 +355,8 @@ template<typename Value,
int aperiodic_rdegree, int periodic_rdegree,
template<typename, typename, int> class Evaluator>
PiecewisePoissonSeries<Value,
std::max(aperiodic_ldegree, aperiodic_rdegree),
std::max(periodic_ldegree, periodic_rdegree),
PRINCIPIA_MAX(aperiodic_ldegree, aperiodic_rdegree),
PRINCIPIA_MAX(periodic_ldegree, periodic_rdegree),
Evaluator>
operator+(PiecewisePoissonSeries<Value,
aperiodic_ldegree, periodic_ldegree,
@@ -383,8 +383,8 @@ template<typename Value,
int aperiodic_rdegree, int periodic_rdegree,
template<typename, typename, int> class Evaluator>
PiecewisePoissonSeries<Value,
std::max(aperiodic_ldegree, aperiodic_rdegree),
std::max(periodic_ldegree, periodic_rdegree),
PRINCIPIA_MAX(aperiodic_ldegree, aperiodic_rdegree),
PRINCIPIA_MAX(periodic_ldegree, periodic_rdegree),
Evaluator>
operator-(PoissonSeries<Value,
aperiodic_ldegree, periodic_ldegree,
@@ -416,8 +416,8 @@ template<typename Value,
int aperiodic_rdegree, int periodic_rdegree,
template<typename, typename, int> class Evaluator>
PiecewisePoissonSeries<Value,
std::max(aperiodic_ldegree, aperiodic_rdegree),
std::max(periodic_ldegree, periodic_rdegree),
PRINCIPIA_MAX(aperiodic_ldegree, aperiodic_rdegree),
PRINCIPIA_MAX(periodic_ldegree, periodic_rdegree),
Evaluator>
operator-(PiecewisePoissonSeries<Value,
aperiodic_ldegree, periodic_ldegree,
@@ -449,13 +449,13 @@ template<typename LValue, typename RValue,
int aperiodic_rdegree, int periodic_rdegree,
template<typename, typename, int> class Evaluator>
PiecewisePoissonSeries<Product<LValue, RValue>,
std::max({aperiodic_ldegree + aperiodic_rdegree,
aperiodic_ldegree + periodic_rdegree,
periodic_ldegree + aperiodic_rdegree,
periodic_ldegree + periodic_rdegree}),
std::max({aperiodic_ldegree + periodic_rdegree,
periodic_ldegree + aperiodic_rdegree,
periodic_ldegree + periodic_rdegree}),
PRINCIPIA_MAX4(aperiodic_ldegree + aperiodic_rdegree,
aperiodic_ldegree + periodic_rdegree,
periodic_ldegree + aperiodic_rdegree,
periodic_ldegree + periodic_rdegree),
PRINCIPIA_MAX3(aperiodic_ldegree + periodic_rdegree,
periodic_ldegree + aperiodic_rdegree,
periodic_ldegree + periodic_rdegree),
Evaluator>
operator*(PoissonSeries<LValue,
aperiodic_ldegree, periodic_ldegree,
@@ -491,13 +491,13 @@ template<typename LValue, typename RValue,
int aperiodic_rdegree, int periodic_rdegree,
template<typename, typename, int> class Evaluator>
PiecewisePoissonSeries<Product<LValue, RValue>,
std::max({aperiodic_ldegree + aperiodic_rdegree,
aperiodic_ldegree + periodic_rdegree,
periodic_ldegree + aperiodic_rdegree,
periodic_ldegree + periodic_rdegree}),
std::max({aperiodic_ldegree + periodic_rdegree,
periodic_ldegree + aperiodic_rdegree,
periodic_ldegree + periodic_rdegree}),
PRINCIPIA_MAX4(aperiodic_ldegree + aperiodic_rdegree,
aperiodic_ldegree + periodic_rdegree,
periodic_ldegree + aperiodic_rdegree,
periodic_ldegree + periodic_rdegree),
PRINCIPIA_MAX3(aperiodic_ldegree + periodic_rdegree,
periodic_ldegree + aperiodic_rdegree,
periodic_ldegree + periodic_rdegree),
Evaluator>
operator*(PiecewisePoissonSeries<LValue,
aperiodic_ldegree, periodic_ldegree,
40 changes: 20 additions & 20 deletions numerics/poisson_series.hpp
Original file line number Diff line number Diff line change
@@ -172,12 +172,12 @@ class PoissonSeries {
friend operator-(PoissonSeries<V, ar, pr, E> const& right);
template<typename V, int al, int pl, int ar, int pr,
template<typename, typename, int> class E>
PoissonSeries<V, std::max(al, ar), std::max(pl, pr), E>
PoissonSeries<V, PRINCIPIA_MAX(al, ar), PRINCIPIA_MAX(pl, pr), E>
friend operator+(PoissonSeries<V, al, pl, E> const& left,
PoissonSeries<V, ar, pr, E> const& right);
template<typename V, int al, int pl, int ar, int pr,
template<typename, typename, int> class E>
PoissonSeries<V, std::max(al, ar), std::max(pl, pr), E>
PoissonSeries<V, PRINCIPIA_MAX(al, ar), PRINCIPIA_MAX(pl, pr), E>
friend operator-(PoissonSeries<V, al, pl, E> const& left,
PoissonSeries<V, ar, pr, E> const& right);
template<typename S, typename V, int ar, int pr,
@@ -248,8 +248,8 @@ template<typename Value,
int aperiodic_rdegree, int periodic_rdegree,
template<typename, typename, int> class Evaluator>
PoissonSeries<Value,
std::max(aperiodic_ldegree, aperiodic_rdegree),
std::max(periodic_ldegree, periodic_rdegree),
PRINCIPIA_MAX(aperiodic_ldegree, aperiodic_rdegree),
PRINCIPIA_MAX(periodic_ldegree, periodic_rdegree),
Evaluator>
operator+(PoissonSeries<Value,
aperiodic_ldegree, periodic_ldegree,
@@ -263,8 +263,8 @@ template<typename Value,
int aperiodic_rdegree, int periodic_rdegree,
template<typename, typename, int> class Evaluator>
PoissonSeries<Value,
std::max(aperiodic_ldegree, aperiodic_rdegree),
std::max(periodic_ldegree, periodic_rdegree),
PRINCIPIA_MAX(aperiodic_ldegree, aperiodic_rdegree),
PRINCIPIA_MAX(periodic_ldegree, periodic_rdegree),
Evaluator>
operator-(PoissonSeries<Value,
aperiodic_ldegree, periodic_ldegree,
@@ -316,13 +316,13 @@ template<typename LValue, typename RValue,
int aperiodic_rdegree, int periodic_rdegree,
template<typename, typename, int> class Evaluator>
PoissonSeries<Product<LValue, RValue>,
std::max({aperiodic_ldegree + aperiodic_rdegree,
aperiodic_ldegree + periodic_rdegree,
periodic_ldegree + aperiodic_rdegree,
periodic_ldegree + periodic_rdegree}),
std::max({aperiodic_ldegree + periodic_rdegree,
periodic_ldegree + aperiodic_rdegree,
periodic_ldegree + periodic_rdegree}),
PRINCIPIA_MAX4(aperiodic_ldegree + aperiodic_rdegree,
aperiodic_ldegree + periodic_rdegree,
periodic_ldegree + aperiodic_rdegree,
periodic_ldegree + periodic_rdegree),
PRINCIPIA_MAX3(aperiodic_ldegree + periodic_rdegree,
periodic_ldegree + aperiodic_rdegree,
periodic_ldegree + periodic_rdegree),
Evaluator>
operator*(PoissonSeries<LValue,
aperiodic_ldegree, periodic_ldegree,
@@ -338,13 +338,13 @@ template<typename LValue, typename RValue,
int aperiodic_rdegree, int periodic_rdegree,
template<typename, typename, int> class Evaluator>
PoissonSeries<typename Hilbert<LValue, RValue>::InnerProductType,
std::max({aperiodic_ldegree + aperiodic_rdegree,
aperiodic_ldegree + periodic_rdegree,
periodic_ldegree + aperiodic_rdegree,
periodic_ldegree + periodic_rdegree}),
std::max({aperiodic_ldegree + periodic_rdegree,
periodic_ldegree + aperiodic_rdegree,
periodic_ldegree + periodic_rdegree}),
PRINCIPIA_MAX4(aperiodic_ldegree + aperiodic_rdegree,
aperiodic_ldegree + periodic_rdegree,
periodic_ldegree + aperiodic_rdegree,
periodic_ldegree + periodic_rdegree),
PRINCIPIA_MAX3(aperiodic_ldegree + periodic_rdegree,
periodic_ldegree + aperiodic_rdegree,
periodic_ldegree + periodic_rdegree),
Evaluator>
PointwiseInnerProduct(PoissonSeries<LValue,
aperiodic_ldegree, periodic_ldegree,
Loading