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

Why are i and j flipped? #17

Open
minhkhang1795 opened this issue Mar 14, 2020 · 3 comments
Open

Why are i and j flipped? #17

minhkhang1795 opened this issue Mar 14, 2020 · 3 comments

Comments

@minhkhang1795
Copy link

Are there any reasons why i and j are flipped? I thought it should be a[ (i)*lda + (j) ] instead of the code below:

#define A(i,j) a[ (j)*lda + (i) ]

Example:
Result of matrices a, b and cref (randomized integers):

// a
83.000000 86.000000 
77.000000 15.000000 
// b
93.000000 35.000000 
86.000000 92.000000 
// cref
10463.000000 8544.000000 
14284.000000 8803.000000 
@rayjan0114
Copy link

I got the same question!!

@marvin-Yu
Copy link

https://www.youtube.com/watch?v=PhjildK5oO8

@minhkhang1795 minhkhang1795 changed the title Why do i and j are flipped? Why are i and j flipped? Mar 9, 2022
@poemon1
Copy link

poemon1 commented Sep 6, 2023

There explaination in the notes: ‘Create macros so that the matrices are stored in column-major order'

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

4 participants