resize() of a submatrix

Issue #456 resolved
Mikhail Katliar created an issue

Consider the following example:

#include <blaze/Math.h>

int main(int, char **)
{
    using namespace blaze;
    blaze::DynamicMatrix<double> m(5, 5);
    auto s = submatrix(m, 0, 0, 3, 3);
    resize(s, 3, 3);

    return 0;
}

The code above produces a compilation error:

$ clang++ test.cpp
In file included from test.cpp:1:
In file included from /usr/local/include/blaze/Math.h:46:
In file included from /usr/local/include/blaze/math/Band.h:50:
In file included from /usr/local/include/blaze/math/views/Band.h:54:
/usr/local/include/blaze/math/expressions/Matrix.h:1033:14: error: no member named 'resize' in 'blaze::Submatrix<blaze::DynamicMatrix<double, false>, blaze::unaligned, false, true>'
   (*matrix).resize( m, n, preserve );
   ~~~~~~~~~ ^

The code above used to work in an older version of Blaze. I think it is reasonable to expect the same behavior of the resize() function for submatrices as for statically-sized matrices.

This issue might be related to #451.

Comments (6)

  1. Branimir Kovacevic

    Hey everyone (cc: @Klaus Iglberger ),

    Sorry for misusing this issue.

    Is there any reason why new issues cannot be created on this project, tried multiple accounts and networks but always ending up with:

    “We can't let you see this page” message 🤔

  2. Klaus Iglberger

    Dear Branimir!

    I’m have no idea why it is not possible anymore to create issues. I’ve not changed/modified the repo settings and for me they look correct. If the problem persists, I’ll have to officially complain to Atlassian. Thanks for letting me know,

    Best regards,

    Klaus!

  3. Klaus Iglberger

    Commits b738eab and d060359 fix the resizing of the submatrix. The fix is immediately available via cloning the Blaze repository and will be officially released in Blaze 3.9.

  4. Log in to comment