- edited description
data() of column-major matrix row subvector is incorrect
Issue #457
resolved
Test:
#include <blaze/Math.h>
#include <iostream>
int main(int, char **)
{
using namespace blaze;
StaticMatrix<double, 5, 5, columnMajor> A;
auto r = subvector(row(A, 1), 2, 1);
std::cout << &A(1, 2) << std::endl;
std::cout << r.data() << std::endl;
return 0;
}
Output:
0x7ffccf2b6e48
0x7ffccf2b6df8
I would expect subvector(row(A, i), j, n).data() == &A(i, j)
regardless of the matrix storage order.
Comments (7)
-
reporter -
reporter - edited description
-
Hi Mikhail!
Thanks for reporting this defect. You are correct, despite the fact that the data function can only return the address of the first element of the subvector, it should still return the correct address. We’ll fix the issue as quickly as possible. Thanks again,
Best regards,
Klaus!
-
-
assigned issue to
-
assigned issue to
-
- changed status to open
-
- changed status to resolved
Commit f4de29a fixes the
data()
member functions of theSubvector
view. The fix is immediately available via cloning the Blaze repository and will be officially released in Blaze 3.9. -
reporter - edited description
- Log in to comment