4 ms·
Fortran has the matmul intrinsic function, and you can define an operator .x. so that a .x. b is equivalent to matmul(a,b). APL, J, and K are not unique in bein
by Bostonian 3y ago
Fortran has the matmul intrinsic function, and you can define an operator .x. so that a .x. b is equivalent to matmul(a,b). APL, J, and K are not unique in being able to express linear algebra operations concisely.
- pklausler 3y agoYou can’t define a generic interface in terms of another generic interface in Fortran. To do what you suggest in actual Fortran, you would have to write specific functions for all the combinations of data types and ranks supported by MATMUL (hundreds).