Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!ns-mx!ccad.uiowa.edu!cadsi From: cadsi@ccad.uiowa.edu (CADSI) Newsgroups: comp.lang.c++ Subject: Re: 64 bit architectures and C/C++ Message-ID: <1991May1.163446.20707@ccad.uiowa.edu> Date: 1 May 91 16:34:46 GMT References: <13261@goofy.Apple.COM> Organization: CAD-Research, U. of Iowa, Iowa City, Iowa Lines: 33 From article <13261@goofy.Apple.COM>, by turk@Apple.COM (Ken "Turk" Turkowski): > jac@gandalf.llnl.gov (James A. Crotinger) writes: > > >> Anyone want to comment on experiences with Crays? I believe the C >>compilers have sizeof(int) = sizeof(short) = sizeof(long) == 46 or 64 >>bits, depending on a compile time flag (Crays can do 46 bit integer >>arithmetic using the vectorizing floating point processors, so that is >>the default). > >> Binary communications between Crays and other computers is something >>I haven't done, mostly because Cray doesn't support IEEE floating point. > > Crays are a pain. Structures are padded to 64 bits, so you waste a lot > of memory in arrays if your structures only have 16 bits. > > I thought the number was 48 bits, but you might be right. I seem to recall > that logical operations couldn't work with 64 bits, but arithmetic operations > could, or vice versa. >... to further these comments note that on a CRAY, a (char *) is a bit-packed structure itself. In particular, the lower 48 bits are a pointer to the word in memory where the character exists. The top 3 bits of the 64-bit pointer are an index to the byte of the word of the actual character. Thus, an (int *) cannot be conveniently cast to a (char *). I hate it when that happens. |----------------------------------------------------------------------------| |Tom Hite | The views expressed by me | |Manager, Product development | are mine, not necessarily | |CADSI (Computer Aided Design Software Inc. | the views of CADSI. | |----------------------------------------------------------------------------|