Provide GDB pretty-printing support for matrix and vector classes

Issue #303 resolved
Mikhail Katliar created an issue

It is convenient to be able to print Blaze matrices and vectors from a debugger.

Comments (4)

  1. Mikhail Katliar reporter

    I have implemented pretty-printing of StaticMatrix and DynamicMatrix in this pull request: https://bitbucket.org/blaze-lib/blaze/pull-requests/39

    Example:

    StaticMatrix<double, 2, 3, rowMajor> X1 {
        {1., 2., 3.},
        {4., 5., 6.}
    };
    

    gdb:

    p X1
    $1 = StaticMatrix<double, 2, 3, rowMajor> (data ptr: 0x7fffffffcca0) = {[0,0] = 1, [0,1] = 2, [0,2] = 3, [1,0] = 4, [1,1] = 5, [1,2] = 6}
    

    Also displayed nicely in VS Code:

  2. Mikhail Katliar reporter

    Implemented pretty printing for all dense and compressed vector and matrix classes.

  3. Log in to comment