[GRASS-user] grass wiki on RST troubleshooting
Markus Neteler
neteler at osgeo.org
Fri Feb 27 18:01:06 EST 2009
On Fri, Feb 27, 2009 at 9:17 PM, Maris Nartiss <maris.gis at gmail.com> wrote:
> Sorry for interuption, but I could not find place where in v.surf.rst
> MAXPOINTS is used for anything else than printing a warning. URL to
> line in SVN? If I'm correct, no need to recompile anything.
[neteler at localhost vector]$ grep MAXPOINTS v.*rst/* | grep define
v.surf.rst/surf.h:#define MAXPOINTS 400
v.vol.rst/surf.h:#define MAXPOINTS 700
grep MAXPOINTS v.*rst/* | grep '='
v.surf.rst/main.c: KMAX2 = 2 * npmin; /* was: KMAX2 =
MAXPOINTS; fixed by JH in 12/01 */
v.surf.rst/main.c: KMAX2 = MAXPOINTS;
v.vol.rst/main.c: KMAX2 = MAXPOINTS;
v.vol.rst/user1.c: if (NPOINT > MAXPOINTS && KMIN <= KMAX) {
v.vol.rst/user1.c: if (NPOINT < MAXPOINTS && KMAX != MAXPOINTS)
You see that MAXPOINTS is assigned to KMAX2 and
then used.
Here at Trento, we are currently trying to see how to
- either dynamically define MAXPOINTS/KMAX2
- or minimize the overhead while maximising MAXPOINTS.
The problem is:
grep malloc v.*rst/* | grep KMAX2
v.vol.rst/user2.c: /* if(!(point=(struct
point_3d*)G_malloc(sizeof(struct point_3d)*(KMAX2+1))))
v.vol.rst/user2.c: if (!(b = (double
*)G_malloc(sizeof(double) * (KMAX2 + 2)))) {
v.vol.rst/user2.c: if (!(w = (double
*)G_malloc(sizeof(double) * (KMAX2 + 1)))) {
v.vol.rst/user3.c: if (!(w2 = (double *)G_malloc(sizeof(double) *
(KMAX2 + 1))))
v.vol.rst/user3.c: if (!(wz2 = (double *)G_malloc(sizeof(double)
* (KMAX2 + 1))))
v.vol.rst/user3.c: if (!(wz1 = (double *)G_malloc(sizeof(double)
* (KMAX2 + 1))))
The KMAX2 is directly linked to G_malloc() so that can cannot easily
set it to a high number.
More to be studied here...
Markus
More information about the grass-user
mailing list