4 ms·
I wonder if this is language or even compiler dependent. Are there things that transpose memory organization? I for one always get confused which index is the
by Swizec 10y ago
I wonder if this is language or even compiler dependent. Are there things that transpose memory organization?
I for one always get confused which index is the row and which is the column when coding. Every damn time I've done a 2D iteration in the last 15+ years. Is it [col][row] or [row][col] ...
I imagine it depends.
- yaantc 10y agoIndeed it does depend, some languages are row major (C, C++) while others are column major (Fortran, and some common HPC libraries are in Fortran). https://en.wikipedia.org/wiki/Row-_and_column-major_order https://en.wikipedia.org/wiki/Row-_and_column-major_order
- patrickdavey 10y agoI'm not alone!!!!!! :) I was having brain melting with today's http://adventofcode.com/2016/day/8 http://adventofcode.com/2016/day/8 I'm attempting everything in Elixir and it's quite different from what I'm used to!
- andrioni 10y ago>Are there things that transpose memory organization? Not exactly what you asked, but if you look at most subroutines in linear algebra libraries like LAPACK, they tend to have extra arguments so you can tell if your inputs are already transposed and/or conjugate in order to have more efficient memory access.