🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.cray
Article #275

Re: Storage of Fortran character strings on Cray

#275
From: Robert Hyatt
Date: Thu, 17 Dec 1992 03:35
39 lines
2289 bytes
In article <MRL.92Dec16094950@sun4.uai.com> mrl@uai.com (Mark R. Ludwig) writes:
>I'd appreciate information or pointers to information about how
>Fortran character strings are stored on Cray machines.  I have the
>impression that sometimes they are word-aligned, but I don't know how
>they then honor the X3.9-1978 standard which requires adjacency of
>elements of a character array.  Perhaps only the first element of the
>array is mandatorily aligned, and rest are also aligned only if the
>length of each element is an integer multiple of 8?
>

Every character variable I have used was aligned on a word boundary
since it usually follows some other data type.  I haven't tried
defining a bunch of char variables but would suspect that they are
separated by word alignment.  However, the characters within a char
variable are simply consecutive characters and not individually
aligned.  they are NOT reversed in order or anything silly like a
vax.

>Hopefully related enough to not need a separate post, can someone tell
>me what the addressability is of data on Cray machines?  What does the
>machine have to do to extract an arbitrary character from a string?
>

It has to load a word (64 bits), shift the character to the right end
and AND off the leftmost unwanted stuff.  There are no byte loads,
halfword loads, etc.  same for indexing.  Its all words.  you can
actually slow your code down by packing data like this.


>Thanks in advance.$$
>-- 
>INET: mrl@uai.com           NIC: ML255           ICBM: USA; Lower Left Coast
>"A computer is one of life's joys; it follows simple rules.  Just like
> children, adults need toys, only we like to call them 'tools.'" -- Dave Ross


-- 
!Robert Hyatt                    Computer and Information Sciences   !
!hyatt@cis.uab.edu               University of Alabama at Birmingham !
Technical Details
Message-ID: <1992Dec17.033540.7029@cis.uab.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!agate!netsys!ukma!nntp.msstate.edu!willis1.cis.uab.edu!hyatt
References: <MRL.92Dec16094950@sun4.uai.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.unix.cray
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!agate!netsys!ukma!nntp.msstate.edu!willis1.cis.uab.edu!hyatt
From: hyatt@cis.uab.edu (Robert Hyatt)
Subject: Re: Storage of Fortran character strings on Cray
Message-ID: <1992Dec17.033540.7029@cis.uab.edu>
Organization: University of Alabama at Birmingham
References: <MRL.92Dec16094950@sun4.uai.com>
Date: Thu, 17 Dec 1992 03:35:40 GMT
Lines: 39