At http://www.netlib.org/clapack/readme it is stated that
# In C, however, a twodimensional array is in rowmajor order. Further, the
# rows of a twodimensional C array need not be contiguous. The array #
# double A[LDA][N];
#
# actually has LDA pointers to rows of length N.
This is not at all true, at least in ANSI C. If LDA and N are
compiletime constants (as they must be in this syntax in ANSI C), the
resulting object is a continuous array of LDA*N doubles, in rowmajor
order of course, with the expression A[i][j] translated by the compiler
into something equivalent to (&A[0][0])[LDA*i+j].
It is of course a common approach in C to accommodate variablesize arrays
by declaring double **A=(double*)malloc(LDA*sizeof(double*)), and one has
an array of pointers that way. One could even have double *A[LDA] if LDA
were fixed but N might vary, or double (*A)[N] for the opposite case.
Perhaps not many people are misled by the documentation there, but it
could be of some importance that C's static 2dimensional arrays are
usable with LAPACK, even if they must be treated as transposed.
Thanks for the attention to this confusion,
Davis Herring
GRA, X3

This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because massenergy conversion has occurred during
shipping.
