4 ms·
Flipped through the language overview on the website and noticed that matrices are limited in how large they can be because they're stack allocated [1]. Ergono
by raoulj 2y ago
Flipped through the language overview on the website and noticed that matrices are limited in how large they can be because they're stack allocated [1]. Ergonomics of the language otherwise look solid but for my use case that would be fairly constraining
[1] https://odin-lang.org/docs/overview/#technical-information-of-matrix-types https://odin-lang.org/docs/overview/#technical-information-o...
- fuhsnn 2y agoLooks like this is implemented with LLVM's builtin matrix type, also available as a Clang extension: https://clang.llvm.org/docs/MatrixTypes.html https://clang.llvm.org/docs/MatrixTypes.html
- gingerBill 2y agoActually we implement it manually ourselves the exact same way that the extensions work. This is because we have to support multiple different versions of LLVM which don't have those extensions.
- fuhsnn 2y agoThanks for clarifying!
- amjoshuamichael 2y agoMatrices, like any other primitive data type, are stack-allocated. Do you want matrices to be allocated on the heap? If you're looking to do Pandas-style data science, you'd have to write your own implementation, where you could adjust for exactly how you want to do the multiplication. The builtin matrices are typically pretty small (~4x4 or 3x3), a very common use case in graphics or games programming.