Git Product home page Git Product logo

Comments (2)

giaf avatar giaf commented on June 11, 2024

Hi, at the moment there are no matrix norms implemented, but only the infinity norm for vectors.

No you can't access the first m*n doubles in the memory, as the actual matrix storage is implementation-dependent.
If you use the column-major matrix format, the matrix is stored one column after the other but there may be some padding after each column for better alignment to memory boundaries.
If you use the panel-major matrix format, the layout is more complicated, and something like block-row-major with column-major within each block-row, plus padding again.

My suggestion would be to use the macro BLASFEO_DMATEL(sA, ai, aj) which gives you access to an element in a matrix structure regardless of its specific implementation, as there is a different version of this macro for each matrix format, see e.g.
https://github.com/giaf/blasfeo/blob/master/include/blasfeo_common.h#L112
https://github.com/giaf/blasfeo/blob/master/include/blasfeo_common.h#L159
In this way you don't have to worry about the specific matrix format, and the macro is also faster than the function call you mentioned.
As a final suggestion, for performance reasons I would suggest to access the matrix by columns, as this would give a good degree of data locality in both panel- and column-major formats.

from blasfeo.

markisus avatar markisus commented on June 11, 2024

Very helpful, thank you!

from blasfeo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.