12.07.2015 Views

PGI Fortran - Servidor WWW del Cluster Ladon-Hidra

PGI Fortran - Servidor WWW del Cluster Ladon-Hidra

PGI Fortran - Servidor WWW del Cluster Ladon-Hidra

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

EQUIVALENCE 77The EQUIVALENCE statement allows two or more named regions of data memory to share thesame start address. Arrays that are subject to the EQUIVALENCE statement in HPF are treated assequential and any attempt at non-replicated data distribution or mapping is ignored for sucharrays.SyntaxEQUIVALENCE (list)[,(list)...]listis a set of identifiers (variables, arrays or array elements) which are tobe associated with the same address in data memory. The items in a listare separated by commas, and there must be at least two items in eachlist. When an array element is chosen, the subscripts must be integerconstants or integer PARAMETER constants.DescriptionThe statement can be used to make a single region of data memory have different types, so that forinstance the imaginary part of a complex number can be treated as a real value. It can also be usedto make arrays overlap, so that the same region of store can be dimensioned in several differentways. Records and record fields cannot be specified in EQUIVALENCE statements.Syntax Extension§An array element may be identified with a single subscript in an EQUIVALENCE statement eventhough the array is defined to be a multidimensional array. Also, EQUIVALENCE of characterand non-character data is allowed as long as misalignment of non-character data does not occur.ExampleCOMPLEX NUMREAL QWER(2)EQUIVALENCE (NUM,QWER(1))In the above example, QWER(1) is the real part of NUM and QWER(2) is the imaginary part.EQUIVALENCE statements are illegal if there is any attempt to make a mapping of data memoryinconsistent with its linear layout.EXIT 90The EXIT statement interrupts a DO construct execution and continues with the next statementafter the loop.88 Chapter 3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!