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

rotg/rot/rotmg/rotm docs and examples #2472

Merged
merged 5 commits into from
Jan 7, 2025

Conversation

brian-kelley
Copy link
Contributor

@brian-kelley brian-kelley commented Jan 6, 2025

  • Add wiki examples for rotg/rot and rotmg/rotm
  • Improve inline/doxygen comments for routines

Note: when #2466 is merged, there will be a new template parameter for rot and the doxygen should be updated in whichever PR merges last. This PR should probably go in last.

Sample rot example output:

x,y before applying Givens rotation:
2.63237 9.19669 1.52604 9.48833 1.51194 3.62117 7.80453 1.61353 7.66461 6.89282 
3.22341 6.86526 4.57516 7.72399 4.65974 8.82289 3.13523 6.45966 7.73998 6.55219 

rotg output (rotation parameters) to eliminate y(0):
c = 0.632523 
s = 0.774542 
r = x(0) = 4.1617 
z = 1.58097 

x,y after applying Givens rotation:
4.1617 11.1345 4.50891 11.9841 4.5655 9.12417 7.36491 6.02387 10.843 9.43481 
0 -2.78078 1.71191 -2.4635 1.77634 2.77593 -4.06183 2.83613 -1.04084 -1.19437 

Sample rotm output:

x,y before applying modified Givens rotation:
2.63237 9.19669 1.52604 9.48833 1.51194 3.62117 7.80453 1.61353 7.66461 6.89282 
3.22341 6.86526 4.57516 7.72399 4.65974 8.82289 3.13523 6.45966 7.73998 6.55219 

rotmg output (rotation parameters) to eliminate y(0):
d1 = 0.599915 
d2 = 0.599915 
flag = 1
h components = 0.816642 0 0 0.816642 

x,y after applying modified Givens rotation and scaling by [sqrt(d1), sqrt(d2)]):
4.1617 11.1345 4.50891 11.9841 4.5655 9.12417 7.36491 6.02387 10.843 9.43481 
0 -2.78078 1.71191 -2.4635 1.77634 2.77593 -4.06183 2.83613 -1.04084 -1.19437 

@brian-kelley brian-kelley requested a review from lucbv January 6, 2025 19:14
Copy link
Contributor

@lucbv lucbv left a comment

Choose a reason for hiding this comment

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

Thanks for all the updates, this looks pretty good!

- Add wiki examples for rotg/rot and rotmg/rotm
- Improve inline/doxygen comments for routines

Signed-off-by: Brian Kelley <bmkelle@sandia.gov>
Signed-off-by: Brian Kelley <bmkelle@sandia.gov>
Signed-off-by: Brian Kelley <bmkelle@sandia.gov>
Signed-off-by: Brian Kelley <bmkelle@sandia.gov>
Signed-off-by: Brian Kelley <bmkelle@sandia.gov>
@lucbv lucbv merged commit e0ff90e into kokkos:develop Jan 7, 2025
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants