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

Fix parameter ordering/naming for reference (omp) batch CG #1701

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

MarcelKoch
Copy link
Member

This PR fixes the parameter ordering of the initialize function for the reference+omp implementation of the batch CG. Additionally, a parameter name in update_x_and_r is changed to better reflect the actually used variable.

@MarcelKoch MarcelKoch added the 1:ST:ready-for-review This PR is ready for review label Oct 17, 2024
@MarcelKoch MarcelKoch requested a review from a team October 17, 2024 08:32
@MarcelKoch MarcelKoch self-assigned this Oct 17, 2024
@ginkgo-bot ginkgo-bot added mod:reference This is related to the reference module. type:solver This is related to the solvers labels Oct 17, 2024
@MarcelKoch MarcelKoch added this to the Ginkgo 1.9.0 milestone Oct 17, 2024
@@ -96,7 +96,7 @@ inline void update_x_and_r(
batch_single_kernels::compute_conj_dot_product_kernel<ValueType>(
p_entry, Ap_entry, alpha_entry);

const ValueType temp = rho_old_entry.values[0] / alpha_entry.values[0];
const ValueType temp = rho_new_entry.values[0] / alpha_entry.values[0];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think this is accurate. In this case here, rho_old is $&lt;r_{j}, z_{j}&gt;$, while rho_new is $&lt;r_{j+1}, z_{j+1}&gt;$. And temp here is equivalent to $\alpha_j$ in Algorithm 9.1 in Saad's book for example. So I think the current state in develop should be correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1:ST:ready-for-review This PR is ready for review mod:reference This is related to the reference module. type:solver This is related to the solvers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants