Skip to content
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

Horner's rule for polynomial evaluation with symmetry idea diccussed in discussions #461 #493

Merged
merged 20 commits into from
Jul 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
change to use fnma in sym part
lu1and10 committed Jul 12, 2024
commit c9fded59530e0cac4961f8ae54e596371176c9bd
4 changes: 2 additions & 2 deletions src/spreadinterp.cpp
Original file line number Diff line number Diff line change
@@ -825,7 +825,7 @@ Two upsampfacs implemented. Params must match ref formula. Barnett 4/24/18 */
if (offset >= (w + 1) / 2) {
// to use aligned store, we need shuffle the previous k_sym and current k_sym
k_prev = k_sym;
k_sym = xsimd::fma(k_odd, -zv, k_even);
k_sym = xsimd::fnma(k_odd, zv, k_even);
xsimd::shuffle(k_sym, k_prev, shuffle_batch).store_aligned(ker + offset);
}
}
@@ -854,7 +854,7 @@ Two upsampfacs implemented. Params must match ref formula. Barnett 4/24/18 */
// right part symmetric to the left part
if (offset >= w / 2) {
// reverse the order for symmetric part
xsimd::swizzle(xsimd::fma(k_odd, -zv, k_even), reverse_batch)
xsimd::swizzle(xsimd::fnma(k_odd, zv, k_even), reverse_batch)
.store_aligned(ker + offset);
}
}