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

C/ZGEMMT changes the inputs in the UNC case #5111

Open
grisuthedragon opened this issue Feb 6, 2025 · 0 comments
Open

C/ZGEMMT changes the inputs in the UNC case #5111

grisuthedragon opened this issue Feb 6, 2025 · 0 comments

Comments

@grisuthedragon
Copy link
Contributor

grisuthedragon commented Feb 6, 2025

The Z/CGEMMT routine changes the second input when calling

cgemmt_("U", "N", "C", &n, &k, &alpha, A, &lda, B, &ldb, &beta, C, &ldc);

or

zgemmt_("U", "N", "C", &n, &k, &alpha, A, &lda, B, &ldb, &beta, C, &ldc);

After the call B is its conjugate.

In the ZGEMMT case this leads:

Matrix A:
(1.000000, 2.000000) (2.000000, 3.000000) (3.000000, 4.000000) 
(4.000000, 5.000000) (5.000000, 6.000000) (6.000000, 7.000000) 
(7.000000, 8.000000) (8.000000, 9.000000) (9.000000, 10.000000) 
Matrix B:
(1.000000, 1.000000) (2.000000, 2.000000) (3.000000, 3.000000) 
(4.000000, 4.000000) (5.000000, 5.000000) (6.000000, 6.000000) 
(7.000000, 7.000000) (8.000000, 8.000000) (9.000000, 9.000000) 
Matrix C:
(144.000000, 12.000000) (0.000000, 0.000000) (0.000000, 0.000000) 
(171.000000, 15.000000) (201.000000, 15.000000) (0.000000, 0.000000) 
(198.000000, 18.000000) (234.000000, 18.000000) (270.000000, 18.000000) 
After cgemmtMatrix A:
(1.000000, 2.000000) (2.000000, 3.000000) (3.000000, 4.000000) 
(4.000000, 5.000000) (5.000000, 6.000000) (6.000000, 7.000000) 
(7.000000, 8.000000) (8.000000, 9.000000) (9.000000, 10.000000) 
Matrix B:
(1.000000, -1.000000) (2.000000, -2.000000) (3.000000, -3.000000) 
(4.000000, -4.000000) (5.000000, -5.000000) (6.000000, -6.000000) 
(7.000000, -7.000000) (8.000000, -8.000000) (9.000000, -9.000000) 

cgemmt_example.c.txt

zgemmt_example.c.txt

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

No branches or pull requests

1 participant