Soeren Gebbert wrote: > In case we will use the meschach library within grass to replace the > existing LAPACK wrapper, my BLAS and solver implementation > and several numerical recipes algorithm (lu, eigenvalues solvers ...), i > will take the patched debian sources and integrate them into > grass. > > IMHO the following changes have to be made in the meschach library: > > * replacing malloc, calloc and realloc with the GRASS implementation
Not necessarily. The G_* versions are merely a convenience to avoid having to explicitly check for failure. If meschach is already performing the checking, there probably isn't much reason to change it. > * replacing printf and fprintf with the GRASS implementation GRASS doesn't have implementations of those functions. It has G_message() etc, which should be used for communicating with the user. > * changing the error handling to use G_fatal_error and similar GRASS > functions Probably, although this should be done in a minimal manner, e.g. making errors call a user-defined callback, and installing a callback which calls G_fatal_error(). > * adding the prefix G_math_ to all extern library functions (with > preprocessor directives) Why? Is there some reason why GRASS must "assimilate" meschach rather than simply using it (with any modifications which are strictly necessary). In particular, if any distributions provide a meschach package, it's generally preferable to use that rather than a private copy. -- Glynn Clements <gl...@gclements.plus.com> _______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev