by rodney » Wed Sep 19, 2012 10:53 pm
Yana,
You are right, it would be a reasonable thing to check that KD were not too large for the specified N. The convention that LAPACK and BLAS uses for all of the banded matrix routines is to instead check that the leading dimension of the band matrix, LDAB in this case, is large enough for the specified number of bands. Internally, the routines then typically cut the band depth to be compatible with N if necessary. These routines, for example, internally use KDN = MIN( N-1, KD ) as the band size to ensure that N and KD are compatible.
Rodney