mirror of
https://github.com/Relintai/pmlpp.git
synced 2024-12-31 16:17:10 +01:00
Fix index calculations in MLPPLinAlg::transposem.
This commit is contained in:
parent
a42cfac723
commit
7e71ea49d9
@ -378,9 +378,9 @@ Ref<MLPPMatrix> MLPPLinAlg::transposem(const Ref<MLPPMatrix> &A) {
|
||||
const real_t *a_ptr = A->ptr();
|
||||
real_t *at_ptr = AT->ptrw();
|
||||
|
||||
for (int i = 0; i < a_size.x; ++i) {
|
||||
for (int j = 0; j < a_size.y; ++j) {
|
||||
at_ptr[AT->calculate_index(i, j)] = a_ptr[AT->calculate_index(j, i)];
|
||||
for (int i = 0; i < a_size.y; ++i) {
|
||||
for (int j = 0; j < a_size.x; ++j) {
|
||||
at_ptr[AT->calculate_index(j, i)] = a_ptr[A->calculate_index(i, j)];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user