News for hackers. Stuff that matters.
Re:Why physicists still use Fortran by kmill on Monday December 19, 2016 @12:24AM (#13209636)
In C, I've seen people do "multidimensional arrays" by A[n * i + j], with A a double[m * n], rather than by arrays of arrays. Especially if the array is being passed as a parameter, and the array's dimensions are given by other arguments, and the array is to be used with BLAS.
Re:Why physicists still use Fortran by Animats on Tuesday December 20, 2016 @03:50AM (#13218393)
Is the compiler smart enough to do strength reduction and get rid of the multiply when indexing? FORTRAN compilers have been doing that for multidimensional arrays since 1954.