On Tue, Oct 6, 2015 at 12:26 PM, Glynn Clements <[email protected]> wrote:
> > Markus Neteler wrote: > > > >> Sorry for being -pedantic but I don't think we should leave the code > > >> messy. > > > > > > +1 > > > > Then it needs to be removed everywhere here: > > > > cd grass-addons > > find . -type f | grep -v pristin | xargs grep 'la.h>' > > ./grass6/imagery/i.spec.unmix/global.h:#include <grass/la.h> > > ./grass6/imagery/i.spec.unmix/la_extra.c:#include <grass/la.h> > > ./grass6/imagery/i.spec.grass63/include/gmath.h:#include <grass/la.h> > > ./grass6/imagery/i.spec.grass63/lib/gmath/la.c:#include <grass/la.h> > > ./grass7/imagery/i.spec.unmix/global.h:#include <grass/la.h> > > ./grass7/vector/v.kriging/local_proto.h:#include <grass/la.h> > > Sorry for joining in late, but from my understanding of the code, it > seems that the inclusion of <grass/la.h> should be in the modules, not > in <grass/gmath.h>. > > <grass/gmath.h> defines a number of macros plus the G_math_spvector > type. It then includes <grass/defs/gmath.h> which contains a number of > function declarations, some of which use G_math_spvector in their > return or parameter types. > > <grass/gmath.h> also includes <grass/la.h>, but doesn't depend upon > anything defined in that header. If the include of <grass/la.h> is > removed, compiling a source file containing only > > #include <grass/gmath.h> > > succeeds. Consequently, there is no need for <grass/gmath.h> to > include <grass/la.h>. > > Having one header for "base" functionality which is always available > and another for additional functionality which is only available when > GRASS was built with BLAS/LAPACK support seems cleaner than having a > single header expose both, particularly when the two have already been > separated. > > Additionally, requiring individual modules to include <grass/la.h> > explicitly would make it clear when code depends upon BLAS/LAPACK. > I agree. I was not able to determine from svn why gmath.h contains la.h. > -- > Glynn Clements <[email protected]> > _______________________________________________ > grass-dev mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/grass-dev >
_______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
