Skip to content

Conversation

khernyo
Copy link

@khernyo khernyo commented Dec 21, 2022

m_matrix elements point to the rows, so the first index should be
related to the height, and the second index to the width.

It does end up working without this fix, because the matrix width is
constrained to be 1 in both vectorMagnitudeSquared() and dot(), and the
matrix elements are stored consecutively, in one array, so the memory
accesses are exactly the same in both cases. So, this is mostly a
cosmetic fix (ATM), but can help with understanding the code.

m_matrix elements point to the rows, so the first index should be
related to the height, and the second index to the width.

It does end up working without this fix, because the matrix width is
constrained to be 1 in both vectorMagnitudeSquared() and dot(), and the
matrix elements are stored consecutively, in one array, so the memory
accesses are exactly the same in both cases. So, this is mostly a
cosmetic fix (ATM), but can help with understanding the code.
@khernyo khernyo force-pushed the fix-matrix-row-col-mixup branch from e88027b to f4c49e9 Compare December 21, 2022 18:48
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.

1 participant