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