Re: OT: size_t and 64 bits



  
  Thanks all, size_t definitely sounds like the tool for the job in my
case.
  
  I'm working with huge arrays of integers, which are sort-indexes to
arrays of xyz points (sonar data).  My programs run on both intel and SGI
boxes, with the SGI's eventually going to 64-bit.
  Using an array of 64-bit indexes on intel would be a waste of space
(and maybe slower too, AFAIK). 
  But on the other hand 32-bit indexing on the SGI would be limiting,
especially as I use the same numbers for database indexing too.
  So if size_t scales, size_t is the ticket...
  
>>  
That's not the case on the Alpha.  int's are 32 bits, long's are 64.
<<
  This complication makes me think I should define everything in my main
header file so it's easy to change globally if I'm wrong:

#define int32 long
#define int64 long long int

/*  "sysint" would therefore be the scalable type, defined by whatever
the system bus size is. Not exactly like the clumsy code below, but you
get the idea... */
#ifdef INTEL
#define sysint int32
#endif
#ifdef SGI
#define sysint int64
#endif

  Thanks, (and back to our regularly scheduled topic!)
  John
  

___________________________________________________________________
Get the Internet just the way you want it.
Free software, free e-mail, and free Internet access for a month!
Try Juno Web: http://dl.www.juno.com/dynoget/tagj.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]