📄 node88.html
字号:
<P>
</OL>
<P>
In order to support conversion of existing codes that rely on storage
and sequence association to HPF, the <tt> SEQUENCE</tt> directive is
<A NAME=11328> </A>
provided to request that storage and sequence association be enabled
for specified variables. Because this directive is intended only to
support conversion of existing Fortran 77 codes and is not directly
relevant to data-parallel programming, we do not discuss it further
here.
<P>
<H2><A NAME=SECTION03463000000000000000>7.6.3 HPF Features Not Covered</A></H2>
<P>
For simplicity, we have focused on a subset of the HPF language. In
particular, we have described most of the <em> HPF subset</em>, which is a
set of HPF constructs providing sufficient functionality to permit
development of useful programs, while avoiding difficult
implementation problems. Of necessity, numerous subtleties have been
omitted in this brief description, and the following HPF features have
not been covered at all.
<P>
<OL><LI>
<em> Templates</em>. The <tt> TEMPLATE</tt> directive allows a programmer to
<A NAME=11334> </A>
declare an abstract index space that can be distributed and used as an
<A NAME=11335> </A>
alignment target in the same way as an array can. This is useful when
several arrays must be aligned relative to each other, but there is no
need to define a single array that spans the entire index space of
interest.
<P>
<LI>
<A NAME=11336> </A>
<em> Mapping inquiry intrinsic functions.</em> These functions allow a
program to determine the actual mapping of an array to processors.
They are useful when the extrinsic function facility (described in
item 7 of this list) is used to call non-HPF subprograms.
<P>
<LI>
<em> <tt> FORALL</tt> construct.</em> This more general form of the <tt>
<A NAME=11339> </A>
FORALL</tt> statement can control multiple assignments, masked array
assignments, and nested <tt> FORALL</tt> statements and constructs. This
construct broadens the range of algorithms that can be expressed using
<tt> FORALL</tt>.
<P>
<LI>
<em> <tt> PURE</tt> procedures.</em> A function or subroutine declared to be <tt>
<A NAME=11343> </A>
PURE</tt> can be called in <tt> FORALL</tt> statements. A <tt> PURE</tt> function
<A NAME=11346> </A>
causes no side effects; that is, it does not perform I/O or modify
<A NAME=11347> </A>
dummy arguments or global data. A <tt> PURE</tt> subroutine may modify
arguments but not global variables. This facility broadens the range
of algorithms that can be expressed using the <tt> FORALL</tt> statement,
for example by allowing the same function to be applied to each row or
column of an array.
<P>
<LI>
<A NAME=11350> </A>
<em> Dynamic data distribution.</em> The executable directives <tt>
<A NAME=11352> </A>
REDISTRIBUTE</tt> and <tt> REALIGN</tt> can be used to modify the distribution
<A NAME=11354> </A>
and alignment of a data structure if that data structure is declared
<A NAME=11355> </A>
to have attribute <tt> DYNAMIC</tt>. The HPF compiler and runtime system
perform any data movement that may be required. This facility makes
it easier to use different distributions in different parts of a
computation, as discussed in Section <A HREF="node87.html#sechpfmod" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node87.html#sechpfmod">7.5</A>.
<P>
<LI>
<A NAME=itemx> </A>
<em> Computational library.</em> For each reduction operation in F90
(e.g., <tt> SUM</tt> and <tt> MAXVAL</tt>), HPF provides corresponding
combining scatter, parallel prefix, and parallel suffix operations
(e.g., <tt>
SUM_SCATTER</tt>, <tt> SUM_PREFIX</tt>, and <tt> SUM_SUFFIX</tt>). Functions
for
<A NAME=11365> </A>
sorting and for counting bits in an integer array are also provided.
<A NAME=11366> </A>
This computational library broadens the set of global operations
<A NAME=11367> </A>
available to the programmer. (The combining scatter operations allow
<A NAME=11368> </A>
elements of one array to be <em> scattered
</em> to the elements of
another array, under the control of index arrays. A <em> parallel
<A NAME=11370> </A>
prefix
</em> using an operation <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img980.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/img980.gif"> of a sequence <tt> X</tt>
yields a sequence <tt> Y</tt> of the same size, with each element <tt>
<A NAME=11374> </A>
Y(j) = <IMG BORDER=0 ALIGN=MIDDLE ALT="" SRC="img981.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/img981.gif">(X<IMG BORDER=0 ALIGN=MIDDLE ALT="" SRC="img982.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/img982.gif">)</tt>. That is, each element is a
<A NAME=11378> </A>
function of the preceding elements. A <em> parallel suffix
</em> is
<A NAME=11380> </A>
the same as a parallel prefix except that each element is a function of the elements that
follow it rather than those that precede it.)
<P>
<LI>
<em> Extrinsic functions.</em> HPF programs can call non-HPF procedures as
<A NAME=11382> </A>
extrinsic procedures. The non-HPF procedure is invoked on every
processor, and the local components of distributed arrays named in the
interface are passed as arguments. This facility can be used to
invoke MIMD procedures developed with message-passing systems such as
MPI.
<P>
</OL>
<P>
<BR> <HR><a href="msgs0.htm#2" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/tppmsgs/msgs0.htm#2"><img ALIGN=MIDDLE src="asm_color_tiny.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/asm_color_tiny.gif" alt="[DBPP]"></a> <A NAME=tex2html3012 HREF="node87.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node87.html"><IMG ALIGN=MIDDLE ALT="previous" SRC="previous_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/previous_motif.gif"></A> <A NAME=tex2html3020 HREF="node89.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node89.html"><IMG ALIGN=MIDDLE ALT="next" SRC="next_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/next_motif.gif"></A> <A NAME=tex2html3018 HREF="node82.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node82.html"><IMG ALIGN=MIDDLE ALT="up" SRC="up_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/up_motif.gif"></A> <A NAME=tex2html3022 HREF="node1.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node1.html"><IMG ALIGN=MIDDLE ALT="contents" SRC="contents_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/contents_motif.gif"></A> <A NAME=tex2html3023 HREF="node133.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node133.html"><IMG ALIGN=MIDDLE ALT="index" SRC="index_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/index_motif.gif"></A> <a href="msgs0.htm#3" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/tppmsgs/msgs0.htm#3"><img ALIGN=MIDDLE src="search_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/search_motif.gif" alt="[Search]"></a> <BR>
<B> Next:</B> <A NAME=tex2html3021 HREF="node89.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node89.html">7.7 Performance Issues</A>
<B>Up:</B> <A NAME=tex2html3019 HREF="node82.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node82.html">7 High Performance Fortran</A>
<B> Previous:</B> <A NAME=tex2html3013 HREF="node87.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node87.html">7.5 Dummy Arguments and Modularity</A>
<BR><HR><P>
<P><ADDRESS>
<I>© Copyright 1995 by <A href="msgs0.htm#6" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/tppmsgs/msgs0.htm#6">Ian Foster</a></I>
</ADDRESS>
</BODY>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -