TREX-CoE / trexio

TREX I/O library
https://trex-coe.github.io/trexio/
BSD 3-Clause "New" or "Revised" License
49 stars 14 forks source link

Added both row-major and column-major representations in documentation. #143

Closed scemama closed 8 months ago

scemama commented 8 months ago

This should prevent having issues such as #127 and #142.

q-posev commented 8 months ago

@scemama thanks, indeed, that would make things clear!

Should we mention that all languages (C, Python, Rust) except Fortran (not sure about Julia though) are row-major?

scemama commented 8 months ago

I would prefer not. For example, OCaml has both row- or column-major possibilites with Bigarrays. Same for Numpy in Python: with an option you can change to column major. Also, if you use BLAS in C, as BLAS is written in Fortran it stays column-major. But if you use CBlas, it is row-major. So I would not make a generality and let the users check what ordering they should use.