unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Uniform vector lengths -- how long?
@ 2004-06-20 21:00 Rob Browning
  2004-06-20 23:26 ` Kevin Ryde
  0 siblings, 1 reply; 7+ messages in thread
From: Rob Browning @ 2004-06-20 21:00 UTC (permalink / raw)



Right now the srfi-4 code stores the length of uniform vectors in
SCM_CELL_WORD_2, and sometimes retrieves these lengths directly into
an int:

  #define SCM_UVEC_LENGTH(u) (SCM_CELL_WORD_2(u))
  ...
  int i = SCM_UVEC_LENGTH (uvec);

which is probably wrong for architectures where sizeof(int) <
sizeof(long), and in all cases, limits array sizes to 2GB.  Other code
uses SCM_VALIDATE_INUM to check the lengths given to "make-FOOvector",
which limits the maximum array size even further.

So the thing I'm wondering about is how do we want our uniform vectors
to behave?  Is it OK for their lengths to be limited to a fixnum?
What if someone wants to allocate a multi-GB s8 array on a 64-bit
machine, or a much smaller, but still larger than fixnum array on a
32-bit machine?

-- 
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592  F9A0 25C8 D377 8C7E 73A4


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-08-04 14:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-20 21:00 Uniform vector lengths -- how long? Rob Browning
2004-06-20 23:26 ` Kevin Ryde
2004-06-21  5:37   ` Rob Browning
2004-07-10  0:41     ` Kevin Ryde
2004-07-12 15:04       ` Rob Browning
2004-07-22  1:20         ` Kevin Ryde
2004-08-04 14:37           ` Rob Browning

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).