home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / cray / 327 < prev    next >
Encoding:
Text File  |  1992-12-16  |  2.2 KB  |  50 lines

  1. Newsgroups: comp.unix.cray
  2. Path: sparky!uunet!spool.mu.edu!agate!netsys!ukma!nntp.msstate.edu!willis1.cis.uab.edu!hyatt
  3. From: hyatt@cis.uab.edu (Robert Hyatt)
  4. Subject: Re: Storage of Fortran character strings on Cray
  5. Message-ID: <1992Dec17.033540.7029@cis.uab.edu>
  6. Organization: University of Alabama at Birmingham
  7. References: <MRL.92Dec16094950@sun4.uai.com>
  8. Date: Thu, 17 Dec 1992 03:35:40 GMT
  9. Lines: 39
  10.  
  11. In article <MRL.92Dec16094950@sun4.uai.com> mrl@uai.com (Mark R. Ludwig) writes:
  12. >I'd appreciate information or pointers to information about how
  13. >Fortran character strings are stored on Cray machines.  I have the
  14. >impression that sometimes they are word-aligned, but I don't know how
  15. >they then honor the X3.9-1978 standard which requires adjacency of
  16. >elements of a character array.  Perhaps only the first element of the
  17. >array is mandatorily aligned, and rest are also aligned only if the
  18. >length of each element is an integer multiple of 8?
  19. >
  20.  
  21. Every character variable I have used was aligned on a word boundary
  22. since it usually follows some other data type.  I haven't tried
  23. defining a bunch of char variables but would suspect that they are
  24. separated by word alignment.  However, the characters within a char
  25. variable are simply consecutive characters and not individually
  26. aligned.  they are NOT reversed in order or anything silly like a
  27. vax.
  28.  
  29. >Hopefully related enough to not need a separate post, can someone tell
  30. >me what the addressability is of data on Cray machines?  What does the
  31. >machine have to do to extract an arbitrary character from a string?
  32. >
  33.  
  34. It has to load a word (64 bits), shift the character to the right end
  35. and AND off the leftmost unwanted stuff.  There are no byte loads,
  36. halfword loads, etc.  same for indexing.  Its all words.  you can
  37. actually slow your code down by packing data like this.
  38.  
  39.  
  40. >Thanks in advance.$$
  41. >-- 
  42. >INET: mrl@uai.com           NIC: ML255           ICBM: USA; Lower Left Coast
  43. >"A computer is one of life's joys; it follows simple rules.  Just like
  44. > children, adults need toys, only we like to call them 'tools.'" -- Dave Ross
  45.  
  46.  
  47. -- 
  48. !Robert Hyatt                    Computer and Information Sciences   !
  49. !hyatt@cis.uab.edu               University of Alabama at Birmingham !
  50.