-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimization of integration #2761
Conversation
…reverse bit ordering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Principia/geometry/complexification_body.hpp
Lines 38 to 40 in 968513a
// TODO(egg): Hilbert::Norm². | |
return Hilbert<Vector>::InnerProduct(real_part_, real_part_) + | |
Hilbert<Vector>::InnerProduct(imaginary_part_, imaginary_part_); |
std::optional<int> const max_points) { | ||
using Result = Primitive<std::invoke_result_t<Function, Argument>, Argument>; | ||
using Value = std::invoke_result_t<Function, Argument>; | ||
std::vector<Value> cached_f_cos_N⁻¹π; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Misleading identifier.
numerics/quadrature_body.hpp
Outdated
f_cos_N⁻¹π[s] = f_cos_N⁻¹π_bit_reversed[bit_reversed_s]; | ||
if (s > 0) { | ||
// [Gen72c] (5). | ||
f_cos_N⁻¹π[2 * N - s] = f_cos_N⁻¹π_bit_reversed[bit_reversed_s]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The right-hand side here should be f_cos_N⁻¹π[s]
to match (5).
Norm²
which may be more efficient thanInnerProduct
of a vector with itself.#2400.