[GRASS-dev] r.in.xyz: really big ints
Hamish
hamish_b at yahoo.com
Fri Aug 29 18:27:09 EDT 2008
variables in the main loop that need looking at:
line, estimated_lines, count, count_total
line: at one point I use if(line % 10000 == 0), which I suspect would
prefer ints over FPs, and I'd like to keep that.
estimates_lines: is set to -1 when can't be estimated (data from stdin)
and thus is safely ignored if int has overflowed to a negative value.
So must remain signed or we need a new flag variable. The variable is
created with "estimated_lines = filesize / linesize;" where filesize
is off_t.
count, count_total just use ++ and += starting at 0.
G_alloc(rows*cols*sizeof(CELL)) is another thing, but unrelated to the
filesize so a matter for another thread & time.
If I change int to long and %d to %ld, life gets better on 64bit machines
but not 32bit machines -- they stay at 2^31-1.
If I use unsigned long int and %uld (does that exist?) would it mean we
can have 2^32-1 on 32bits and 2^64-1 on 64bits?
re. running times, r.in.xyz processing will be directly proportional to
the number of passes required. So it's not surprising that percent=50 (2 passes) is 10 times faster than percent=5 (20 passes).
I would not hold my breath for widespread 64bit MS Windows XP support
from commercial vendors. It is hard to justify spending effort porting
your drivers/software to a niche system which is already EOL'd, even if
current users demand it. At the same time I think people are dragging
their feet waiting to see what replaces Vista. (probably just a
superficial PR name change in 2009 for SP2, but who knows for sure?)
Hamish
More information about the grass-dev
mailing list