Manual Patch: Use Standard DocBook Tags
Jeffrey D . Oldham
oldham at codesourcery.com
Wed Jan 30 23:54:45 UTC 2002
2002-Jan-30 Jeffrey D. Oldham <oldham at codesourcery.com>
Before this change, the POOMA manual used non-standard tags to describe
programming language features: <statement>, <keywordname>, <methodname>,
<operator>. Since these are not standard, we replace them with <literal>,
losing information. :(
* arrays.xml: Replace <statement>, <keywordname>, <methodname>, and
<operator> with <literal>.
* concepts.xml: Likewise.
* data-parallel.xml: Likewise.
* glossary.xml: Likewise.
* introduction.xml: Likewise.
* manual.xml: Likewise.
* template.xml: Likewise.
* tutorial.xml: Likewise.
Applied to mainline.
Thanks,
Jeffrey D. Oldham
oldham at codesourcery.com
-------------- next part --------------
Index: arrays.xml
===================================================================
RCS file: /home/pooma/Repository/r2/docs/manual/arrays.xml,v
retrieving revision 1.6
diff -c -p -r1.6 arrays.xml
*** arrays.xml 2002/01/30 23:09:06 1.6
--- arrays.xml 2002/01/30 23:47:30
***************
*** 79,85 ****
objects<firstterm></firstterm></glossterm> so they can be used
more easily than built-in &cc; arrays. For example, &array;s can
be used as operands and in assignment statements. The statement
! <statement>a = a + b;</statement> adds corresponding values of
&array;s <varname>a</varname> and <varname>b</varname>, assigning
the sums to the &array; <varname>a</varname>. The statement
treats each array as an object, rather than requiring the use of
--- 79,85 ----
objects<firstterm></firstterm></glossterm> so they can be used
more easily than built-in &cc; arrays. For example, &array;s can
be used as operands and in assignment statements. The statement
! <literal>a = a + b;</literal> adds corresponding values of
&array;s <varname>a</varname> and <varname>b</varname>, assigning
the sums to the &array; <varname>a</varname>. The statement
treats each array as an object, rather than requiring the use of
***************
*** 87,94 ****
statements such as this are further discussed in <xref
linkend="data_parallel"></xref>. &array;s also handle their own
memory allocation and deallocation. For example, the &array;
! declaration <statement>Array<2, double, Brick>
! a(vertDomain)</statement> creates an
&array; <varname>a</varname>, allocating whatever memory it
needs. When <varname>a</varname> goes out of scope, it and its
memory are automatically deallocated. Automatic memory allocation
--- 87,94 ----
statements such as this are further discussed in <xref
linkend="data_parallel"></xref>. &array;s also handle their own
memory allocation and deallocation. For example, the &array;
! declaration <literal>Array<2, double, Brick>
! a(vertDomain)</literal> creates an
&array; <varname>a</varname>, allocating whatever memory it
needs. When <varname>a</varname> goes out of scope, it and its
memory are automatically deallocated. Automatic memory allocation
***************
*** 96,102 ****
<para>Individual &array; values can be accessed using parentheses,
not square brackets, as for &cc; arrays. For example,
! <statement>a(3,4)</statement> yields the value at position (3,4)
of <varname>a</varname>'s two-dimensional domain.</para>
</section>
--- 96,102 ----
<para>Individual &array; values can be accessed using parentheses,
not square brackets, as for &cc; arrays. For example,
! <literal>a(3,4)</literal> yields the value at position (3,4)
of <varname>a</varname>'s two-dimensional domain.</para>
</section>
***************
*** 179,188 ****
<para>All the &domain; categories listed above except &grid; can
be represented using domain triplet notation. Since the triplet
[7:7:1] represents {7}, or more simply 7, it can also
! represent the one-dimensional <statement>Loc<1>(7)</statement>.
Multidimensional &loc;s are similarly represented. For example,
[0:0:1,10:10:1,2:2:1] represents
! <statement>Loc<3>(0,10,2)</statement>, but it is frequently
abbreviated as [0,10,2]. An &interval; [a,b] has unit stride:
[a:b:1], while a ⦥ has specific stride s, e.g.,
[a:b:s].</para>
--- 179,188 ----
<para>All the &domain; categories listed above except &grid; can
be represented using domain triplet notation. Since the triplet
[7:7:1] represents {7}, or more simply 7, it can also
! represent the one-dimensional <literal>Loc<1>(7)</literal>.
Multidimensional &loc;s are similarly represented. For example,
[0:0:1,10:10:1,2:2:1] represents
! <literal>Loc<3>(0,10,2)</literal>, but it is frequently
abbreviated as [0,10,2]. An &interval; [a,b] has unit stride:
[a:b:1], while a ⦥ has specific stride s, e.g.,
[a:b:s].</para>
***************
*** 192,199 ****
&interval; is the direct product of two one-dimensional
&interval;s, it can be specified using two one-dimensional
&interval;s. For example,
! <statement>Interval<2>(Interval<1>(2,3),
! Interval<1>(4,5))</statement> creates a [2:3:1,4:5:1]
&domain;. The resulting dimensionality equals the sum of the
components' dimensions. For example, a four-dimension &loc; can
be specified using three- and one-dimension &loc;s or using four
--- 192,199 ----
&interval; is the direct product of two one-dimensional
&interval;s, it can be specified using two one-dimensional
&interval;s. For example,
! <literal>Interval<2>(Interval<1>(2,3),
! Interval<1>(4,5))</literal> creates a [2:3:1,4:5:1]
&domain;. The resulting dimensionality equals the sum of the
components' dimensions. For example, a four-dimension &loc; can
be specified using three- and one-dimension &loc;s or using four
***************
*** 206,217 ****
different types. A &loc; object can be constructed from other
&loc; objects and integers. &interval;s, ⦥s, and &grid;s
can be constructed using any of these types, &loc;s, and integers.
! For example, <statement>Interval<3> a(Loc<2>(1,2),
! Interval<1>(3,5))</statement> uses a two-dimensional &loc;
and a one-dimensional &interval; to create a [1:1:1,2:2:1,3:5:1]
&domain;. During creation of a &domain;, the type of each object
is changed to the &domain;'s type. In the example,
! <statement>Loc<2>(1,2)</statement> is first converted to an
&interval;.</para>
<para>&domain;s can participate in some arithmetic and comparison
--- 206,217 ----
different types. A &loc; object can be constructed from other
&loc; objects and integers. &interval;s, ⦥s, and &grid;s
can be constructed using any of these types, &loc;s, and integers.
! For example, <literal>Interval<3> a(Loc<2>(1,2),
! Interval<1>(3,5))</literal> uses a two-dimensional &loc;
and a one-dimensional &interval; to create a [1:1:1,2:2:1,3:5:1]
&domain;. During creation of a &domain;, the type of each object
is changed to the &domain;'s type. In the example,
! <literal>Loc<2>(1,2)</literal> is first converted to an
&interval;.</para>
<para>&domain;s can participate in some arithmetic and comparison
***************
*** 293,317 ****
</tfoot>
<tbody valign="top">
<row>
! <entry><statement>Loc<1>()</statement></entry>
<entry>indicates zero.</entry>
</row>
<row>
! <entry><statement>Loc<1>(const Pooma::NoInit& no)</statement></entry>
<entry>creates an uninitialized &locone;, to be assigned a value later.</entry>
</row>
<row>
! <entry><statement>Loc<1>(const &domaintemplate;1& t1)</statement></entry>
<entry>creates a &locone; with the integer converted from <varname>t1</varname>.</entry>
</row>
<row>
! <entry><statement>Loc<1>(const &domaintemplate;1& t1, const &domaintemplate;2& t2)</statement></entry>
<entry>creates a &locone; with the integer converted from
<varname>t1</varname>. <varname>t2</varname> must equal
<varname>t1</varname>.</entry>
</row>
<row>
! <entry><statement>Loc<1>(const &domaintemplate;1& t1, const &domaintemplate;2& t2, const &domaintemplate;3& t3)</statement></entry>
<entry>creates a &locone; with the integer converted from
<varname>t1</varname>. <varname>t2</varname> must equal
<varname>t1</varname>, and <varname>t3</varname> is
--- 293,317 ----
</tfoot>
<tbody valign="top">
<row>
! <entry><literal>Loc<1>()</literal></entry>
<entry>indicates zero.</entry>
</row>
<row>
! <entry><literal>Loc<1>(const Pooma::NoInit& no)</literal></entry>
<entry>creates an uninitialized &locone;, to be assigned a value later.</entry>
</row>
<row>
! <entry><literal>Loc<1>(const &domaintemplate;1& t1)</literal></entry>
<entry>creates a &locone; with the integer converted from <varname>t1</varname>.</entry>
</row>
<row>
! <entry><literal>Loc<1>(const &domaintemplate;1& t1, const &domaintemplate;2& t2)</literal></entry>
<entry>creates a &locone; with the integer converted from
<varname>t1</varname>. <varname>t2</varname> must equal
<varname>t1</varname>.</entry>
</row>
<row>
! <entry><literal>Loc<1>(const &domaintemplate;1& t1, const &domaintemplate;2& t2, const &domaintemplate;3& t3)</literal></entry>
<entry>creates a &locone; with the integer converted from
<varname>t1</varname>. <varname>t2</varname> must equal
<varname>t1</varname>, and <varname>t3</varname> is
***************
*** 360,405 ****
</tfoot>
<tbody valign="top">
<row>
! <entry><statement>Loc<&dim;>()</statement></entry>
<entry>indicates zero.</entry>
</row>
<row>
! <entry><statement>Loc<&dim;>(const Pooma::NoInit& no)</statement></entry>
<entry>creates an uninitialized &loc;, to be assigned a value later.</entry>
</row>
<row>
! <entry><statement>Loc<&dim;>(const &domaintemplate;1& t1)</statement></entry>
<entry>creates a &loc; using the given &domain; object.</entry>
</row>
<row>
! <entry><statement>Loc<&dim;>(const &domaintemplate;1& t1, const &domaintemplate;2& t2)</statement></entry>
<entry>creates a &loc; using the given &domain; objects.</entry>
</row>
<row>
! <entry><statement>Loc<&dim;>(const &domaintemplate;1& t1, const &domaintemplate;2& t2, const &domaintemplate;3& t3)</statement></entry>
<entry>creates a &loc; using the given &domain; objects.</entry>
</row>
<row>
! <entry><statement>Loc<&dim;>(const &domaintemplate;1& t1, const
! &domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4)</statement></entry>
<entry>creates a &loc; using the given &domain; objects.</entry>
</row>
<row>
! <entry><statement>Loc<&dim;>(const &domaintemplate;1& t1, const
&domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4, const &domaintemplate;5&
! t5)</statement></entry>
<entry>creates a &loc; using the given &domain; objects.</entry>
</row>
<row>
! <entry><statement>Loc<&dim;>(const &domaintemplate;1& t1, const
&domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4, const &domaintemplate;5&
! t5, const &domaintemplate;6& t6)</statement></entry>
<entry>creates a &loc; using the given &domain; objects.</entry>
</row>
<row>
! <entry><statement>Loc<&dim;>(const &domaintemplate;1& t1, const
&domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4, const &domaintemplate;5&
! t5, const &domaintemplate;6& t6, const &domaintemplate;7& t7)</statement></entry>
<entry>creates a &loc; using the given &domain; objects.</entry>
</row>
</tbody>
--- 360,405 ----
</tfoot>
<tbody valign="top">
<row>
! <entry><literal>Loc<&dim;>()</literal></entry>
<entry>indicates zero.</entry>
</row>
<row>
! <entry><literal>Loc<&dim;>(const Pooma::NoInit& no)</literal></entry>
<entry>creates an uninitialized &loc;, to be assigned a value later.</entry>
</row>
<row>
! <entry><literal>Loc<&dim;>(const &domaintemplate;1& t1)</literal></entry>
<entry>creates a &loc; using the given &domain; object.</entry>
</row>
<row>
! <entry><literal>Loc<&dim;>(const &domaintemplate;1& t1, const &domaintemplate;2& t2)</literal></entry>
<entry>creates a &loc; using the given &domain; objects.</entry>
</row>
<row>
! <entry><literal>Loc<&dim;>(const &domaintemplate;1& t1, const &domaintemplate;2& t2, const &domaintemplate;3& t3)</literal></entry>
<entry>creates a &loc; using the given &domain; objects.</entry>
</row>
<row>
! <entry><literal>Loc<&dim;>(const &domaintemplate;1& t1, const
! &domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4)</literal></entry>
<entry>creates a &loc; using the given &domain; objects.</entry>
</row>
<row>
! <entry><literal>Loc<&dim;>(const &domaintemplate;1& t1, const
&domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4, const &domaintemplate;5&
! t5)</literal></entry>
<entry>creates a &loc; using the given &domain; objects.</entry>
</row>
<row>
! <entry><literal>Loc<&dim;>(const &domaintemplate;1& t1, const
&domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4, const &domaintemplate;5&
! t5, const &domaintemplate;6& t6)</literal></entry>
<entry>creates a &loc; using the given &domain; objects.</entry>
</row>
<row>
! <entry><literal>Loc<&dim;>(const &domaintemplate;1& t1, const
&domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4, const &domaintemplate;5&
! t5, const &domaintemplate;6& t6, const &domaintemplate;7& t7)</literal></entry>
<entry>creates a &loc; using the given &domain; objects.</entry>
</row>
</tbody>
***************
*** 418,425 ****
to a multidimensional &domain; object that itself can be converted
into a &loc;. The total dimensionality of all the arguments'
types should be at most <varname>&dim;</varname>. For example,
! <statement>Loc<5>(Range<1>(2,2,2), Loc<2>(2,3),
! Interval<1>(4,4))</statement> creates a five-dimensional &loc;
[2,2,3,4,1] using a one-dimensional ⦥, a two-dimensional
&loc;, and a one-dimensional &interval;. The final fifth
dimension has an unspecified value, in this case 1. The
--- 418,425 ----
to a multidimensional &domain; object that itself can be converted
into a &loc;. The total dimensionality of all the arguments'
types should be at most <varname>&dim;</varname>. For example,
! <literal>Loc<5>(Range<1>(2,2,2), Loc<2>(2,3),
! Interval<1>(4,4))</literal> creates a five-dimensional &loc;
[2,2,3,4,1] using a one-dimensional ⦥, a two-dimensional
&loc;, and a one-dimensional &interval;. The final fifth
dimension has an unspecified value, in this case 1. The
***************
*** 466,489 ****
</tfoot>
<tbody valign="top">
<row>
! <entry><statement>Interval<1>()</statement></entry>
<entry>creates an empty, uninitialized interval.</entry>
</row>
<row>
! <entry><statement>Interval<1>(const Pooma::NoInit& no)</statement></entry>
<entry>creates an uninitialized &intervalone;, to be assigned a value later.</entry>
</row>
<row>
! <entry><statement>Interval<1>(const &domaintemplate;1& t1)</statement></entry>
<entry>creates an &intervalone;. See the text for an explanation.</entry>
</row>
<row>
! <entry><statement>Interval<1>(const &domaintemplate;1& t1, const &domaintemplate;2& t2)</statement></entry>
<entry>creates an &intervalone; with the integers converted from
<varname>t1</varname> and <varname>t2</varname>.</entry>
</row>
<row>
! <entry><statement>Interval<1>(const &domaintemplate;1& t1, const &domaintemplate;2& t2, const &domaintemplate;3& t3)</statement></entry>
<entry>creates an &intervalone; with the integers converted from
<varname>t1</varname> and <varname>t2</varname>.
<varname>t3</varname> must equal 1.</entry>
--- 466,489 ----
</tfoot>
<tbody valign="top">
<row>
! <entry><literal>Interval<1>()</literal></entry>
<entry>creates an empty, uninitialized interval.</entry>
</row>
<row>
! <entry><literal>Interval<1>(const Pooma::NoInit& no)</literal></entry>
<entry>creates an uninitialized &intervalone;, to be assigned a value later.</entry>
</row>
<row>
! <entry><literal>Interval<1>(const &domaintemplate;1& t1)</literal></entry>
<entry>creates an &intervalone;. See the text for an explanation.</entry>
</row>
<row>
! <entry><literal>Interval<1>(const &domaintemplate;1& t1, const &domaintemplate;2& t2)</literal></entry>
<entry>creates an &intervalone; with the integers converted from
<varname>t1</varname> and <varname>t2</varname>.</entry>
</row>
<row>
! <entry><literal>Interval<1>(const &domaintemplate;1& t1, const &domaintemplate;2& t2, const &domaintemplate;3& t3)</literal></entry>
<entry>creates an &intervalone; with the integers converted from
<varname>t1</varname> and <varname>t2</varname>.
<varname>t3</varname> must equal 1.</entry>
***************
*** 532,577 ****
</tfoot>
<tbody valign="top">
<row>
! <entry><statement>Interval<&dim;>()</statement></entry>
<entry>creates an empty, uninitialized &interval;, to be assigned a value later.</entry>
</row>
<row>
! <entry><statement>Interval<&dim;>(const Pooma::NoInit& no)</statement></entry>
<entry>creates an empty, uninitialized &interval;, to be assigned a value later.</entry>
</row>
<row>
! <entry><statement>Interval<&dim;>(const &domaintemplate;1& t1)</statement></entry>
<entry>creates an &interval; using the given &domain; object.</entry>
</row>
<row>
! <entry><statement>Interval<&dim;>(const &domaintemplate;1& t1, const &domaintemplate;2& t2)</statement></entry>
<entry>creates an &interval; using the given &domain; objects.</entry>
</row>
<row>
! <entry><statement>Interval<&dim;>(const &domaintemplate;1& t1, const &domaintemplate;2& t2, const &domaintemplate;3& t3)</statement></entry>
<entry>creates an &interval; using the given &domain; objects.</entry>
</row>
<row>
! <entry><statement>Interval<&dim;>(const &domaintemplate;1& t1, const
! &domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4)</statement></entry>
<entry>creates an &interval; using the given &domain; objects.</entry>
</row>
<row>
! <entry><statement>Interval<&dim;>(const &domaintemplate;1& t1, const
&domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4, const &domaintemplate;5&
! t5)</statement></entry>
<entry>creates an &interval; using the given &domain; objects.</entry>
</row>
<row>
! <entry><statement>Interval<&dim;>(const &domaintemplate;1& t1, const
&domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4, const &domaintemplate;5&
! t5, const &domaintemplate;6& t6)</statement></entry>
<entry>creates an &interval; using the given &domain; objects.</entry>
</row>
<row>
! <entry><statement>Interval<&dim;>(const &domaintemplate;1& t1, const
&domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4, const &domaintemplate;5&
! t5, const &domaintemplate;6& t6, const &domaintemplate;7& t7)</statement></entry>
<entry>creates an &interval; using the given &domain; objects.</entry>
</row>
</tbody>
--- 532,577 ----
</tfoot>
<tbody valign="top">
<row>
! <entry><literal>Interval<&dim;>()</literal></entry>
<entry>creates an empty, uninitialized &interval;, to be assigned a value later.</entry>
</row>
<row>
! <entry><literal>Interval<&dim;>(const Pooma::NoInit& no)</literal></entry>
<entry>creates an empty, uninitialized &interval;, to be assigned a value later.</entry>
</row>
<row>
! <entry><literal>Interval<&dim;>(const &domaintemplate;1& t1)</literal></entry>
<entry>creates an &interval; using the given &domain; object.</entry>
</row>
<row>
! <entry><literal>Interval<&dim;>(const &domaintemplate;1& t1, const &domaintemplate;2& t2)</literal></entry>
<entry>creates an &interval; using the given &domain; objects.</entry>
</row>
<row>
! <entry><literal>Interval<&dim;>(const &domaintemplate;1& t1, const &domaintemplate;2& t2, const &domaintemplate;3& t3)</literal></entry>
<entry>creates an &interval; using the given &domain; objects.</entry>
</row>
<row>
! <entry><literal>Interval<&dim;>(const &domaintemplate;1& t1, const
! &domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4)</literal></entry>
<entry>creates an &interval; using the given &domain; objects.</entry>
</row>
<row>
! <entry><literal>Interval<&dim;>(const &domaintemplate;1& t1, const
&domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4, const &domaintemplate;5&
! t5)</literal></entry>
<entry>creates an &interval; using the given &domain; objects.</entry>
</row>
<row>
! <entry><literal>Interval<&dim;>(const &domaintemplate;1& t1, const
&domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4, const &domaintemplate;5&
! t5, const &domaintemplate;6& t6)</literal></entry>
<entry>creates an &interval; using the given &domain; objects.</entry>
</row>
<row>
! <entry><literal>Interval<&dim;>(const &domaintemplate;1& t1, const
&domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4, const &domaintemplate;5&
! t5, const &domaintemplate;6& t6, const &domaintemplate;7& t7)</literal></entry>
<entry>creates an &interval; using the given &domain; objects.</entry>
</row>
</tbody>
***************
*** 637,661 ****
</tfoot>
<tbody valign="top">
<row>
! <entry><statement>Range<1>()</statement></entry>
<entry>creates an empty, uninitialized range.</entry>
</row>
<row>
! <entry><statement>Range<1>(const Pooma::NoInit& no)</statement></entry>
<entry>creates an uninitialized &rangeone;, to be assigned a value later.</entry>
</row>
<row>
! <entry><statement>Range<1>(const &domaintemplate;1& t1)</statement></entry>
<entry>creates a &rangeone;. See the text for an explanation.</entry>
</row>
<row>
! <entry><statement>Range<1>(const &domaintemplate;1& t1, const &domaintemplate;2& t2)</statement></entry>
<entry>creates a &rangeone; with an interval specified by the
integers converted from <varname>t1</varname> and
<varname>t2</varname>.</entry>
</row>
<row>
! <entry><statement>Range<1>(const &domaintemplate;1& t1, const &domaintemplate;2& t2, const &domaintemplate;3& t3)</statement></entry>
<entry>creates a &rangeone; by converting the arguments to
integers <varname>i1</varname>, <varname>i2</varname>, and
<varname>i3</varname> and then making a range [i1:i2:i3].</entry>
--- 637,661 ----
</tfoot>
<tbody valign="top">
<row>
! <entry><literal>Range<1>()</literal></entry>
<entry>creates an empty, uninitialized range.</entry>
</row>
<row>
! <entry><literal>Range<1>(const Pooma::NoInit& no)</literal></entry>
<entry>creates an uninitialized &rangeone;, to be assigned a value later.</entry>
</row>
<row>
! <entry><literal>Range<1>(const &domaintemplate;1& t1)</literal></entry>
<entry>creates a &rangeone;. See the text for an explanation.</entry>
</row>
<row>
! <entry><literal>Range<1>(const &domaintemplate;1& t1, const &domaintemplate;2& t2)</literal></entry>
<entry>creates a &rangeone; with an interval specified by the
integers converted from <varname>t1</varname> and
<varname>t2</varname>.</entry>
</row>
<row>
! <entry><literal>Range<1>(const &domaintemplate;1& t1, const &domaintemplate;2& t2, const &domaintemplate;3& t3)</literal></entry>
<entry>creates a &rangeone; by converting the arguments to
integers <varname>i1</varname>, <varname>i2</varname>, and
<varname>i3</varname> and then making a range [i1:i2:i3].</entry>
***************
*** 702,747 ****
</tfoot>
<tbody valign="top">
<row>
! <entry><statement>Range<&dim;>()</statement></entry>
<entry>creates an empty, uninitialized ⦥, to be assigned a value later.</entry>
</row>
<row>
! <entry><statement>Range<&dim;>(const Pooma::NoInit& no)</statement></entry>
<entry>creates an empty, uninitialized ⦥, to be assigned a value later.</entry>
</row>
<row>
! <entry><statement>Range<&dim;>(const &domaintemplate;1& t1)</statement></entry>
<entry>creates a ⦥ using the given &domain; object.</entry>
</row>
<row>
! <entry><statement>Range<&dim;>(const &domaintemplate;1& t1, const &domaintemplate;2& t2)</statement></entry>
<entry>creates a ⦥ using the given &domain; objects.</entry>
</row>
<row>
! <entry><statement>Range<&dim;>(const &domaintemplate;1& t1, const &domaintemplate;2& t2, const &domaintemplate;3& t3)</statement></entry>
<entry>creates a ⦥ using the given &domain; objects.</entry>
</row>
<row>
! <entry><statement>Range<&dim;>(const &domaintemplate;1& t1, const
! &domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4)</statement></entry>
<entry>creates a ⦥ using the given &domain; objects.</entry>
</row>
<row>
! <entry><statement>Range<&dim;>(const &domaintemplate;1& t1, const
&domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4, const &domaintemplate;5&
! t5)</statement></entry>
<entry>creates a ⦥ using the given &domain; objects.</entry>
</row>
<row>
! <entry><statement>Range<&dim;>(const &domaintemplate;1& t1, const
&domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4, const &domaintemplate;5&
! t5, const &domaintemplate;6& t6)</statement></entry>
<entry>creates a ⦥ using the given &domain; objects.</entry>
</row>
<row>
! <entry><statement>Range<&dim;>(const &domaintemplate;1& t1, const
&domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4, const &domaintemplate;5&
! t5, const &domaintemplate;6& t6, const &domaintemplate;7& t7)</statement></entry>
<entry>creates a ⦥ using the given &domain; objects.</entry>
</row>
</tbody>
--- 702,747 ----
</tfoot>
<tbody valign="top">
<row>
! <entry><literal>Range<&dim;>()</literal></entry>
<entry>creates an empty, uninitialized ⦥, to be assigned a value later.</entry>
</row>
<row>
! <entry><literal>Range<&dim;>(const Pooma::NoInit& no)</literal></entry>
<entry>creates an empty, uninitialized ⦥, to be assigned a value later.</entry>
</row>
<row>
! <entry><literal>Range<&dim;>(const &domaintemplate;1& t1)</literal></entry>
<entry>creates a ⦥ using the given &domain; object.</entry>
</row>
<row>
! <entry><literal>Range<&dim;>(const &domaintemplate;1& t1, const &domaintemplate;2& t2)</literal></entry>
<entry>creates a ⦥ using the given &domain; objects.</entry>
</row>
<row>
! <entry><literal>Range<&dim;>(const &domaintemplate;1& t1, const &domaintemplate;2& t2, const &domaintemplate;3& t3)</literal></entry>
<entry>creates a ⦥ using the given &domain; objects.</entry>
</row>
<row>
! <entry><literal>Range<&dim;>(const &domaintemplate;1& t1, const
! &domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4)</literal></entry>
<entry>creates a ⦥ using the given &domain; objects.</entry>
</row>
<row>
! <entry><literal>Range<&dim;>(const &domaintemplate;1& t1, const
&domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4, const &domaintemplate;5&
! t5)</literal></entry>
<entry>creates a ⦥ using the given &domain; objects.</entry>
</row>
<row>
! <entry><literal>Range<&dim;>(const &domaintemplate;1& t1, const
&domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4, const &domaintemplate;5&
! t5, const &domaintemplate;6& t6)</literal></entry>
<entry>creates a ⦥ using the given &domain; objects.</entry>
</row>
<row>
! <entry><literal>Range<&dim;>(const &domaintemplate;1& t1, const
&domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4, const &domaintemplate;5&
! t5, const &domaintemplate;6& t6, const &domaintemplate;7& t7)</literal></entry>
<entry>creates a ⦥ using the given &domain; objects.</entry>
</row>
</tbody>
***************
*** 811,831 ****
</tfoot>
<tbody valign="top">
<row>
! <entry><statement>Grid<1>()</statement></entry>
<entry>creates an empty, uninitialized grid.</entry>
</row>
<row>
! <entry><statement>Grid<1>(const &domaintemplate;1& t1)</statement></entry>
<entry>creates a &gridone;. See the text for an explanation.</entry>
</row>
<row>
! <entry><statement>Grid<1>(const &domaintemplate;1& t1, const &domaintemplate;2& t2)</statement></entry>
<entry>creates a &gridone; from the interval specified by the
integers converted from <varname>t1</varname> and
<varname>t2</varname>.</entry>
</row>
<row>
! <entry><statement>Grid<1>(const &domaintemplate;1& t1, const &domaintemplate;2& t2, const &domaintemplate;3& t3)</statement></entry>
<entry>creates a &gridone; from the domain triplet specified
by the integers converted from <varname>t1</varname>,
<varname>t2</varname>, and <varname>t3</varname>.</entry>
--- 811,831 ----
</tfoot>
<tbody valign="top">
<row>
! <entry><literal>Grid<1>()</literal></entry>
<entry>creates an empty, uninitialized grid.</entry>
</row>
<row>
! <entry><literal>Grid<1>(const &domaintemplate;1& t1)</literal></entry>
<entry>creates a &gridone;. See the text for an explanation.</entry>
</row>
<row>
! <entry><literal>Grid<1>(const &domaintemplate;1& t1, const &domaintemplate;2& t2)</literal></entry>
<entry>creates a &gridone; from the interval specified by the
integers converted from <varname>t1</varname> and
<varname>t2</varname>.</entry>
</row>
<row>
! <entry><literal>Grid<1>(const &domaintemplate;1& t1, const &domaintemplate;2& t2, const &domaintemplate;3& t3)</literal></entry>
<entry>creates a &gridone; from the domain triplet specified
by the integers converted from <varname>t1</varname>,
<varname>t2</varname>, and <varname>t3</varname>.</entry>
*************** Grid<1> g(list);
*** 889,930 ****
</tfoot>
<tbody valign="top">
<row>
! <entry><statement>Grid<&dim;>()</statement></entry>
<entry>creates an empty, uninitialized &grid;, to be assigned a value later.</entry>
</row>
<row>
! <entry><statement>Grid<&dim;>(const &domaintemplate;1& t1)</statement></entry>
<entry>creates a &grid; using the given &domain; object.</entry>
</row>
<row>
! <entry><statement>Grid<&dim;>(const &domaintemplate;1& t1, const &domaintemplate;2& t2)</statement></entry>
<entry>creates a &grid; using the given &domain; objects.</entry>
</row>
<row>
! <entry><statement>Grid<&dim;>(const &domaintemplate;1& t1, const &domaintemplate;2& t2, const &domaintemplate;3& t3)</statement></entry>
<entry>creates a &grid; using the given &domain; objects.</entry>
</row>
<row>
! <entry><statement>Grid<&dim;>(const &domaintemplate;1& t1, const
! &domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4)</statement></entry>
<entry>creates a &grid; using the given &domain; objects.</entry>
</row>
<row>
! <entry><statement>Grid<&dim;>(const &domaintemplate;1& t1, const
&domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4, const &domaintemplate;5&
! t5)</statement></entry>
<entry>creates a &grid; using the given &domain; objects.</entry>
</row>
<row>
! <entry><statement>Grid<&dim;>(const &domaintemplate;1& t1, const
&domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4, const &domaintemplate;5&
! t5, const &domaintemplate;6& t6)</statement></entry>
<entry>creates a &grid; using the given &domain; objects.</entry>
</row>
<row>
! <entry><statement>Grid<&dim;>(const &domaintemplate;1& t1, const
&domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4, const &domaintemplate;5&
! t5, const &domaintemplate;6& t6, const &domaintemplate;7& t7)</statement></entry>
<entry>creates a &grid; using the given &domain; objects.</entry>
</row>
</tbody>
--- 889,930 ----
</tfoot>
<tbody valign="top">
<row>
! <entry><literal>Grid<&dim;>()</literal></entry>
<entry>creates an empty, uninitialized &grid;, to be assigned a value later.</entry>
</row>
<row>
! <entry><literal>Grid<&dim;>(const &domaintemplate;1& t1)</literal></entry>
<entry>creates a &grid; using the given &domain; object.</entry>
</row>
<row>
! <entry><literal>Grid<&dim;>(const &domaintemplate;1& t1, const &domaintemplate;2& t2)</literal></entry>
<entry>creates a &grid; using the given &domain; objects.</entry>
</row>
<row>
! <entry><literal>Grid<&dim;>(const &domaintemplate;1& t1, const &domaintemplate;2& t2, const &domaintemplate;3& t3)</literal></entry>
<entry>creates a &grid; using the given &domain; objects.</entry>
</row>
<row>
! <entry><literal>Grid<&dim;>(const &domaintemplate;1& t1, const
! &domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4)</literal></entry>
<entry>creates a &grid; using the given &domain; objects.</entry>
</row>
<row>
! <entry><literal>Grid<&dim;>(const &domaintemplate;1& t1, const
&domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4, const &domaintemplate;5&
! t5)</literal></entry>
<entry>creates a &grid; using the given &domain; objects.</entry>
</row>
<row>
! <entry><literal>Grid<&dim;>(const &domaintemplate;1& t1, const
&domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4, const &domaintemplate;5&
! t5, const &domaintemplate;6& t6)</literal></entry>
<entry>creates a &grid; using the given &domain; objects.</entry>
</row>
<row>
! <entry><literal>Grid<&dim;>(const &domaintemplate;1& t1, const
&domaintemplate;2& t2, const &domaintemplate;3& t3, const &domaintemplate;4& t4, const &domaintemplate;5&
! t5, const &domaintemplate;6& t6, const &domaintemplate;7& t7)</literal></entry>
<entry>creates a &grid; using the given &domain; objects.</entry>
</row>
</tbody>
*************** Grid<1> g(list);
*** 995,1009 ****
<entry>Multidimensional &domain; Accessors</entry>
</row>
<row>
! <entry><statement>long size()</statement></entry>
<entry>returns the total number of indices.</entry>
</row>
<row>
! <entry><statement>bool empty()</statement></entry>
<entry>returns &true; if and only if the &domain; has no indices.</entry>
</row>
<row>
! <entry><statement>D<1> operator[](int dimension)</statement></entry>
<entry>returns the one-dimensional &domain; for the specified
dimension. The return type is a one-dimensional version of
the &domain;.</entry>
--- 995,1009 ----
<entry>Multidimensional &domain; Accessors</entry>
</row>
<row>
! <entry><literal>long size()</literal></entry>
<entry>returns the total number of indices.</entry>
</row>
<row>
! <entry><literal>bool empty()</literal></entry>
<entry>returns &true; if and only if the &domain; has no indices.</entry>
</row>
<row>
! <entry><literal>D<1> operator[](int dimension)</literal></entry>
<entry>returns the one-dimensional &domain; for the specified
dimension. The return type is a one-dimensional version of
the &domain;.</entry>
*************** Grid<1> g(list);
*** 1012,1043 ****
<entry>One-dimensional &domain; Accessors</entry>
</row>
<row>
! <entry><statement>long length()</statement></entry>
<entry>returns the number of indices.</entry>
</row>
<row>
! <entry><statement>int first()</statement></entry>
<entry>returns the beginning of the domain.</entry>
</row>
<row>
! <entry><statement>int last()</statement></entry>
<entry>returns the ending of the domain.</entry>
</row>
<row>
! <entry><statement>int min()</statement></entry>
<entry>returns the minimum index in the domain.</entry>
</row>
<row>
! <entry><statement>int max()</statement></entry>
<entry>returns the maximum index in the domain.</entry>
</row>
<row>
! <entry><statement>D<1>::iterator begin()</statement></entry>
<entry>returns a forward iterator pointing to the
beginning domain index.</entry>
</row>
<row>
! <entry><statement>D<1>::iterator end()</statement></entry>
<entry>returns a forward iterator pointing to the ending
domain index.</entry>
</row>
--- 1012,1043 ----
<entry>One-dimensional &domain; Accessors</entry>
</row>
<row>
! <entry><literal>long length()</literal></entry>
<entry>returns the number of indices.</entry>
</row>
<row>
! <entry><literal>int first()</literal></entry>
<entry>returns the beginning of the domain.</entry>
</row>
<row>
! <entry><literal>int last()</literal></entry>
<entry>returns the ending of the domain.</entry>
</row>
<row>
! <entry><literal>int min()</literal></entry>
<entry>returns the minimum index in the domain.</entry>
</row>
<row>
! <entry><literal>int max()</literal></entry>
<entry>returns the maximum index in the domain.</entry>
</row>
<row>
! <entry><literal>D<1>::iterator begin()</literal></entry>
<entry>returns a forward iterator pointing to the
beginning domain index.</entry>
</row>
<row>
! <entry><literal>D<1>::iterator end()</literal></entry>
<entry>returns a forward iterator pointing to the ending
domain index.</entry>
</row>
*************** Grid<1> g(list);
*** 1049,1087 ****
linkend="arrays-domains-use-table"></xref>. Functions applicable
to both one-dimensional and multidimensional &domain;s are listed
before functions that only applicable to one-dimensional
! &domain;s. The <methodname>size</methodname> member function
yields the total number of indices in a given &domain;. If and
! only if this number is zero, <methodname>empty</methodname> will
yield &true;. A multidimensional
<type>domain<&dim;></type> is the direct product of &dim;
! one-dimensional &domain;s. The <methodname>operator[](int
! dimension)</methodname> operator extracts the one-dimensional
&domain; corresponding to its parameter. For example, the three
one-dimensional <type>Range<1></type> &domain;s can be
extracted from a <type>Range<3></type>
object <varname>r</varname> using
! <statement>r[0]</statement>, <statement>r[1]</statement>, and
! <statement>r[2]</statement>.</para>
<para>&domain; accessors applicable only to one-dimensional
&domain;s are listed in the second half of <xref
linkend="arrays-domains-use-table"></xref>. The
! <methodname>length</methodname> member function, analogous to the
! multidimensional <methodname>size</methodname> function, returns
the number of indices in the &domain;. The
! <methodname>first</methodname> and <methodname>last</methodname>
member functions return the domain's beginning and ending
! indices. The <methodname>begin</methodname> and
! <methodname>end</methodname> member functions return forward
iterators pointing to these respective locations. They have type
<type>D<1>::iterator</type>, where <type>D</type>
abbreviates the &domain;'s type, e.g., &interval; or &grid;.
<!-- FIXME: Do I need to explain input iterators and their use?
! --> The <methodname>min</methodname> and
! <methodname>max</methodname> member functions return the minimum
and maximum indices in the &domain; object, respectively. For
&locone; and &intervalone;, these yield the same values as
! <methodname>first</methodname> and <methodname>last</methodname>,
but &rangeone; and &gridone; can have their numerically largest
index at the beginning of their &domain;s.</para>
</section>
--- 1049,1087 ----
linkend="arrays-domains-use-table"></xref>. Functions applicable
to both one-dimensional and multidimensional &domain;s are listed
before functions that only applicable to one-dimensional
! &domain;s. The <literal>size</literal> member function
yields the total number of indices in a given &domain;. If and
! only if this number is zero, <literal>empty</literal> will
yield &true;. A multidimensional
<type>domain<&dim;></type> is the direct product of &dim;
! one-dimensional &domain;s. The <literal>operator[](int
! dimension)</literal> operator extracts the one-dimensional
&domain; corresponding to its parameter. For example, the three
one-dimensional <type>Range<1></type> &domain;s can be
extracted from a <type>Range<3></type>
object <varname>r</varname> using
! <literal>r[0]</literal>, <literal>r[1]</literal>, and
! <literal>r[2]</literal>.</para>
<para>&domain; accessors applicable only to one-dimensional
&domain;s are listed in the second half of <xref
linkend="arrays-domains-use-table"></xref>. The
! <literal>length</literal> member function, analogous to the
! multidimensional <literal>size</literal> function, returns
the number of indices in the &domain;. The
! <literal>first</literal> and <literal>last</literal>
member functions return the domain's beginning and ending
! indices. The <literal>begin</literal> and
! <literal>end</literal> member functions return forward
iterators pointing to these respective locations. They have type
<type>D<1>::iterator</type>, where <type>D</type>
abbreviates the &domain;'s type, e.g., &interval; or &grid;.
<!-- FIXME: Do I need to explain input iterators and their use?
! --> The <literal>min</literal> and
! <literal>max</literal> member functions return the minimum
and maximum indices in the &domain; object, respectively. For
&locone; and &intervalone;, these yield the same values as
! <literal>first</literal> and <literal>last</literal>,
but &rangeone; and &gridone; can have their numerically largest
index at the beginning of their &domain;s.</para>
</section>
*************** Grid<1> g(list);
*** 1204,1210 ****
…, <varname>DT7</varname>. The first constructor, with no
domain arguments, creates an empty, uninitialized &array; for
which a domain must be specified before it is used. Specify the
! array's domain using its <methodname>initialize</methodname>
function. The next seven constructors combine their domain
arguments to compute the resulting &array;'s domain. These are
combined in the same way that multidimensional &interval;s are
--- 1204,1210 ----
…, <varname>DT7</varname>. The first constructor, with no
domain arguments, creates an empty, uninitialized &array; for
which a domain must be specified before it is used. Specify the
! array's domain using its <literal>initialize</literal>
function. The next seven constructors combine their domain
arguments to compute the resulting &array;'s domain. These are
combined in the same way that multidimensional &interval;s are
*************** Grid<1> g(list);
*** 1259,1358 ****
</tfoot>
<tbody valign="top">
<row>
! <entry><statement>Array<&dim;,T,E>()</statement></entry>
<entry>creates an empty, uninitialized &array; which must be
! <methodname>initialize</methodname>()d before use.</entry>
</row>
<!-- Omit Indirection Array because src/Engine/IndirectionEngine.h indicates it is not yet finished. -->
<!-- Omit the two Array<D1,T1,E1> a constructors, which
should not be used by users. -->
<row>
! <entry><statement>Array<&dim;,T,E>(const DT1& t1)</statement></entry>
<entry>creates an &array; using the given &domain; object or integer.</entry>
</row>
<row>
! <entry><statement>Array<&dim;,T,E>(const DT1& t1, const DT2& t2)</statement></entry>
<entry>creates an &array; using the given &domain; objects and integers.</entry>
</row>
<row>
! <entry><statement>Array<&dim;,T,E>(const DT1& t1, const DT2& t2, const DT3& t3)</statement></entry>
<entry>creates an &array; using the given &domain; objects and integers.</entry>
</row>
<row>
! <entry><statement>Array<&dim;,T,E>(const DT1& t1, const
! DT2& t2, const DT3& t3, const DT4& t4)</statement></entry>
<entry>creates an &array; using the given &domain; objects and integers.</entry>
</row>
<row>
! <entry><statement>Array<&dim;,T,E>(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4, const DT5&
! t5)</statement></entry>
<entry>creates an &array; using the given &domain; objects and integers.</entry>
</row>
<row>
! <entry><statement>Array<&dim;,T,E>(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4, const DT5&
! t5, const DT6& t6)</statement></entry>
<entry>creates an &array; using the given &domain; objects and integers.</entry>
</row>
<row>
! <entry><statement>Array<&dim;,T,E>(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4, const DT5&
! t5, const DT6& t6, const DT7& t7)</statement></entry>
<entry>creates an &array; using the given &domain; objects and integers.</entry>
</row>
<row>
! <entry><statement>Array<&dim;,T,E>(const DT1& t1,
! const ModelElement<T>& model)</statement></entry>
<entry>creates an &array; using the given &domain; object or
integer and
then initializes all entries using <varname>model</varname>.</entry>
</row>
<row>
! <entry><statement>Array<&dim;,T,E>(const DT1& t1, const DT2& t2,
! const ModelElement<T>& model)</statement></entry>
<entry>creates an &array; using the given &domain; objects and
integers and
then initializes all entries using <varname>model</varname>.</entry>
</row>
<row>
! <entry><statement>Array<&dim;,T,E>(const DT1& t1, const DT2& t2, const DT3& t3,
! const ModelElement<T>& model)</statement></entry>
<entry>creates an &array; using the given &domain; objects and
integers and
then initializes all entries using <varname>model</varname>.</entry>
</row>
<row>
! <entry><statement>Array<&dim;,T,E>(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4,
! const ModelElement<T>& model)</statement></entry>
<entry>creates an &array; using the given &domain; objects and
integers and
then initializes all entries using <varname>model</varname>.</entry>
</row>
<row>
! <entry><statement>Array<&dim;,T,E>(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4, const DT5&
t5,
! const ModelElement<T>& model)</statement></entry>
<entry>creates an &array; using the given &domain; objects and
integers and
then initializes all entries using <varname>model</varname>.</entry>
</row>
<row>
! <entry><statement>Array<&dim;,T,E>(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4, const DT5&
t5, const DT6& t6,
! const ModelElement<T>& model)</statement></entry>
<entry>creates an &array; using the given &domain; objects and
integers and
then initializes all entries using <varname>model</varname>.</entry>
</row>
<row>
! <entry><statement>Array<&dim;,T,E>(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4, const DT5&
t5, const DT6& t6, const DT7& t7,
! const ModelElement<T>& model)</statement></entry>
<entry>creates an &array; using the given &domain; objects and
integers and
then initializes all entries using <varname>model</varname>.</entry>
--- 1259,1358 ----
</tfoot>
<tbody valign="top">
<row>
! <entry><literal>Array<&dim;,T,E>()</literal></entry>
<entry>creates an empty, uninitialized &array; which must be
! <literal>initialize</literal>()d before use.</entry>
</row>
<!-- Omit Indirection Array because src/Engine/IndirectionEngine.h indicates it is not yet finished. -->
<!-- Omit the two Array<D1,T1,E1> a constructors, which
should not be used by users. -->
<row>
! <entry><literal>Array<&dim;,T,E>(const DT1& t1)</literal></entry>
<entry>creates an &array; using the given &domain; object or integer.</entry>
</row>
<row>
! <entry><literal>Array<&dim;,T,E>(const DT1& t1, const DT2& t2)</literal></entry>
<entry>creates an &array; using the given &domain; objects and integers.</entry>
</row>
<row>
! <entry><literal>Array<&dim;,T,E>(const DT1& t1, const DT2& t2, const DT3& t3)</literal></entry>
<entry>creates an &array; using the given &domain; objects and integers.</entry>
</row>
<row>
! <entry><literal>Array<&dim;,T,E>(const DT1& t1, const
! DT2& t2, const DT3& t3, const DT4& t4)</literal></entry>
<entry>creates an &array; using the given &domain; objects and integers.</entry>
</row>
<row>
! <entry><literal>Array<&dim;,T,E>(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4, const DT5&
! t5)</literal></entry>
<entry>creates an &array; using the given &domain; objects and integers.</entry>
</row>
<row>
! <entry><literal>Array<&dim;,T,E>(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4, const DT5&
! t5, const DT6& t6)</literal></entry>
<entry>creates an &array; using the given &domain; objects and integers.</entry>
</row>
<row>
! <entry><literal>Array<&dim;,T,E>(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4, const DT5&
! t5, const DT6& t6, const DT7& t7)</literal></entry>
<entry>creates an &array; using the given &domain; objects and integers.</entry>
</row>
<row>
! <entry><literal>Array<&dim;,T,E>(const DT1& t1,
! const ModelElement<T>& model)</literal></entry>
<entry>creates an &array; using the given &domain; object or
integer and
then initializes all entries using <varname>model</varname>.</entry>
</row>
<row>
! <entry><literal>Array<&dim;,T,E>(const DT1& t1, const DT2& t2,
! const ModelElement<T>& model)</literal></entry>
<entry>creates an &array; using the given &domain; objects and
integers and
then initializes all entries using <varname>model</varname>.</entry>
</row>
<row>
! <entry><literal>Array<&dim;,T,E>(const DT1& t1, const DT2& t2, const DT3& t3,
! const ModelElement<T>& model)</literal></entry>
<entry>creates an &array; using the given &domain; objects and
integers and
then initializes all entries using <varname>model</varname>.</entry>
</row>
<row>
! <entry><literal>Array<&dim;,T,E>(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4,
! const ModelElement<T>& model)</literal></entry>
<entry>creates an &array; using the given &domain; objects and
integers and
then initializes all entries using <varname>model</varname>.</entry>
</row>
<row>
! <entry><literal>Array<&dim;,T,E>(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4, const DT5&
t5,
! const ModelElement<T>& model)</literal></entry>
<entry>creates an &array; using the given &domain; objects and
integers and
then initializes all entries using <varname>model</varname>.</entry>
</row>
<row>
! <entry><literal>Array<&dim;,T,E>(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4, const DT5&
t5, const DT6& t6,
! const ModelElement<T>& model)</literal></entry>
<entry>creates an &array; using the given &domain; objects and
integers and
then initializes all entries using <varname>model</varname>.</entry>
</row>
<row>
! <entry><literal>Array<&dim;,T,E>(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4, const DT5&
t5, const DT6& t6, const DT7& t7,
! const ModelElement<T>& model)</literal></entry>
<entry>creates an &array; using the given &domain; objects and
integers and
then initializes all entries using <varname>model</varname>.</entry>
*************** Array<3> b(2,3,1);
*** 1389,1395 ****
<programlisting>
Array<2,bool> c(2,3);
</programlisting> To specify a default &array; value of &true;, use
! <statement>ModelElement<bool>(true)</statement>:
<programlisting>
Array<2,bool> c(2,3, ModelElement<bool>(true));.
</programlisting> To create a one-dimensional &array; containing
--- 1389,1395 ----
<programlisting>
Array<2,bool> c(2,3);
</programlisting> To specify a default &array; value of &true;, use
! <literal>ModelElement<bool>(true)</literal>:
<programlisting>
Array<2,bool> c(2,3, ModelElement<bool>(true));.
</programlisting> To create a one-dimensional &array; containing
*************** Array<1,double,CompressibleBrick>
*** 1407,1416 ****
constructor, must have a specified domain before it can be used.
For example, one must use the parameter-less &array; constructor
when creating an array of &array;s using
! <keywordname>new</keywordname> so their domains must be specified.
(It would probably be better to create an &array; of &array;s
since memory allocation and deallocation would automatically be
! handled.) &array;'s <methodname>initialize</methodname> functions
accept the same set of domain object specifications and model
elements that the &array; constructors do, creating the specified
domain. See <xref
--- 1407,1416 ----
constructor, must have a specified domain before it can be used.
For example, one must use the parameter-less &array; constructor
when creating an array of &array;s using
! <literal>new</literal> so their domains must be specified.
(It would probably be better to create an &array; of &array;s
since memory allocation and deallocation would automatically be
! handled.) &array;'s <literal>initialize</literal> functions
accept the same set of domain object specifications and model
elements that the &array; constructors do, creating the specified
domain. See <xref
*************** Array<2,float,Brick> a(Interval<1>(2,7),
*** 1426,1432 ****
// its domain.
Array<2,float,Brick> b();
b.initialize(Interval<1>(2,7), Interval<1>(-2,4));.
! </programlisting> Invoking <methodname>initialize</methodname> on an
&array; with an existing domain yields unspecified behavior. All
&array; values may be lost and memory may be leaked.</para>
--- 1426,1432 ----
// its domain.
Array<2,float,Brick> b();
b.initialize(Interval<1>(2,7), Interval<1>(-2,4));.
! </programlisting> Invoking <literal>initialize</literal> on an
&array; with an existing domain yields unspecified behavior. All
&array; values may be lost and memory may be leaked.</para>
*************** b.initialize(Interval<1>(2,7), Interval<
*** 1437,1448 ****
<tgroup cols="2" align="left">
<thead>
<row>
! <entry>An &array;'s <methodname>initialize</methodname> member
functions sets its domain and should be invoked only for an
array created without a domain. It returns nothing.</entry>
</row>
<row>
! <entry><methodname>initialize</methodname> declaration</entry>
<entry>result</entry>
</row>
</thead>
--- 1437,1448 ----
<tgroup cols="2" align="left">
<thead>
<row>
! <entry>An &array;'s <literal>initialize</literal> member
functions sets its domain and should be invoked only for an
array created without a domain. It returns nothing.</entry>
</row>
<row>
! <entry><literal>initialize</literal> declaration</entry>
<entry>result</entry>
</row>
</thead>
*************** b.initialize(Interval<1>(2,7), Interval<
*** 1457,1546 ****
<!-- Omit Indirection Array initialize because it does not exist! -->
<!-- Omit the two Array<D1,T1,E1> functions, which should not be used by users. -->
<row>
! <entry><statement>initialize(const DT1& t1)</statement></entry>
<entry>creates the &array;'s domain using the given &domain;
object or integer.</entry>
</row>
<row>
! <entry><statement>initialize(const DT1& t1, const DT2& t2)</statement></entry>
<entry>creates the &array;'s domain using the given &domain; objects and integers.</entry>
</row>
<row>
! <entry><statement>initialize(const DT1& t1, const DT2& t2, const DT3& t3)</statement></entry>
<entry>creates the &array;'s domain using the given &domain; objects and integers.</entry>
</row>
<row>
! <entry><statement>initialize(const DT1& t1, const
! DT2& t2, const DT3& t3, const DT4& t4)</statement></entry>
<entry>creates the &array;'s domain using the given &domain; objects and integers.</entry>
</row>
<row>
! <entry><statement>initialize(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4, const DT5&
! t5)</statement></entry>
<entry>creates the &array;'s domain using the given &domain; objects and integers.</entry>
</row>
<row>
! <entry><statement>initialize(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4, const DT5&
! t5, const DT6& t6)</statement></entry>
<entry>creates the &array;'s domain using the given &domain; objects and integers.</entry>
</row>
<row>
! <entry><statement>initialize(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4, const DT5&
! t5, const DT6& t6, const DT7& t7)</statement></entry>
<entry>creates the &array;'s domain using the given &domain; objects and integers.</entry>
</row>
<row>
! <entry><statement>initialize(const DT1& t1,
! const ModelElement<T>& model)</statement></entry>
<entry>creates the &array;'s domain using the given &domain;
object or integer and
then initializes all entries using <varname>model</varname>.</entry>
</row>
<row>
! <entry><statement>initialize(const DT1& t1, const DT2& t2,
! const ModelElement<T>& model)</statement></entry>
<entry>creates the &array;'s domain using the given &domain;
objects and integers and
then initializes all entries using <varname>model</varname>.</entry>
</row>
<row>
! <entry><statement>initialize(const DT1& t1, const DT2& t2, const DT3& t3,
! const ModelElement<T>& model)</statement></entry>
<entry>creates the &array;'s domain using the given &domain;
objects and integers and
then initializes all entries using <varname>model</varname>.</entry>
</row>
<row>
! <entry><statement>initialize(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4,
! const ModelElement<T>& model)</statement></entry>
<entry>creates the &array;'s domain using the given &domain; objects and integers and
then initializes all entries using <varname>model</varname>.</entry>
</row>
<row>
! <entry><statement>initialize(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4, const DT5&
t5,
! const ModelElement<T>& model)</statement></entry>
<entry>creates the &array;'s domain using the given &domain; objects and integers and
then initializes all entries using <varname>model</varname>.</entry>
</row>
<row>
! <entry><statement>initialize(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4, const DT5&
t5, const DT6& t6,
! const ModelElement<T>& model)</statement></entry>
<entry>creates the &array;'s domain using the given &domain; objects and integers and
then initializes all entries using <varname>model</varname>.</entry>
</row>
<row>
! <entry><statement>initialize(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4, const DT5&
t5, const DT6& t6, const DT7& t7,
! const ModelElement<T>& model)</statement></entry>
<entry>creates the &array;'s domain using the given &domain; objects and integers and
then initializes all entries using <varname>model</varname>.</entry>
</row>
--- 1457,1546 ----
<!-- Omit Indirection Array initialize because it does not exist! -->
<!-- Omit the two Array<D1,T1,E1> functions, which should not be used by users. -->
<row>
! <entry><literal>initialize(const DT1& t1)</literal></entry>
<entry>creates the &array;'s domain using the given &domain;
object or integer.</entry>
</row>
<row>
! <entry><literal>initialize(const DT1& t1, const DT2& t2)</literal></entry>
<entry>creates the &array;'s domain using the given &domain; objects and integers.</entry>
</row>
<row>
! <entry><literal>initialize(const DT1& t1, const DT2& t2, const DT3& t3)</literal></entry>
<entry>creates the &array;'s domain using the given &domain; objects and integers.</entry>
</row>
<row>
! <entry><literal>initialize(const DT1& t1, const
! DT2& t2, const DT3& t3, const DT4& t4)</literal></entry>
<entry>creates the &array;'s domain using the given &domain; objects and integers.</entry>
</row>
<row>
! <entry><literal>initialize(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4, const DT5&
! t5)</literal></entry>
<entry>creates the &array;'s domain using the given &domain; objects and integers.</entry>
</row>
<row>
! <entry><literal>initialize(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4, const DT5&
! t5, const DT6& t6)</literal></entry>
<entry>creates the &array;'s domain using the given &domain; objects and integers.</entry>
</row>
<row>
! <entry><literal>initialize(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4, const DT5&
! t5, const DT6& t6, const DT7& t7)</literal></entry>
<entry>creates the &array;'s domain using the given &domain; objects and integers.</entry>
</row>
<row>
! <entry><literal>initialize(const DT1& t1,
! const ModelElement<T>& model)</literal></entry>
<entry>creates the &array;'s domain using the given &domain;
object or integer and
then initializes all entries using <varname>model</varname>.</entry>
</row>
<row>
! <entry><literal>initialize(const DT1& t1, const DT2& t2,
! const ModelElement<T>& model)</literal></entry>
<entry>creates the &array;'s domain using the given &domain;
objects and integers and
then initializes all entries using <varname>model</varname>.</entry>
</row>
<row>
! <entry><literal>initialize(const DT1& t1, const DT2& t2, const DT3& t3,
! const ModelElement<T>& model)</literal></entry>
<entry>creates the &array;'s domain using the given &domain;
objects and integers and
then initializes all entries using <varname>model</varname>.</entry>
</row>
<row>
! <entry><literal>initialize(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4,
! const ModelElement<T>& model)</literal></entry>
<entry>creates the &array;'s domain using the given &domain; objects and integers and
then initializes all entries using <varname>model</varname>.</entry>
</row>
<row>
! <entry><literal>initialize(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4, const DT5&
t5,
! const ModelElement<T>& model)</literal></entry>
<entry>creates the &array;'s domain using the given &domain; objects and integers and
then initializes all entries using <varname>model</varname>.</entry>
</row>
<row>
! <entry><literal>initialize(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4, const DT5&
t5, const DT6& t6,
! const ModelElement<T>& model)</literal></entry>
<entry>creates the &array;'s domain using the given &domain; objects and integers and
then initializes all entries using <varname>model</varname>.</entry>
</row>
<row>
! <entry><literal>initialize(const DT1& t1, const
DT2& t2, const DT3& t3, const DT4& t4, const DT5&
t5, const DT6& t6, const DT7& t7,
! const ModelElement<T>& model)</literal></entry>
<entry>creates the &array;'s domain using the given &domain; objects and integers and
then initializes all entries using <varname>model</varname>.</entry>
</row>
*************** std::cout &openopen; a(2,-2) &openopen;
*** 1583,1593 ****
numbers.</para>
<para>For read-only access to a value, use the
! <methodname>read</methodname> member function, which takes the
same index notation as its nameless read-write counterpart:
<programlisting>
std::cout &openopen; a.read(2,-2) &openopen; std::endl;
! </programlisting> Using <methodname>read</methodname> sometimes
permits the optimizer to produce faster executing code.</para>
<para>Copying &array;s requires little execution time because
--- 1583,1593 ----
numbers.</para>
<para>For read-only access to a value, use the
! <literal>read</literal> member function, which takes the
same index notation as its nameless read-write counterpart:
<programlisting>
std::cout &openopen; a.read(2,-2) &openopen; std::endl;
! </programlisting> Using <literal>read</literal> sometimes
permits the optimizer to produce faster executing code.</para>
<para>Copying &array;s requires little execution time because
*************** std::cout &openopen; a.read(2,-2) &openo
*** 1622,1628 ****
Destruction is similarly inexpensive.</para>
<para>Array assignment does not have reference semantics. Thus,
! the assignment <statement>a = b</statement> ensures that all of
<varname>a</varname>'s values are the same as <varname>b</varname>
at the time of assignment only. Subsequent changes to
<varname>a</varname>'s values do not change <varname>b</varname>'s
--- 1622,1628 ----
Destruction is similarly inexpensive.</para>
<para>Array assignment does not have reference semantics. Thus,
! the assignment <literal>a = b</literal> ensures that all of
<varname>a</varname>'s values are the same as <varname>b</varname>
at the time of assignment only. Subsequent changes to
<varname>a</varname>'s values do not change <varname>b</varname>'s
*************** std::cout &openopen; a.read(2,-2) &openo
*** 1637,1645 ****
constants useful for both compile-time and run-time computations.
See <xref linkend="arrays-arrays_use-compile_time_table"></xref>.
These may be accessed using the &array;'s type and the scope
! resolution operator (<operator>::</operator>). The table begins
with a list of internal type definitions, e.g.,
! <statement>Array<&dim;,T,E>::This_t</statement>. A
<glossterm linkend="glossary-layout">layout</glossterm> maps a
domain index to a particular processor and memory used to compute
the associated value.<!-- FIXME: Add a reference to the
--- 1637,1645 ----
constants useful for both compile-time and run-time computations.
See <xref linkend="arrays-arrays_use-compile_time_table"></xref>.
These may be accessed using the &array;'s type and the scope
! resolution operator (<literal>::</literal>). The table begins
with a list of internal type definitions, e.g.,
! <literal>Array<&dim;,T,E>::This_t</literal>. A
<glossterm linkend="glossary-layout">layout</glossterm> maps a
domain index to a particular processor and memory used to compute
the associated value.<!-- FIXME: Add a reference to the
*************** std::cout &openopen; a.read(2,-2) &openo
*** 1690,1700 ****
<entry>the type of the &array;'s layout.</entry>
</row>
<row>
! <entry><statement>const int dimensions</statement></entry>
<entry>the number &dim; of dimensions of the &array;.</entry>
</row>
<row>
! <entry><statement>const int rank</statement></entry>
<entry>synonym for <varname>dimensions</varname>.</entry>
</row>
</tbody>
--- 1690,1700 ----
<entry>the type of the &array;'s layout.</entry>
</row>
<row>
! <entry><literal>const int dimensions</literal></entry>
<entry>the number &dim; of dimensions of the &array;.</entry>
</row>
<row>
! <entry><literal>const int rank</literal></entry>
<entry>synonym for <varname>dimensions</varname>.</entry>
</row>
</tbody>
*************** std::cout &openopen; a.read(2,-2) &openo
*** 1708,1727 ****
returning the &array;'s domain, which has type
<type>Array<&dim;,T,E>::Domain_t</type> (abbreviated
<type>Domain_t</type> in the table). The next seven functions
! query the domain. <methodname>first</methodname>,
! <methodname>last</methodname>, and <methodname>length</methodname>
return the first index, last index, and number of indices for the
specified dimension. The domain's dimensions are numbered 0, 1,
…,
! <statement>Array<&dim;,T,E>::dimensions</statement>-1. If
these values are needed for all dimensions, use
! <methodname>firsts</methodname>, <methodname>lasts</methodname>,
! and <methodname>lengths</methodname>. The returned
<type>Loc<&dim;></type>s have &dim; entries, one for each
! dimension. <methodname>size</methodname> returns the total number
of indices in the entire domain. This is the product of all the
! dimensions' <methodname>length</methodname>s. The
! <methodname>layout</methodname> member function returns the
&array;'s layout, which specifies the mapping of indices to
processors and memory.<!-- FIXME: Add a reference to the
corresponding chapter. --> The last two functions return the
--- 1708,1727 ----
returning the &array;'s domain, which has type
<type>Array<&dim;,T,E>::Domain_t</type> (abbreviated
<type>Domain_t</type> in the table). The next seven functions
! query the domain. <literal>first</literal>,
! <literal>last</literal>, and <literal>length</literal>
return the first index, last index, and number of indices for the
specified dimension. The domain's dimensions are numbered 0, 1,
…,
! <literal>Array<&dim;,T,E>::dimensions</literal>-1. If
these values are needed for all dimensions, use
! <literal>firsts</literal>, <literal>lasts</literal>,
! and <literal>lengths</literal>. The returned
<type>Loc<&dim;></type>s have &dim; entries, one for each
! dimension. <literal>size</literal> returns the total number
of indices in the entire domain. This is the product of all the
! dimensions' <literal>length</literal>s. The
! <literal>layout</literal> member function returns the
&array;'s layout, which specifies the mapping of indices to
processors and memory.<!-- FIXME: Add a reference to the
corresponding chapter. --> The last two functions return the
*************** std::cout &openopen; a.read(2,-2) &openo
*** 1742,1807 ****
<row>
<entry>Internal type definitions, e.g., <type>Domain_t</type>,
are listed here without the class type prefix
! <statement>Array<&dim;,T,E>::</statement>.</entry>
</row>
</tfoot>
<tbody valign="top">
<row>
! <entry><statement>Domain_t domain()</statement></entry>
<entry>returns the &array;'s domain.</entry>
</row>
<row>
! <entry><statement>Domain_t physicalDomain()</statement></entry>
<entry>returns the &array;'s domain.</entry>
</row>
<row>
! <entry><statement>Domain_t totalDomain()</statement></entry>
<entry>returns the &array;'s domain.</entry>
</row>
<row>
! <entry><statement>int first(int dim)</statement></entry>
<entry>returns the first index value for the specified
dimension.</entry>
</row>
<row>
! <entry><statement>int last(int dim)</statement></entry>
<entry>returns the last index value for the specified
dimension.</entry>
</row>
<row>
! <entry><statement>int length(int dim)</statement></entry>
<entry>returns the number of indices (including endpoints) for
the specified dimension.</entry>
</row>
<row>
! <entry><statement>Loc<Dim> firsts()</statement></entry>
<entry>returns the first index values for all the
dimensions.</entry>
</row>
<row>
! <entry><statement>Loc<Dim> lasts()</statement></entry>
<entry>returns the last index values for all the specified
dimensions.</entry>
</row>
<row>
! <entry><statement>Loc<Dim> lengths()</statement></entry>
<entry>returns the numbers of indices (including endpoints)
for all the specified dimensions.</entry>
</row>
<row>
! <entry><statement>long size()</statement></entry>
<entry>returns the total number of indices in the domain.</entry>
</row>
<row>
! <entry><statement>Layout_t layout()</statement></entry>
<entry>returns the &array;'s layout.</entry>
</row>
<row>
! <entry><statement>Engine_t engine()</statement></entry>
<entry>returns the &array;'s engine.</entry>
</row>
<row>
! <entry><statement>const Engine_t engine()</statement></entry>
<entry>returns the &array;'s engine.</entry>
</row>
</tbody>
--- 1742,1807 ----
<row>
<entry>Internal type definitions, e.g., <type>Domain_t</type>,
are listed here without the class type prefix
! <literal>Array<&dim;,T,E>::</literal>.</entry>
</row>
</tfoot>
<tbody valign="top">
<row>
! <entry><literal>Domain_t domain()</literal></entry>
<entry>returns the &array;'s domain.</entry>
</row>
<row>
! <entry><literal>Domain_t physicalDomain()</literal></entry>
<entry>returns the &array;'s domain.</entry>
</row>
<row>
! <entry><literal>Domain_t totalDomain()</literal></entry>
<entry>returns the &array;'s domain.</entry>
</row>
<row>
! <entry><literal>int first(int dim)</literal></entry>
<entry>returns the first index value for the specified
dimension.</entry>
</row>
<row>
! <entry><literal>int last(int dim)</literal></entry>
<entry>returns the last index value for the specified
dimension.</entry>
</row>
<row>
! <entry><literal>int length(int dim)</literal></entry>
<entry>returns the number of indices (including endpoints) for
the specified dimension.</entry>
</row>
<row>
! <entry><literal>Loc<Dim> firsts()</literal></entry>
<entry>returns the first index values for all the
dimensions.</entry>
</row>
<row>
! <entry><literal>Loc<Dim> lasts()</literal></entry>
<entry>returns the last index values for all the specified
dimensions.</entry>
</row>
<row>
! <entry><literal>Loc<Dim> lengths()</literal></entry>
<entry>returns the numbers of indices (including endpoints)
for all the specified dimensions.</entry>
</row>
<row>
! <entry><literal>long size()</literal></entry>
<entry>returns the total number of indices in the domain.</entry>
</row>
<row>
! <entry><literal>Layout_t layout()</literal></entry>
<entry>returns the &array;'s layout.</entry>
</row>
<row>
! <entry><literal>Engine_t engine()</literal></entry>
<entry>returns the &array;'s engine.</entry>
</row>
<row>
! <entry><literal>const Engine_t engine()</literal></entry>
<entry>returns the &array;'s engine.</entry>
</row>
</tbody>
*************** std::cout &openopen; a.read(2,-2) &openo
*** 1811,1819 ****
<para>We illustrate using &array; member functions in <xref
linkend="arrays-arrays_use-members_example"></xref>. The program
computes the total number of &array;'s indices, comparing the
! result with invoking its <methodname>size</methodname> method.
Since the &array;'s name is <varname>a</varname>,
! <statement>a.size()</statement> returns its size. The
<function>computeArraySize</function> function also computes the
&array;'s size. This templated function uses its three template
parameters to accept any &array;, regardless of its dimension,
--- 1811,1819 ----
<para>We illustrate using &array; member functions in <xref
linkend="arrays-arrays_use-members_example"></xref>. The program
computes the total number of &array;'s indices, comparing the
! result with invoking its <literal>size</literal> method.
Since the &array;'s name is <varname>a</varname>,
! <literal>a.size()</literal> returns its size. The
<function>computeArraySize</function> function also computes the
&array;'s size. This templated function uses its three template
parameters to accept any &array;, regardless of its dimension,
*************** std::cout &openopen; a.read(2,-2) &openo
*** 1823,1832 ****
illustrates using member functions. The domain's size is the
product of the length of each dimension. Since the lengths are
stored in the <type>Loc<&dim></type>
! <varname>lens</varname>, <statement>lens[d]</statement> is a
<type>Loc<1></type>, for which its
! <methodname>first</methodname> member function extracts the
! length. The <methodname>length</methodname> &array; member
function is used in the <function>PAssert</function>.</para>
<example id="arrays-arrays_use-members_example">
--- 1823,1832 ----
illustrates using member functions. The domain's size is the
product of the length of each dimension. Since the lengths are
stored in the <type>Loc<&dim></type>
! <varname>lens</varname>, <literal>lens[d]</literal> is a
<type>Loc<1></type>, for which its
! <literal>first</literal> member function extracts the
! length. The <literal>length</literal> &array; member
function is used in the <function>PAssert</function>.</para>
<example id="arrays-arrays_use-members_example">
*************** std::cout &openopen; a.read(2,-2) &openo
*** 1844,1853 ****
functions' names. These functions return &loc;s.</para>
</callout>
<callout arearefs="arrays-arrays_use-members-example-loc_use">
! <para><statement>lens[d]</statement> returns a
<type>Loc<1></type> for
dimension <varname>d</varname>'s length. Invoking
! <type>Loc<1></type> <methodname>first</methodname> method
yields its value.</para>
</callout>
<callout arearefs="arrays-arrays_use-members-example-check_length">
--- 1844,1853 ----
functions' names. These functions return &loc;s.</para>
</callout>
<callout arearefs="arrays-arrays_use-members-example-loc_use">
! <para><literal>lens[d]</literal> returns a
<type>Loc<1></type> for
dimension <varname>d</varname>'s length. Invoking
! <type>Loc<1></type> <literal>first</literal> method
yields its value.</para>
</callout>
<callout arearefs="arrays-arrays_use-members-example-check_length">
*************** std::cout &openopen; a.read(2,-2) &openo
*** 1855,1861 ****
using member functions.</para>
</callout>
<callout arearefs="arrays-arrays_use-members-example-compare_size">
! <para>The <methodname>size</methodname> is invoked by
prepending the &array;'s name followed by a period. This
assertion is unnecessary, but the
<function>computeArraySize</function> function further
--- 1855,1861 ----
using member functions.</para>
</callout>
<callout arearefs="arrays-arrays_use-members-example-compare_size">
! <para>The <literal>size</literal> is invoked by
prepending the &array;'s name followed by a period. This
assertion is unnecessary, but the
<function>computeArraySize</function> function further
*************** std::cout &openopen; a.read(2,-2) &openo
*** 1890,1905 ****
&dynamic; &engine; is analogous to a one-dimensional &brick;
&engine; supporting a dynamically-resizable domain. It is also
usually the default value for this tag. For example,
! <statement>DynamicArray<> d0(1);</statement>,
! <statement>DynamicArray<double> d1(1);</statement>, and
! <statement>DynamicArray<double, Dynamic> d2(1);</statement>
all declare the same &dynamicarray;s explicitly storing one
&double; value. A &dynamicarray; automatically allocates its
initial memory and deallocates its final memory, just as an
&array; does.</para>
! <para>The <methodname>create</methodname> and
! <methodname>destroy</methodname> member functions permit changing
a &dynamicarray;'s domain. <xref
linkend="arrays-dynamic_arrays-change_size"></xref> lists these member
functions but omits functions exclusively used in distributed
--- 1890,1905 ----
&dynamic; &engine; is analogous to a one-dimensional &brick;
&engine; supporting a dynamically-resizable domain. It is also
usually the default value for this tag. For example,
! <literal>DynamicArray<> d0(1);</literal>,
! <literal>DynamicArray<double> d1(1);</literal>, and
! <literal>DynamicArray<double, Dynamic> d2(1);</literal>
all declare the same &dynamicarray;s explicitly storing one
&double; value. A &dynamicarray; automatically allocates its
initial memory and deallocates its final memory, just as an
&array; does.</para>
! <para>The <literal>create</literal> and
! <literal>destroy</literal> member functions permit changing
a &dynamicarray;'s domain. <xref
linkend="arrays-dynamic_arrays-change_size"></xref> lists these member
functions but omits functions exclusively used in distributed
*************** std::cout &openopen; a.read(2,-2) &openo
*** 1927,1945 ****
</tfoot>
<tbody valign="top">
<row>
! <entry><statement>void create(int num)</statement></entry>
<entry>extend the current domain by the requested number of
elements.</entry>
</row>
<row>
! <entry><statement>void destroy(const Dom& killList)</statement></entry>
<entry>remove the values specified by the indices in the given
&domain; argument. The <quote>Backfill</quote> method moves
values from the end of the domain to replace the deleted
values.</entry>
</row>
<row>
! <entry><statement>void destroy(Iter killBegin, Iter killEnd)</statement></entry>
<entry>remove the values specified by the indices in the
container range [begin,end) specified by the random-access
iterators. The <quote>Backfill</quote> method moves values
--- 1927,1945 ----
</tfoot>
<tbody valign="top">
<row>
! <entry><literal>void create(int num)</literal></entry>
<entry>extend the current domain by the requested number of
elements.</entry>
</row>
<row>
! <entry><literal>void destroy(const Dom& killList)</literal></entry>
<entry>remove the values specified by the indices in the given
&domain; argument. The <quote>Backfill</quote> method moves
values from the end of the domain to replace the deleted
values.</entry>
</row>
<row>
! <entry><literal>void destroy(Iter killBegin, Iter killEnd)</literal></entry>
<entry>remove the values specified by the indices in the
container range [begin,end) specified by the random-access
iterators. The <quote>Backfill</quote> method moves values
*************** std::cout &openopen; a.read(2,-2) &openo
*** 1947,1954 ****
values.</entry>
</row>
<row>
! <entry><statement>void destroy(const Dom& killList, const
! DeleteMethod& method)</statement></entry>
<entry>remove the values specified by the indices in the
given &domain; argument. Deleted values can be replaced by
--- 1947,1954 ----
values.</entry>
</row>
<row>
! <entry><literal>void destroy(const Dom& killList, const
! DeleteMethod& method)</literal></entry>
<entry>remove the values specified by the indices in the
given &domain; argument. Deleted values can be replaced by
*************** std::cout &openopen; a.read(2,-2) &openo
*** 1958,1965 ****
ordering.</entry>
</row>
<row>
! <entry><statement>void destroy(Iter killBegin, Iter killEnd,
! const DeleteMethod& method)</statement></entry>
<entry>remove the values specified by the indices in the
container range [begin,end) specified by the random-access
iterators. Deleted values can be replaced by
--- 1958,1965 ----
ordering.</entry>
</row>
<row>
! <entry><literal>void destroy(Iter killBegin, Iter killEnd,
! const DeleteMethod& method)</literal></entry>
<entry>remove the values specified by the indices in the
container range [begin,end) specified by the random-access
iterators. Deleted values can be replaced by
*************** std::cout &openopen; a.read(2,-2) &openo
*** 1972,1985 ****
</tgroup>
</table>
! <para>The <methodname>destroy</methodname> member function deletes
the specified indices. The indices may be specified using either
a &domain; object (<type>Interval<1></type>,
<type>Range<1></type>, or <type>IndirectionList</type>) or
by random-access iterators pointing into a container. For
example, every other value from a ten-value
array <varname>d</varname> might be removed using
! <statement>Range<1>(0,9,2)</statement>. Alternatively,
<programlisting>
int killList[] = {0, 2, 4, 6, 8};
d.destroy(killList, killList+5);
--- 1972,1985 ----
</tgroup>
</table>
! <para>The <literal>destroy</literal> member function deletes
the specified indices. The indices may be specified using either
a &domain; object (<type>Interval<1></type>,
<type>Range<1></type>, or <type>IndirectionList</type>) or
by random-access iterators pointing into a container. For
example, every other value from a ten-value
array <varname>d</varname> might be removed using
! <literal>Range<1>(0,9,2)</literal>. Alternatively,
<programlisting>
int killList[] = {0, 2, 4, 6, 8};
d.destroy(killList, killList+5);
*************** d.destroy(killList, killList+5);
*** 2002,2012 ****
<entry>0 1 2 3</entry>
</row>
<row>
! <entry><methodname>destroy</methodname> using <type>BackFill</type>:</entry>
<entry>3 1 2</entry>
</row>
<row>
! <entry><methodname>destroy</methodname> using <type>ShiftUp</type>:</entry>
<entry>1 2 3</entry>
</row>
</tbody>
--- 2002,2012 ----
<entry>0 1 2 3</entry>
</row>
<row>
! <entry><literal>destroy</literal> using <type>BackFill</type>:</entry>
<entry>3 1 2</entry>
</row>
<row>
! <entry><literal>destroy</literal> using <type>ShiftUp</type>:</entry>
<entry>1 2 3</entry>
</row>
</tbody>
*************** d.destroy(killList, killList+5);
*** 2025,2032 ****
original indices of 0 1 2 3. Removing 2 yields 0 1 3 because 3 is
moved into 2's position. Removing 0 yields 3 1 because 3 is again
moved. Use an object with the desired type to indicate which fill
! method is desired, i.e., <statement>BackFill()</statement> or
! <statement>ShiftUp()</statement>.</para>
<para>We illustrate &dynamicarray; resizing in <xref
linkend="arrays-dynamic_arrays-example"></xref>. &dynamicarray;s
--- 2025,2032 ----
original indices of 0 1 2 3. Removing 2 yields 0 1 3 because 3 is
moved into 2's position. Removing 0 yields 3 1 because 3 is again
moved. Use an object with the desired type to indicate which fill
! method is desired, i.e., <literal>BackFill()</literal> or
! <literal>ShiftUp()</literal>.</para>
<para>We illustrate &dynamicarray; resizing in <xref
linkend="arrays-dynamic_arrays-example"></xref>. &dynamicarray;s
*************** d.destroy(killList, killList+5);
*** 2037,2055 ****
be one-dimensional. The three arrays, each having one &double;
value, are equivalent. (The &poomatoolkit; can be configured to
support different default template values.) Invoking
! <varname>d0</varname>'s <methodname>create</methodname> with an
argument of five increases its domain size from one to six. The
additional indices are added to the end of the domain so the value
at index 0 is not changed. To illustrate which indices are
removed and which indices are reordered, the program first sets
all values equal to their indices. This illustrates that
&dynamicarray; values are accessed the same way as &array; values.
! For example, <statement>d0(i)</statement> accesses the
<varname>i</varname><superscript>th</superscript> value. The
! <methodname>destroy</methodname> member function removes every
other index from the array because the one-dimensional ⦥
specifies the domain's entire interval with a stride of 2.
! The <statement>BackFill</statement> function call creates a
<type>BackFill</type> object indicating the <type>BackFill</type>
method should be used. We illustrate the steps of this method:
<informaltable frame="none" colsep="0" rowsep="0" tocentry="1"
--- 2037,2055 ----
be one-dimensional. The three arrays, each having one &double;
value, are equivalent. (The &poomatoolkit; can be configured to
support different default template values.) Invoking
! <varname>d0</varname>'s <literal>create</literal> with an
argument of five increases its domain size from one to six. The
additional indices are added to the end of the domain so the value
at index 0 is not changed. To illustrate which indices are
removed and which indices are reordered, the program first sets
all values equal to their indices. This illustrates that
&dynamicarray; values are accessed the same way as &array; values.
! For example, <literal>d0(i)</literal> accesses the
<varname>i</varname><superscript>th</superscript> value. The
! <literal>destroy</literal> member function removes every
other index from the array because the one-dimensional ⦥
specifies the domain's entire interval with a stride of 2.
! The <literal>BackFill</literal> function call creates a
<type>BackFill</type> object indicating the <type>BackFill</type>
method should be used. We illustrate the steps of this method:
<informaltable frame="none" colsep="0" rowsep="0" tocentry="1"
*************** d.destroy(killList, killList+5);
*** 2081,2090 ****
originally at 5 is again moved into 2's position. Finally,
index 0 is replaced by index 3. The rest of the program
repeats the computation, using the random-access iterator version
! of <methodname>destroy</methodname>. Since this &dynamicarray;'s
indices are specified using ∫s, the
<varname>killList</varname> explicitly lists the indices to
! remove. The <methodname>destroy</methodname> call uses pointers
to the beginning and end of the <varname>killList</varname> array
to specify which of its indices to use. Since no replacement
method is specified, the default <type>BackFill</type> method is
--- 2081,2090 ----
originally at 5 is again moved into 2's position. Finally,
index 0 is replaced by index 3. The rest of the program
repeats the computation, using the random-access iterator version
! of <literal>destroy</literal>. Since this &dynamicarray;'s
indices are specified using ∫s, the
<varname>killList</varname> explicitly lists the indices to
! remove. The <literal>destroy</literal> call uses pointers
to the beginning and end of the <varname>killList</varname> array
to specify which of its indices to use. Since no replacement
method is specified, the default <type>BackFill</type> method is
*************** d.destroy(killList, killList+5);
*** 2104,2110 ****
&dynamicarray;s, storing one &double; value.</para>
</callout>
<callout arearefs="arrays-dynamic_arrays-example-extension">
! <para>This <methodname>create</methodname> member function call
adds five indices to the end of the domain.</para>
</callout>
<callout arearefs="arrays-dynamic_arrays-example-access">
--- 2104,2110 ----
&dynamicarray;s, storing one &double; value.</para>
</callout>
<callout arearefs="arrays-dynamic_arrays-example-extension">
! <para>This <literal>create</literal> member function call
adds five indices to the end of the domain.</para>
</callout>
<callout arearefs="arrays-dynamic_arrays-example-access">
*************** d.destroy(killList, killList+5);
*** 2113,2124 ****
</callout>
<callout arearefs="arrays-dynamic_arrays-example-destroy_range">
<para>The ⦥ object specifies that every other index
! should be removed. The <statement>BackFill()</statement>
object is unnecessary since it is the default replacement
method.</para>
</callout>
<callout arearefs="arrays-dynamic_arrays-example-destroy_iterators">
! <para>This <methodname>destroy</methodname> call is equivalent
to the previous one but uses iterators.</para>
</callout>
</calloutlist>
--- 2113,2124 ----
</callout>
<callout arearefs="arrays-dynamic_arrays-example-destroy_range">
<para>The ⦥ object specifies that every other index
! should be removed. The <literal>BackFill()</literal>
object is unnecessary since it is the default replacement
method.</para>
</callout>
<callout arearefs="arrays-dynamic_arrays-example-destroy_iterators">
! <para>This <literal>destroy</literal> call is equivalent
to the previous one but uses iterators.</para>
</callout>
</calloutlist>
Index: concepts.xml
===================================================================
RCS file: /home/pooma/Repository/r2/docs/manual/concepts.xml,v
retrieving revision 1.11
diff -c -p -r1.11 concepts.xml
*** concepts.xml 2002/01/30 23:09:06 1.11
--- concepts.xml 2002/01/30 23:47:30
***************
*** 251,258 ****
versa. While users sometimes explicitly create views, they are
perhaps more frequently created as temporaries in expressions. For
example, if <varname>A</varname> is an &array; and
! <varname>I</varname> is a domain, <statement>A(I) -
! A(I-1)</statement> uses two views to form the difference between
adjacent values.</para>
--- 251,258 ----
versa. While users sometimes explicitly create views, they are
perhaps more frequently created as temporaries in expressions. For
example, if <varname>A</varname> is an &array; and
! <varname>I</varname> is a domain, <literal>A(I) -
! A(I-1)</literal> uses two views to form the difference between
adjacent values.</para>
***************
*** 523,530 ****
computation accesses individual container values through explicit
notation. For example, values in a two-dimensional
container &container; might be referenced as
! <statement>&container(3,4)</statement> or
! <statement>&container(i,j+1)</statement>. This is the usual
notation for non-object-oriented languages such as &c;.</para>
<para><glossterm
--- 523,530 ----
computation accesses individual container values through explicit
notation. For example, values in a two-dimensional
container &container; might be referenced as
! <literal>&container(3,4)</literal> or
! <literal>&container(i,j+1)</literal>. This is the usual
notation for non-object-oriented languages such as &c;.</para>
<para><glossterm
***************
*** 532,538 ****
computation uses expressions to access subsets of a container's
values. For example, in <xref
linkend="tutorial-array_parallel-doof2d"></xref>,
! <statement>a(I,J)</statement> represents the subset of &array;
<varname>a</varname>'s values having coordinates in the domain
specified by the direct product of one-dimensional &interval;s
<varname>I</varname> and <varname>J</varname>. Using
--- 532,538 ----
computation uses expressions to access subsets of a container's
values. For example, in <xref
linkend="tutorial-array_parallel-doof2d"></xref>,
! <literal>a(I,J)</literal> represents the subset of &array;
<varname>a</varname>'s values having coordinates in the domain
specified by the direct product of one-dimensional &interval;s
<varname>I</varname> and <varname>J</varname>. Using
Index: data-parallel.xml
===================================================================
RCS file: /home/pooma/Repository/r2/docs/manual/data-parallel.xml,v
retrieving revision 1.5
diff -c -p -r1.5 data-parallel.xml
*** data-parallel.xml 2002/01/30 23:09:06 1.5
--- data-parallel.xml 2002/01/30 23:47:31
***************
*** 83,94 ****
<para>The data-parallel operators operate element-wise on
containers' values. For example, if <varname>A</varname> is a
one-dimensional array,
! <statement>-<varname>A</varname></statement> is a one-dimensional
array with the same size such that the value at the
i<superscript>th</superscript> position equals -A(i). If
<varname>A</varname> and <varname>B</varname> are two-dimensional
&array;s on the same domain,
! <statement><varname>A</varname>+<varname>B</varname></statement>
is an array on the same domain with values equaling the sum of
corresponding values in <varname>A</varname> and
<varname>B</varname>.</para>
--- 83,94 ----
<para>The data-parallel operators operate element-wise on
containers' values. For example, if <varname>A</varname> is a
one-dimensional array,
! <literal>-<varname>A</varname></literal> is a one-dimensional
array with the same size such that the value at the
i<superscript>th</superscript> position equals -A(i). If
<varname>A</varname> and <varname>B</varname> are two-dimensional
&array;s on the same domain,
! <literal><varname>A</varname>+<varname>B</varname></literal>
is an array on the same domain with values equaling the sum of
corresponding values in <varname>A</varname> and
<varname>B</varname>.</para>
***************
*** 103,110 ****
with a one-dimensional interval [0,3]. Its first and last
entries equal <varname>A</varname>'s first and last entries, while
its middle two entries are the sums
! <statement>A(1)+B(1)</statement> and
! <statement>A(2)+B(2)</statement>. We assume zero is the default
value for the type of values stored in <varname>B</varname>.
A more complicated example of adding two &array;s with different
domains is illustrated in <xref
--- 103,110 ----
with a one-dimensional interval [0,3]. Its first and last
entries equal <varname>A</varname>'s first and last entries, while
its middle two entries are the sums
! <literal>A(1)+B(1)</literal> and
! <literal>A(2)+B(2)</literal>. We assume zero is the default
value for the type of values stored in <varname>B</varname>.
A more complicated example of adding two &array;s with different
domains is illustrated in <xref
*************** Array<2, double, Brick> A(I,I), B(J,H);
*** 143,155 ****
their domains' extent differ, as indicated by the solid lines in
the figure. The sum has domain equal to the left operand's
domain. Values with the same indices are added. For example,
! <statement>A(2,2)</statement> and <statement>B(2,2)</statement>
are added. <varname>B</varname>'s domain does not include index
! (1,1) so, when adding <statement>A(1,1)</statement> and
! <statement>B(1,1)</statement>, the default value for
<varname>B</varname>'s value type is used. Usually this
! is 0. Thus, <statement>A(1,1) + B(1,1)</statement> equals
! <statement>9 + 0</statement>.</para>
<para>Operations with both &array;s and scalar values are
supported. Conceptually, a scalar value can be thought of as an
--- 143,155 ----
their domains' extent differ, as indicated by the solid lines in
the figure. The sum has domain equal to the left operand's
domain. Values with the same indices are added. For example,
! <literal>A(2,2)</literal> and <literal>B(2,2)</literal>
are added. <varname>B</varname>'s domain does not include index
! (1,1) so, when adding <literal>A(1,1)</literal> and
! <literal>B(1,1)</literal>, the default value for
<varname>B</varname>'s value type is used. Usually this
! is 0. Thus, <literal>A(1,1) + B(1,1)</literal> equals
! <literal>9 + 0</literal>.</para>
<para>Operations with both &array;s and scalar values are
supported. Conceptually, a scalar value can be thought of as an
*************** Array<2, double, Brick> A(I,I), B(J,H);
*** 158,171 ****
<programlisting>
Array<1, double, Brick> D(Interval<1>(7,10));
D += 2*D + 7;
! </programlisting><statement>2*D</statement> obeys the guidelines
! because the scalar <statement>2</statement> can be thought of as
an array with the same domain as <varname>D</varname>. It has the
! same value <statement>2</statement> everywhere. Likewise the
! conceptual domain for the scalar <statement>7</statement> is the
! same as <statement>2*D</statement>'s domain. Thus,
! <statement>2*D(i) + 7</statement> is added to
! <statement>D(i)</statement> wherever index i is in
<varname>D</varname>'s domain. In practice, the &toolkit; does
not first convert scalar values to arrays but instead uses them
directly in expressions.</para>
--- 158,171 ----
<programlisting>
Array<1, double, Brick> D(Interval<1>(7,10));
D += 2*D + 7;
! </programlisting><literal>2*D</literal> obeys the guidelines
! because the scalar <literal>2</literal> can be thought of as
an array with the same domain as <varname>D</varname>. It has the
! same value <literal>2</literal> everywhere. Likewise the
! conceptual domain for the scalar <literal>7</literal> is the
! same as <literal>2*D</literal>'s domain. Thus,
! <literal>2*D(i) + 7</literal> is added to
! <literal>D(i)</literal> wherever index i is in
<varname>D</varname>'s domain. In practice, the &toolkit; does
not first convert scalar values to arrays but instead uses them
directly in expressions.</para>
*************** Array<2, double, Brick> A(I,I), B(H,J),
*** 201,215 ****
Array<1, double, Brick> A(Interval<1>(0,1));
Array<1, double, Brick> B(Interval<1>(1,2));
A = B;
! </programlisting> <statement>A(0)</statement> is assigned
! <statement>B(1)</statement> and <statement>A(1)</statement> is
! assigned <statement>B(2)</statement>.</para>
<para>Assigning a scalar value to an &array; also is supported,
but assigning an &array; to a scalar is not. A scalar value is
conformable to any domain because, conceptually it can be viewed
as an &array; with any desired domain and having the same value
! everywhere. Thus, the assignment <statement>B = 3</statement>
ensures every value in <varname>B</varname> equals 3. Even
though a scalar value is conformable to any &array;, it is not an
l-value so it cannot appear on the left-hand side of an
--- 201,215 ----
Array<1, double, Brick> A(Interval<1>(0,1));
Array<1, double, Brick> B(Interval<1>(1,2));
A = B;
! </programlisting> <literal>A(0)</literal> is assigned
! <literal>B(1)</literal> and <literal>A(1)</literal> is
! assigned <literal>B(2)</literal>.</para>
<para>Assigning a scalar value to an &array; also is supported,
but assigning an &array; to a scalar is not. A scalar value is
conformable to any domain because, conceptually it can be viewed
as an &array; with any desired domain and having the same value
! everywhere. Thus, the assignment <literal>B = 3</literal>
ensures every value in <varname>B</varname> equals 3. Even
though a scalar value is conformable to any &array;, it is not an
l-value so it cannot appear on the left-hand side of an
*************** A = B;
*** 217,225 ****
<para>Data-parallel expressions can involve typical mathematical
functions and output operations. For example,
! <statement>sin(A)</statement> yields an &array; with values equal
to the sine of each of &array; <varname>A</varname>'s values.
! <statement>dot(A,B)</statement> has values equaling the dot
product of corresponding values in &array;s <varname>A</varname>
and <varname>B</varname>. The contents of an entire &array; can
be easily printed to standard output. For example, the program
--- 217,225 ----
<para>Data-parallel expressions can involve typical mathematical
functions and output operations. For example,
! <literal>sin(A)</literal> yields an &array; with values equal
to the sine of each of &array; <varname>A</varname>'s values.
! <literal>dot(A,B)</literal> has values equaling the dot
product of corresponding values in &array;s <varname>A</varname>
and <varname>B</varname>. The contents of an entire &array; can
be easily printed to standard output. For example, the program
*************** std::cout &openopen; A-B &openopen; std:
*** 234,240 ****
(000:002:001) = 1 -1 -1</computeroutput>. The initial
<computeroutput>(000:002:001)</computeroutput> indicates the
&array;'s domain ranges from 0 to 2 with a stride of 1. The
! three values in <statement>A-B</statement> follow.</para>
<para>The following four tables list the data-parallel operators
that operate on &array;s. <xref
--- 234,240 ----
(000:002:001) = 1 -1 -1</computeroutput>. The initial
<computeroutput>(000:002:001)</computeroutput> indicates the
&array;'s domain ranges from 0 to 2 with a stride of 1. The
! three values in <literal>A-B</literal> follow.</para>
<para>The following four tables list the data-parallel operators
that operate on &array;s. <xref
*************** std::cout &openopen; A-B &openopen; std:
*** 242,261 ****
&cc; operators that can be applied to &array;s and also scalar
values if appropriate. Each unary operator takes an &array;
parameter and returns an &array;. The types of the two &array;s
! need not be the same. For example, <operator>!</operator> can
take an <type>Array<bool></type>,
<type>Array<int></type>, <type>Array<long></type>, or
! any other value type to which <operator>!</operator> can be
applied. The result is an <type>Array<bool></type>. Each
binary operator also returns an &array;. When specifying two
&array;s or an &array; and a scalar value, a full set of operators
is supported. When specifying an &array; and a &tensor;,
&matrix;, or &vector;, a more limited set of operators is
! supported. For example, <operator>==</operator> can take two
&array;s, an &array; and a scalar value, or a scalar value and an
&array;. If given two &array;s, corresponding values are used.
If an argument is a scalar value, its same value is the used with
! each &array; value. The <operator>+</operator> supports the same
set of parameters but also supports adding an &array; and a
&tensor;, an &array; and a &matrix;, an &array; and a &vector;, a
&tensor; and an &array;, a &matrix; and an &array;, and a &vector;
--- 242,261 ----
&cc; operators that can be applied to &array;s and also scalar
values if appropriate. Each unary operator takes an &array;
parameter and returns an &array;. The types of the two &array;s
! need not be the same. For example, <literal>!</literal> can
take an <type>Array<bool></type>,
<type>Array<int></type>, <type>Array<long></type>, or
! any other value type to which <literal>!</literal> can be
applied. The result is an <type>Array<bool></type>. Each
binary operator also returns an &array;. When specifying two
&array;s or an &array; and a scalar value, a full set of operators
is supported. When specifying an &array; and a &tensor;,
&matrix;, or &vector;, a more limited set of operators is
! supported. For example, <literal>==</literal> can take two
&array;s, an &array; and a scalar value, or a scalar value and an
&array;. If given two &array;s, corresponding values are used.
If an argument is a scalar value, its same value is the used with
! each &array; value. The <literal>+</literal> supports the same
set of parameters but also supports adding an &array; and a
&tensor;, an &array; and a &matrix;, an &array; and a &vector;, a
&tensor; and an &array;, a &matrix; and an &array;, and a &vector;
*************** std::cout &openopen; A-B &openopen; std:
*** 277,297 ****
<tbody valign="top">
<row>
<entry>unary operators </entry>
! <entry><operator>+</operator>, <operator>-</operator>, <operator>~</operator>, <operator>!</operator></entry>
</row>
<row>
<entry>binary operators with at least one &array; and at most
one scalar value</entry>
! <entry><operator>+</operator>, <operator>-</operator>, <operator>*</operator>, <operator>/</operator>, <operator>%</operator>, <operator>&</operator>, <operator>|</operator>, <operator>^</operator>, <operator><</operator>, <operator><=</operator>, <operator>>=</operator>, <operator>></operator>, <operator>==</operator>, <operator>!=</operator>, <operator>&&</operator>, <operator>||</operator>, <operator>&openopen;</operator>, <operator>&closeclose;</operator></entry>
</row>
<row>
<entry>binary operators with at least one &array; and at most
one &tensor;, &matrix;, or &vector;</entry>
! <entry><operator>+</operator>, <operator>-</operator>,
! <operator>*</operator>, <operator>/</operator>,
! <operator>%</operator>, <operator>&</operator>,
! <operator>|</operator>, <operator>^</operator>,
! <operator>==</operator>, <operator>!=</operator></entry>
</row>
</tbody>
</tgroup>
--- 277,297 ----
<tbody valign="top">
<row>
<entry>unary operators </entry>
! <entry><literal>+</literal>, <literal>-</literal>, <literal>~</literal>, <literal>!</literal></entry>
</row>
<row>
<entry>binary operators with at least one &array; and at most
one scalar value</entry>
! <entry><literal>+</literal>, <literal>-</literal>, <literal>*</literal>, <literal>/</literal>, <literal>%</literal>, <literal>&</literal>, <literal>|</literal>, <literal>^</literal>, <literal><</literal>, <literal><=</literal>, <literal>>=</literal>, <literal>></literal>, <literal>==</literal>, <literal>!=</literal>, <literal>&&</literal>, <literal>||</literal>, <literal>&openopen;</literal>, <literal>&closeclose;</literal></entry>
</row>
<row>
<entry>binary operators with at least one &array; and at most
one &tensor;, &matrix;, or &vector;</entry>
! <entry><literal>+</literal>, <literal>-</literal>,
! <literal>*</literal>, <literal>/</literal>,
! <literal>%</literal>, <literal>&</literal>,
! <literal>|</literal>, <literal>^</literal>,
! <literal>==</literal>, <literal>!=</literal></entry>
</row>
</tbody>
</tgroup>
*************** std::cout &openopen; A-B &openopen; std:
*** 361,445 ****
<tbody valign="top">
<row rowsep="1">
<entry>Trigonometric and Hyperbolic Functions</entry>
! <entry><statement>#include <math.h></statement></entry>
</row>
<row>
! <entry><statement>Array<T> cos (const Array<T>& A)</statement></entry>
<entry>Returns the cosines of the &array;'s values.</entry>
</row>
<row>
! <entry><statement>Array<T> sin (const Array<T>& A)</statement></entry>
<entry>Returns the sines of the &array;'s values.</entry>
</row>
<row>
! <entry><statement>Array<T> tan (const Array<T>& A)</statement></entry>
<entry>Returns the tangents of the &array;'s values.</entry>
</row>
<row>
! <entry><statement>Array<T> acos (const Array<T1>& A)</statement></entry>
<entry>Returns the arc cosines of the &array;'s values.</entry>
</row>
<row>
! <entry><statement>Array<T> asin (const Array<T1>& A)</statement></entry>
<entry>Returns the arc sines of the &array;'s values.</entry>
</row>
<row>
! <entry><statement>Array<T> atan (const Array<T1>& A)</statement></entry>
<entry>Returns the arc tangents of the &array;'s values.</entry>
</row>
<row>
! <entry><statement>Array<T> atan2 (const Array<T1>& A, const Array<T2>& B)</statement></entry>
<entry>Computes the arc tangents of the values from the division
of elements in <varname>B</varname> by the elements
in <varname>A</varname>. The resulting values are the
signed angles in the range -π to π, inclusive.</entry>
</row>
<row>
! <entry><statement>Array<T> atan2 (const Array<T1>& A, const T2& r)</statement></entry>
<entry>Computes the arc tangents of the values from the division
of <varname>r</varname> by the elements
in <varname>A</varname>. The resulting values are the
signed angles in the range -π to π, inclusive.</entry>
</row>
<row>
! <entry><statement>Array<T> atan2 (const T1& l, const Array<T2>& B)</statement></entry>
<entry>Computes the arc tangents of the values from the division
of elements in <varname>B</varname> by <varname>l</varname>. The resulting values are the
signed angles in the range -π to π, inclusive.</entry>
</row>
<row>
! <entry><statement>Array<T> cosh (const Array<T>& A)</statement></entry>
<entry>Returns the hyperbolic cosines of the &array;'s values.</entry>
</row>
<row>
! <entry><statement>Array<T> sinh (const Array<T>& A)</statement></entry>
<entry>Returns the hyperbolic sines of the &array;'s values.</entry>
</row>
<row>
! <entry><statement>Array<T> tanh (const Array<T>& A)</statement></entry>
<entry>Returns the hyperbolic tangents of the &array;'s values.</entry>
</row>
<row rowsep="1">
<entry>Absolute Value, Rounding, and Modulus Functions</entry>
! <entry><statement>#include <math.h></statement></entry>
</row>
<row>
! <entry><statement>Array<T> fabs (const Array<T1>& A)</statement></entry>
<entry>Returns the absolute values of the floating point
numbers in the &array;.</entry>
</row>
<row>
! <entry><statement>Array<T> ceil (const Array<T1>& A)</statement></entry>
<entry>For each of the &array;'s values, return the integer
larger than or equal to it (as a floating point number).</entry>
</row>
<row>
! <entry><statement>Array<T> floor (const Array<T1>& A)</statement></entry>
<entry>For each of the &array;'s values, return the integer
smaller than or equal to it (as a floating point number).</entry>
</row>
<row>
! <entry><statement>Array<T> fmod (const Array<T1>& A, const Array<T2>& B)</statement></entry>
<entry>Computes the floating-point modulus (remainder) of
<varname>A</varname>'s values with the corresponding value
in <varname>B</varname>. The results have the same signs
--- 361,445 ----
<tbody valign="top">
<row rowsep="1">
<entry>Trigonometric and Hyperbolic Functions</entry>
! <entry><literal>#include <math.h></literal></entry>
</row>
<row>
! <entry><literal>Array<T> cos (const Array<T>& A)</literal></entry>
<entry>Returns the cosines of the &array;'s values.</entry>
</row>
<row>
! <entry><literal>Array<T> sin (const Array<T>& A)</literal></entry>
<entry>Returns the sines of the &array;'s values.</entry>
</row>
<row>
! <entry><literal>Array<T> tan (const Array<T>& A)</literal></entry>
<entry>Returns the tangents of the &array;'s values.</entry>
</row>
<row>
! <entry><literal>Array<T> acos (const Array<T1>& A)</literal></entry>
<entry>Returns the arc cosines of the &array;'s values.</entry>
</row>
<row>
! <entry><literal>Array<T> asin (const Array<T1>& A)</literal></entry>
<entry>Returns the arc sines of the &array;'s values.</entry>
</row>
<row>
! <entry><literal>Array<T> atan (const Array<T1>& A)</literal></entry>
<entry>Returns the arc tangents of the &array;'s values.</entry>
</row>
<row>
! <entry><literal>Array<T> atan2 (const Array<T1>& A, const Array<T2>& B)</literal></entry>
<entry>Computes the arc tangents of the values from the division
of elements in <varname>B</varname> by the elements
in <varname>A</varname>. The resulting values are the
signed angles in the range -π to π, inclusive.</entry>
</row>
<row>
! <entry><literal>Array<T> atan2 (const Array<T1>& A, const T2& r)</literal></entry>
<entry>Computes the arc tangents of the values from the division
of <varname>r</varname> by the elements
in <varname>A</varname>. The resulting values are the
signed angles in the range -π to π, inclusive.</entry>
</row>
<row>
! <entry><literal>Array<T> atan2 (const T1& l, const Array<T2>& B)</literal></entry>
<entry>Computes the arc tangents of the values from the division
of elements in <varname>B</varname> by <varname>l</varname>. The resulting values are the
signed angles in the range -π to π, inclusive.</entry>
</row>
<row>
! <entry><literal>Array<T> cosh (const Array<T>& A)</literal></entry>
<entry>Returns the hyperbolic cosines of the &array;'s values.</entry>
</row>
<row>
! <entry><literal>Array<T> sinh (const Array<T>& A)</literal></entry>
<entry>Returns the hyperbolic sines of the &array;'s values.</entry>
</row>
<row>
! <entry><literal>Array<T> tanh (const Array<T>& A)</literal></entry>
<entry>Returns the hyperbolic tangents of the &array;'s values.</entry>
</row>
<row rowsep="1">
<entry>Absolute Value, Rounding, and Modulus Functions</entry>
! <entry><literal>#include <math.h></literal></entry>
</row>
<row>
! <entry><literal>Array<T> fabs (const Array<T1>& A)</literal></entry>
<entry>Returns the absolute values of the floating point
numbers in the &array;.</entry>
</row>
<row>
! <entry><literal>Array<T> ceil (const Array<T1>& A)</literal></entry>
<entry>For each of the &array;'s values, return the integer
larger than or equal to it (as a floating point number).</entry>
</row>
<row>
! <entry><literal>Array<T> floor (const Array<T1>& A)</literal></entry>
<entry>For each of the &array;'s values, return the integer
smaller than or equal to it (as a floating point number).</entry>
</row>
<row>
! <entry><literal>Array<T> fmod (const Array<T1>& A, const Array<T2>& B)</literal></entry>
<entry>Computes the floating-point modulus (remainder) of
<varname>A</varname>'s values with the corresponding value
in <varname>B</varname>. The results have the same signs
*************** std::cout &openopen; A-B &openopen; std:
*** 447,460 ****
absolute values of <varname>B</varname>.</entry>
</row>
<row>
! <entry><statement>Array<T> fmod (const Array<T1>& A, const T2& r)</statement></entry>
<entry>Computes the floating-point modulus (remainder) of
<varname>A</varname>'s values with <varname>r</varname>. The results have the same signs
as <varname>A</varname> and absolute values less than the
absolute value of <varname>r</varname>.</entry>
</row>
<row>
! <entry><statement>Array<T> fmod (const T1& l, const Array<T2>& B)</statement></entry>
<entry>Computes the floating-point modulus (remainder) of
<varname>l</varname> with the values
in <varname>B</varname>. The results have the same signs
--- 447,460 ----
absolute values of <varname>B</varname>.</entry>
</row>
<row>
! <entry><literal>Array<T> fmod (const Array<T1>& A, const T2& r)</literal></entry>
<entry>Computes the floating-point modulus (remainder) of
<varname>A</varname>'s values with <varname>r</varname>. The results have the same signs
as <varname>A</varname> and absolute values less than the
absolute value of <varname>r</varname>.</entry>
</row>
<row>
! <entry><literal>Array<T> fmod (const T1& l, const Array<T2>& B)</literal></entry>
<entry>Computes the floating-point modulus (remainder) of
<varname>l</varname> with the values
in <varname>B</varname>. The results have the same signs
*************** std::cout &openopen; A-B &openopen; std:
*** 463,618 ****
</row>
<row rowsep="1">
<entry>Powers, Exponentiation, and Logarithmic Functions</entry>
! <entry><statement>#include <math.h></statement></entry>
</row>
<row>
! <entry><statement>Array<T> PETE_identity (const Array<T>& A)</statement></entry>
<entry>Returns the &array;. That is, it applies the identity operation.</entry>
</row>
<row>
! <entry><statement>Array<T> sqrt (const Array<T>& A)</statement></entry>
<entry>Returns the square roots of the &array;'s values.</entry>
</row>
<row>
! <entry><statement>Array<T> pow (const Array<T1>& A, const Array<T2>& B)</statement></entry>
<entry>Raises <varname>A</varname>'s values by the
corresponding power in <varname>B</varname>.</entry>
</row>
<row>
! <entry><statement>Array<T> pow (const Array<T1>& A, const T2& r)</statement></entry>
<entry>Raises <varname>A</varname>'s values by the power <varname>r</varname>.</entry>
</row>
<row>
! <entry><statement>Array<T> pow (const T1& l, const Array<T2>& B)</statement></entry>
<entry>Raises <varname>l</varname> by the powers
in <varname>B</varname>.</entry>
</row>
<row>
! <entry><statement>Array<T> pow2 (const Array<T>& A)</statement></entry>
<entry>Returns the squares of <varname>A</varname>'s values.</entry>
</row>
<row>
! <entry><statement>Array<T> pow3 (const Array<T>& A)</statement></entry>
<entry>Returns the cubes of <varname>A</varname>'s values.</entry>
</row>
<row>
! <entry><statement>Array<T> pow4 (const Array<T>& A)</statement></entry>
<entry>Returns the fourth powers of <varname>A</varname>'s values.</entry>
</row>
<row>
! <entry><statement>Array<T> ldexp (const Array<T1>& A, const Array<int>& B)</statement></entry>
<entry>Multiplies <varname>A</varname>'s values by two raised
to the corresponding value in <varname>B</varname>.</entry>
</row>
<row>
! <entry><statement>Array<T> ldexp (const Array<T1>& A, int r)</statement></entry>
<entry>Multiplies <varname>A</varname>'s values by two raised
to the <varname>r</varname><subscript>th</subscript>
power.</entry>
</row>
<row>
! <entry><statement>Array<T> ldexp (const T1& l, const Array<int>& B)</statement></entry>
<entry>Multiplies <varname>l</varname> by two raised
to the values in <varname>B</varname>.</entry>
</row>
<row>
! <entry><statement>Array<T> exp (const Array<T>& A)</statement></entry>
<entry>Returns the exponentiations of the &array;'s values.</entry>
</row>
<row>
! <entry><statement>Array<T> log (const Array<T>& A)</statement></entry>
<entry>Returns the natural logarithms of the &array;'s values.</entry>
</row>
<row>
! <entry><statement>Array<T> log10 (const Array<T>& A)</statement></entry>
<entry>Returns the base-10 logarithms of the &array;'s values.</entry>
</row>
<row rowsep="1">
<entry>Functions Involving Complex Numbers</entry>
! <entry><statement>#include <complex></statement></entry>
</row>
<row>
! <entry><statement>Array<T> real (const Array<complex<T&closeclose;& A)</statement></entry>
<entry>Returns the real parts of <varname>A</varname>'s complex numbers.</entry>
</row>
<row>
! <entry><statement>Array<T> imag (const Array<complex<T&closeclose;& A)</statement></entry>
<entry>Returns the imaginary parts of <varname>A</varname>'s complex numbers.</entry>
</row>
<row>
! <entry><statement>Array<T> abs (const Array<complex<T&closeclose;& A)</statement></entry>
<entry>Returns the absolute values (magnitudes) of
<varname>A</varname>'s complex numbers.</entry>
</row>
<row>
! <entry><statement>Array<T> abs (const Array<T>& A)</statement></entry>
<entry>Returns the absolute values of <varname>A</varname>'s values.</entry>
</row>
<row>
! <entry><statement>Array<T> arg (const Array<complex<T&closeclose;& A)</statement></entry>
<entry>Returns the angle representations (in radians) of the
polar representations of <varname>A</varname>'s complex
numbers.</entry>
</row>
<row>
! <entry><statement>Array<T> norm (const Array<complex<T&closeclose;& A)</statement></entry>
<entry>Returns the squared absolute values of
<varname>A</varname>'s complex numbers.</entry>
</row>
<row>
! <entry><statement>Array<complex<T&closeclose; conj (const Array<complex<T&closeclose;& A)</statement></entry>
<entry>Returns the complex conjugates of
<varname>A</varname>'s complex numbers.</entry>
</row>
<row>
! <entry><statement>Array<complex<T&closeclose; polar (const Array<T1>& A, const Array<T2>& B)</statement></entry>
<entry>Returns the complex numbers created from polar
coordinates (magnitudes and phase angles) in corresponding
&array;s.</entry>
</row>
<row>
! <entry><statement>Array<complex<T&closeclose; polar (const T1& l, const Array<T2>& A)</statement></entry>
<entry>Returns the complex numbers created from polar
coordinates with magnitude <varname>l</varname> and
phase angles in the &array;.</entry>
</row>
<row>
! <entry><statement>Array<complex<T&closeclose; polar (const Array<T1>& A, const T2& r)</statement></entry>
<entry>Returns the complex numbers created from polar
coordinates with magnitudes in the &array; and phase
angle <varname>r</varname>.</entry>
</row>
<row rowsep="1">
<entry>Functions Involving Matrices and Tensors</entry>
! <entry><statement>#include "Pooma/Tiny.h"</statement></entry>
</row>
<row>
! <entry><statement>T trace (const Array<T>& A)</statement></entry>
<entry>Returns the sum of the <varname>A</varname>'s diagonal
entries, viewed as a matrix.</entry>
</row>
<row>
! <entry><statement>T det (const Array<T>& A)</statement></entry>
<entry>Returns the determinant of <varname>A</varname>, viewed as a matrix.</entry>
</row>
<row>
! <entry><statement>Array<T> transpose (const Array<T>& A)</statement></entry>
<entry>Returns the transpose of <varname>A</varname>, viewed as a matrix.</entry>
</row>
<row>
! <entry><statement>Array<T> symmetrize (const Array<T>& A)</statement></entry>
<entry>Returns the tensors of <varname>A</varname> with the
requested output symmetry.</entry>
</row>
<row>
! <entry><statement>Array<T> dot (const Array<T1>& A, const Array<T2>& B)</statement></entry>
<entry>Returns the dot products of values in the two &array;s.
Value type <type>T</type> equals the type of the
<function>dot</function> operating on <type>T1</type>
and <type>T2</type>.</entry>
</row>
<row>
! <entry><statement>Array<T> dot (const Array<T1>& A, const T2& r)</statement></entry>
<entry>Returns the dot products of values in the &array;
with <varname>r</varname>.
Value type <type>T</type> equals the type of the
--- 463,618 ----
</row>
<row rowsep="1">
<entry>Powers, Exponentiation, and Logarithmic Functions</entry>
! <entry><literal>#include <math.h></literal></entry>
</row>
<row>
! <entry><literal>Array<T> PETE_identity (const Array<T>& A)</literal></entry>
<entry>Returns the &array;. That is, it applies the identity operation.</entry>
</row>
<row>
! <entry><literal>Array<T> sqrt (const Array<T>& A)</literal></entry>
<entry>Returns the square roots of the &array;'s values.</entry>
</row>
<row>
! <entry><literal>Array<T> pow (const Array<T1>& A, const Array<T2>& B)</literal></entry>
<entry>Raises <varname>A</varname>'s values by the
corresponding power in <varname>B</varname>.</entry>
</row>
<row>
! <entry><literal>Array<T> pow (const Array<T1>& A, const T2& r)</literal></entry>
<entry>Raises <varname>A</varname>'s values by the power <varname>r</varname>.</entry>
</row>
<row>
! <entry><literal>Array<T> pow (const T1& l, const Array<T2>& B)</literal></entry>
<entry>Raises <varname>l</varname> by the powers
in <varname>B</varname>.</entry>
</row>
<row>
! <entry><literal>Array<T> pow2 (const Array<T>& A)</literal></entry>
<entry>Returns the squares of <varname>A</varname>'s values.</entry>
</row>
<row>
! <entry><literal>Array<T> pow3 (const Array<T>& A)</literal></entry>
<entry>Returns the cubes of <varname>A</varname>'s values.</entry>
</row>
<row>
! <entry><literal>Array<T> pow4 (const Array<T>& A)</literal></entry>
<entry>Returns the fourth powers of <varname>A</varname>'s values.</entry>
</row>
<row>
! <entry><literal>Array<T> ldexp (const Array<T1>& A, const Array<int>& B)</literal></entry>
<entry>Multiplies <varname>A</varname>'s values by two raised
to the corresponding value in <varname>B</varname>.</entry>
</row>
<row>
! <entry><literal>Array<T> ldexp (const Array<T1>& A, int r)</literal></entry>
<entry>Multiplies <varname>A</varname>'s values by two raised
to the <varname>r</varname><subscript>th</subscript>
power.</entry>
</row>
<row>
! <entry><literal>Array<T> ldexp (const T1& l, const Array<int>& B)</literal></entry>
<entry>Multiplies <varname>l</varname> by two raised
to the values in <varname>B</varname>.</entry>
</row>
<row>
! <entry><literal>Array<T> exp (const Array<T>& A)</literal></entry>
<entry>Returns the exponentiations of the &array;'s values.</entry>
</row>
<row>
! <entry><literal>Array<T> log (const Array<T>& A)</literal></entry>
<entry>Returns the natural logarithms of the &array;'s values.</entry>
</row>
<row>
! <entry><literal>Array<T> log10 (const Array<T>& A)</literal></entry>
<entry>Returns the base-10 logarithms of the &array;'s values.</entry>
</row>
<row rowsep="1">
<entry>Functions Involving Complex Numbers</entry>
! <entry><literal>#include <complex></literal></entry>
</row>
<row>
! <entry><literal>Array<T> real (const Array<complex<T&closeclose;& A)</literal></entry>
<entry>Returns the real parts of <varname>A</varname>'s complex numbers.</entry>
</row>
<row>
! <entry><literal>Array<T> imag (const Array<complex<T&closeclose;& A)</literal></entry>
<entry>Returns the imaginary parts of <varname>A</varname>'s complex numbers.</entry>
</row>
<row>
! <entry><literal>Array<T> abs (const Array<complex<T&closeclose;& A)</literal></entry>
<entry>Returns the absolute values (magnitudes) of
<varname>A</varname>'s complex numbers.</entry>
</row>
<row>
! <entry><literal>Array<T> abs (const Array<T>& A)</literal></entry>
<entry>Returns the absolute values of <varname>A</varname>'s values.</entry>
</row>
<row>
! <entry><literal>Array<T> arg (const Array<complex<T&closeclose;& A)</literal></entry>
<entry>Returns the angle representations (in radians) of the
polar representations of <varname>A</varname>'s complex
numbers.</entry>
</row>
<row>
! <entry><literal>Array<T> norm (const Array<complex<T&closeclose;& A)</literal></entry>
<entry>Returns the squared absolute values of
<varname>A</varname>'s complex numbers.</entry>
</row>
<row>
! <entry><literal>Array<complex<T&closeclose; conj (const Array<complex<T&closeclose;& A)</literal></entry>
<entry>Returns the complex conjugates of
<varname>A</varname>'s complex numbers.</entry>
</row>
<row>
! <entry><literal>Array<complex<T&closeclose; polar (const Array<T1>& A, const Array<T2>& B)</literal></entry>
<entry>Returns the complex numbers created from polar
coordinates (magnitudes and phase angles) in corresponding
&array;s.</entry>
</row>
<row>
! <entry><literal>Array<complex<T&closeclose; polar (const T1& l, const Array<T2>& A)</literal></entry>
<entry>Returns the complex numbers created from polar
coordinates with magnitude <varname>l</varname> and
phase angles in the &array;.</entry>
</row>
<row>
! <entry><literal>Array<complex<T&closeclose; polar (const Array<T1>& A, const T2& r)</literal></entry>
<entry>Returns the complex numbers created from polar
coordinates with magnitudes in the &array; and phase
angle <varname>r</varname>.</entry>
</row>
<row rowsep="1">
<entry>Functions Involving Matrices and Tensors</entry>
! <entry><literal>#include "Pooma/Tiny.h"</literal></entry>
</row>
<row>
! <entry><literal>T trace (const Array<T>& A)</literal></entry>
<entry>Returns the sum of the <varname>A</varname>'s diagonal
entries, viewed as a matrix.</entry>
</row>
<row>
! <entry><literal>T det (const Array<T>& A)</literal></entry>
<entry>Returns the determinant of <varname>A</varname>, viewed as a matrix.</entry>
</row>
<row>
! <entry><literal>Array<T> transpose (const Array<T>& A)</literal></entry>
<entry>Returns the transpose of <varname>A</varname>, viewed as a matrix.</entry>
</row>
<row>
! <entry><literal>Array<T> symmetrize (const Array<T>& A)</literal></entry>
<entry>Returns the tensors of <varname>A</varname> with the
requested output symmetry.</entry>
</row>
<row>
! <entry><literal>Array<T> dot (const Array<T1>& A, const Array<T2>& B)</literal></entry>
<entry>Returns the dot products of values in the two &array;s.
Value type <type>T</type> equals the type of the
<function>dot</function> operating on <type>T1</type>
and <type>T2</type>.</entry>
</row>
<row>
! <entry><literal>Array<T> dot (const Array<T1>& A, const T2& r)</literal></entry>
<entry>Returns the dot products of values in the &array;
with <varname>r</varname>.
Value type <type>T</type> equals the type of the
*************** std::cout &openopen; A-B &openopen; std:
*** 620,633 ****
and <type>T2</type>.</entry>
</row>
<row>
! <entry><statement>Array<T> dot (const T1& l, const Array<T2>& A)</statement></entry>
<entry>Returns the dot products of <varname>l</varname> with
values in the &array;. Value type <type>T</type> equals the type of the
<function>dot</function> operating on <type>T1</type>
and <type>T2</type>.</entry>
</row>
<row>
! <entry><statement>Array<Tensor<T&closeclose; outerProduct (const Array<T1>& A, const Array<T2>& B)</statement></entry>
<entry>Returns tensors created by computing the outer product
of corresponding vectors in the two &array;s. Value
type <type>T</type> equals the type of the product of
--- 620,633 ----
and <type>T2</type>.</entry>
</row>
<row>
! <entry><literal>Array<T> dot (const T1& l, const Array<T2>& A)</literal></entry>
<entry>Returns the dot products of <varname>l</varname> with
values in the &array;. Value type <type>T</type> equals the type of the
<function>dot</function> operating on <type>T1</type>
and <type>T2</type>.</entry>
</row>
<row>
! <entry><literal>Array<Tensor<T&closeclose; outerProduct (const Array<T1>& A, const Array<T2>& B)</literal></entry>
<entry>Returns tensors created by computing the outer product
of corresponding vectors in the two &array;s. Value
type <type>T</type> equals the type of the product of
*************** std::cout &openopen; A-B &openopen; std:
*** 635,641 ****
must have the same length.</entry>
</row>
<row>
! <entry><statement>Array<Tensor<T&closeclose; outerProduct (const T1& l, const Array<T2>& A)</statement></entry>
<entry>Returns tensors created by computing the outer product
of <varname>l</varname> with the vectors in the &array;. Value
type <type>T</type> equals the type of the product of
--- 635,641 ----
must have the same length.</entry>
</row>
<row>
! <entry><literal>Array<Tensor<T&closeclose; outerProduct (const T1& l, const Array<T2>& A)</literal></entry>
<entry>Returns tensors created by computing the outer product
of <varname>l</varname> with the vectors in the &array;. Value
type <type>T</type> equals the type of the product of
*************** std::cout &openopen; A-B &openopen; std:
*** 643,649 ****
must have the same length.</entry>
</row>
<row>
! <entry><statement>Array<Tensor<T&closeclose; outerProduct (const Array<T1>& A, const T2& r)</statement></entry>
<entry>Returns tensors created by computing the outer product
of vectors in the &array; with <varname>r</varname>. Value
type <type>T</type> equals the type of the product of
--- 643,649 ----
must have the same length.</entry>
</row>
<row>
! <entry><literal>Array<Tensor<T&closeclose; outerProduct (const Array<T1>& A, const T2& r)</literal></entry>
<entry>Returns tensors created by computing the outer product
of vectors in the &array; with <varname>r</varname>. Value
type <type>T</type> equals the type of the product of
*************** std::cout &openopen; A-B &openopen; std:
*** 651,658 ****
must have the same length.</entry>
</row>
<row>
! <entry><statement>TinyMatrix<T> outerProductAsTinyMatrix (const Array<T1>& A, const
! Array<T2>& B)</statement></entry>
<entry>Returns matrices created by computing the outer product
of corresponding vectors in the two &array;s. Value
type <type>T</type> equals the type of the product of
--- 651,658 ----
must have the same length.</entry>
</row>
<row>
! <entry><literal>TinyMatrix<T> outerProductAsTinyMatrix (const Array<T1>& A, const
! Array<T2>& B)</literal></entry>
<entry>Returns matrices created by computing the outer product
of corresponding vectors in the two &array;s. Value
type <type>T</type> equals the type of the product of
*************** std::cout &openopen; A-B &openopen; std:
*** 660,667 ****
the same length.</entry>
</row>
<row>
! <entry><statement>TinyMatrix<T> outerProductAsTinyMatrix (const T1& l, const
! Array<T2>& A)</statement></entry>
<entry>Returns matrices created by computing the outer
product of <varname>l</varname> with the vectors in the &array;. Value
type <type>T</type> equals the type of the product of
--- 660,667 ----
the same length.</entry>
</row>
<row>
! <entry><literal>TinyMatrix<T> outerProductAsTinyMatrix (const T1& l, const
! Array<T2>& A)</literal></entry>
<entry>Returns matrices created by computing the outer
product of <varname>l</varname> with the vectors in the &array;. Value
type <type>T</type> equals the type of the product of
*************** std::cout &openopen; A-B &openopen; std:
*** 669,676 ****
have the same length.</entry>
</row>
<row>
! <entry><statement>TinyMatrix<T> outerProductAsTinyMatrix (const
! Array<T1>& A, const T2& r)</statement></entry>
<entry>Returns matrices created by computing the outer
product of the vectors in the &array;
with <varname>r</varname>. Value
--- 669,676 ----
have the same length.</entry>
</row>
<row>
! <entry><literal>TinyMatrix<T> outerProductAsTinyMatrix (const
! Array<T1>& A, const T2& r)</literal></entry>
<entry>Returns matrices created by computing the outer
product of the vectors in the &array;
with <varname>r</varname>. Value
*************** std::cout &openopen; A-B &openopen; std:
*** 687,694 ****
<function>max</function> and <function>min</function> functions
supplement named comparison functions. For example,
<function>LT</function> and <function>LE</function> compute the
! same thing as the <operator><</operator> and
! <operator><=</operator> operators.</para>
<table frame="none" colsep="0" rowsep="0" tocentry="1"
orient="port" pgwide="0" id="data_parallel-use-comparison_functions_table">
--- 687,694 ----
<function>max</function> and <function>min</function> functions
supplement named comparison functions. For example,
<function>LT</function> and <function>LE</function> compute the
! same thing as the <literal><</literal> and
! <literal><=</literal> operators.</para>
<table frame="none" colsep="0" rowsep="0" tocentry="1"
orient="port" pgwide="0" id="data_parallel-use-comparison_functions_table">
*************** std::cout &openopen; A-B &openopen; std:
*** 703,826 ****
</thead>
<tbody valign="top">
<row>
! <entry><statement>Array<T> max (const Array<T1>& A, const Array<T2>& B)</statement></entry>
<entry>Returns the maximum of corresponding &array; values.</entry>
</row>
<row>
! <entry><statement>Array<T> max (const T1& l, const Array<T2>& A)</statement></entry>
<entry>Returns the maximums of <varname>l</varname> with the &array;'s values.</entry>
</row>
<row>
! <entry><statement>Array<T> max (const Array<T1>& A, const T2& r)</statement></entry>
<entry>Returns the maximums of the &array;'s values with <varname>r</varname>.</entry>
</row>
<row>
! <entry><statement>Array<T> min (const Array<T1>& A, const Array<T2>& B)</statement></entry>
<entry>Returns the minimum of corresponding &array; values.</entry>
</row>
<row>
! <entry><statement>Array<T> min (const T1& l, const Array<T2>& A)</statement></entry>
<entry>Returns the minimums of <varname>l</varname> with the &array;'s values.</entry>
</row>
<row>
! <entry><statement>Array<T> min (const Array<T1>& A, const T2& r)</statement></entry>
<entry>Returns the minimums of the &array;'s values with <varname>r</varname>.</entry>
</row>
<row>
! <entry><statement>Array<bool> LT (const Array<T1>& A, const Array<T2>& B)</statement></entry>
<entry>Returns booleans from using the less-than
! operator <operator><</operator> to compare corresponding &array; values in
<varname>A</varname> and <varname>B</varname>.</entry>
</row>
<row>
! <entry><statement>Array<bool> LT (const T1& r, const Array<T2>& A)</statement></entry>
<entry>Returns booleans from using the less-than
! operator <operator><</operator> to compare <varname>l</varname> with the &array;'s
values.</entry>
</row>
<row>
! <entry><statement>Array<bool> LT (const Array<T1>& A, const T2& r)</statement></entry>
<entry>Returns booleans from using the less-than
! operator <operator><</operator> to compare the &array;'s
values with <varname>r</varname>.</entry>
</row>
<row>
! <entry><statement>Array<bool> LE (const Array<T1>& A, const Array<T2>& B)</statement></entry>
<entry>Returns booleans from using the less-than-or-equal
! operator <operator><=</operator> to compare &array; values in
<varname>A</varname> and <varname>B</varname>.</entry>
</row>
<row>
! <entry><statement>Array<bool> LE (const T1& l, const Array<T2>& A)</statement></entry>
<entry>Returns booleans from using the less-than-or-equal
! operator <operator><=</operator> to compare <varname>l</varname> with the &array;'s values.</entry>
</row>
<row>
! <entry><statement>Array<bool> LE (const Array<T1>& A, const T2& r)</statement></entry>
<entry>Returns booleans from using the less-than-or-equal
! operator <operator><=</operator> to compare the &array;'s values
with <varname>r</varname>.</entry>
</row>
<row>
! <entry><statement>Array<bool> GE (const Array<T1>& A, const Array<T2>& B)</statement></entry>
<entry>Returns booleans from using the greater-than-or-equal
! operator <operator>>=</operator> to compare &array; values in
<varname>A</varname> and <varname>B</varname>.</entry>
</row>
<row>
! <entry><statement>Array<bool> GE (const T1& l, const Array<T2>& A)</statement></entry>
<entry>Returns booleans from using the greater-than-or-equal
! operator <operator>>=</operator> to compare <varname>l</varname> with the &array;'s values.</entry>
</row>
<row>
! <entry><statement>Array<bool> GE (const Array<T1>& A, const T2& r)</statement></entry>
<entry>Returns booleans from using the greater-than-or-equal
! operator <operator>>=</operator> to compare the &array;'s values with <varname>r</varname>.</entry>
</row>
<row>
! <entry><statement>Array<bool> GT (const Array<T1>& A, const Array<T2>& B)</statement></entry>
<entry>Returns booleans from using the greater-than
! operator <operator>></operator> to compare &array; values in
<varname>A</varname> and <varname>B</varname>.</entry>
</row>
<row>
! <entry><statement>Array<bool> GT (const T1& l, const Array<T2>& A)</statement></entry>
<entry>Returns booleans from using the greater-than
! operator <operator>></operator> to compare <varname>l</varname> with the &array;'s values.</entry>
</row>
<row>
! <entry><statement>Array<bool> GT (const Array<T1>& A, const T2& r)</statement></entry>
<entry>Returns booleans from using the greater-than
! operator <operator>></operator> to compare the &array;'s values with <varname>r</varname>.</entry>
</row>
<row>
! <entry><statement>Array<bool> EQ (const Array<T1>& A, const Array<T2>& B)</statement></entry>
<entry>Returns booleans from determining whether
corresponding &array; values in <varname>A</varname> and
<varname>B</varname> are equal.</entry>
</row>
<row>
! <entry><statement>Array<bool> EQ (const T1& l, const Array<T2>& A)</statement></entry>
<entry>Returns booleans from determining whether
<varname>l</varname> equals the &array;'s values.</entry>
</row>
<row>
! <entry><statement>Array<bool> EQ (const Array<T1>& A, const T2& r)</statement></entry>
<entry>Returns booleans from determining whether the &array;'s values equal <varname>r</varname>.</entry>
</row>
<row>
! <entry><statement>Array<bool> NE (const Array<T1>& A, const Array<T2>& B)</statement></entry>
<entry>Returns booleans from determining whether
corresponding &array; values in <varname>A</varname> and
<varname>B</varname> are not equal.</entry>
</row>
<row>
! <entry><statement>Array<bool> NE (const T1& l, const Array<T2>& A)</statement></entry>
<entry>Returns booleans from determining whether
<varname>l</varname> does not equal the &array;'s values.</entry>
</row>
<row>
! <entry><statement>Array<bool> NE (const Array<T1>& A, const T2& r)</statement></entry>
<entry>Returns booleans from determining whether the
&array;'s values are not equal to <varname>r</varname>.</entry>
</row>
--- 703,826 ----
</thead>
<tbody valign="top">
<row>
! <entry><literal>Array<T> max (const Array<T1>& A, const Array<T2>& B)</literal></entry>
<entry>Returns the maximum of corresponding &array; values.</entry>
</row>
<row>
! <entry><literal>Array<T> max (const T1& l, const Array<T2>& A)</literal></entry>
<entry>Returns the maximums of <varname>l</varname> with the &array;'s values.</entry>
</row>
<row>
! <entry><literal>Array<T> max (const Array<T1>& A, const T2& r)</literal></entry>
<entry>Returns the maximums of the &array;'s values with <varname>r</varname>.</entry>
</row>
<row>
! <entry><literal>Array<T> min (const Array<T1>& A, const Array<T2>& B)</literal></entry>
<entry>Returns the minimum of corresponding &array; values.</entry>
</row>
<row>
! <entry><literal>Array<T> min (const T1& l, const Array<T2>& A)</literal></entry>
<entry>Returns the minimums of <varname>l</varname> with the &array;'s values.</entry>
</row>
<row>
! <entry><literal>Array<T> min (const Array<T1>& A, const T2& r)</literal></entry>
<entry>Returns the minimums of the &array;'s values with <varname>r</varname>.</entry>
</row>
<row>
! <entry><literal>Array<bool> LT (const Array<T1>& A, const Array<T2>& B)</literal></entry>
<entry>Returns booleans from using the less-than
! operator <literal><</literal> to compare corresponding &array; values in
<varname>A</varname> and <varname>B</varname>.</entry>
</row>
<row>
! <entry><literal>Array<bool> LT (const T1& r, const Array<T2>& A)</literal></entry>
<entry>Returns booleans from using the less-than
! operator <literal><</literal> to compare <varname>l</varname> with the &array;'s
values.</entry>
</row>
<row>
! <entry><literal>Array<bool> LT (const Array<T1>& A, const T2& r)</literal></entry>
<entry>Returns booleans from using the less-than
! operator <literal><</literal> to compare the &array;'s
values with <varname>r</varname>.</entry>
</row>
<row>
! <entry><literal>Array<bool> LE (const Array<T1>& A, const Array<T2>& B)</literal></entry>
<entry>Returns booleans from using the less-than-or-equal
! operator <literal><=</literal> to compare &array; values in
<varname>A</varname> and <varname>B</varname>.</entry>
</row>
<row>
! <entry><literal>Array<bool> LE (const T1& l, const Array<T2>& A)</literal></entry>
<entry>Returns booleans from using the less-than-or-equal
! operator <literal><=</literal> to compare <varname>l</varname> with the &array;'s values.</entry>
</row>
<row>
! <entry><literal>Array<bool> LE (const Array<T1>& A, const T2& r)</literal></entry>
<entry>Returns booleans from using the less-than-or-equal
! operator <literal><=</literal> to compare the &array;'s values
with <varname>r</varname>.</entry>
</row>
<row>
! <entry><literal>Array<bool> GE (const Array<T1>& A, const Array<T2>& B)</literal></entry>
<entry>Returns booleans from using the greater-than-or-equal
! operator <literal>>=</literal> to compare &array; values in
<varname>A</varname> and <varname>B</varname>.</entry>
</row>
<row>
! <entry><literal>Array<bool> GE (const T1& l, const Array<T2>& A)</literal></entry>
<entry>Returns booleans from using the greater-than-or-equal
! operator <literal>>=</literal> to compare <varname>l</varname> with the &array;'s values.</entry>
</row>
<row>
! <entry><literal>Array<bool> GE (const Array<T1>& A, const T2& r)</literal></entry>
<entry>Returns booleans from using the greater-than-or-equal
! operator <literal>>=</literal> to compare the &array;'s values with <varname>r</varname>.</entry>
</row>
<row>
! <entry><literal>Array<bool> GT (const Array<T1>& A, const Array<T2>& B)</literal></entry>
<entry>Returns booleans from using the greater-than
! operator <literal>></literal> to compare &array; values in
<varname>A</varname> and <varname>B</varname>.</entry>
</row>
<row>
! <entry><literal>Array<bool> GT (const T1& l, const Array<T2>& A)</literal></entry>
<entry>Returns booleans from using the greater-than
! operator <literal>></literal> to compare <varname>l</varname> with the &array;'s values.</entry>
</row>
<row>
! <entry><literal>Array<bool> GT (const Array<T1>& A, const T2& r)</literal></entry>
<entry>Returns booleans from using the greater-than
! operator <literal>></literal> to compare the &array;'s values with <varname>r</varname>.</entry>
</row>
<row>
! <entry><literal>Array<bool> EQ (const Array<T1>& A, const Array<T2>& B)</literal></entry>
<entry>Returns booleans from determining whether
corresponding &array; values in <varname>A</varname> and
<varname>B</varname> are equal.</entry>
</row>
<row>
! <entry><literal>Array<bool> EQ (const T1& l, const Array<T2>& A)</literal></entry>
<entry>Returns booleans from determining whether
<varname>l</varname> equals the &array;'s values.</entry>
</row>
<row>
! <entry><literal>Array<bool> EQ (const Array<T1>& A, const T2& r)</literal></entry>
<entry>Returns booleans from determining whether the &array;'s values equal <varname>r</varname>.</entry>
</row>
<row>
! <entry><literal>Array<bool> NE (const Array<T1>& A, const Array<T2>& B)</literal></entry>
<entry>Returns booleans from determining whether
corresponding &array; values in <varname>A</varname> and
<varname>B</varname> are not equal.</entry>
</row>
<row>
! <entry><literal>Array<bool> NE (const T1& l, const Array<T2>& A)</literal></entry>
<entry>Returns booleans from determining whether
<varname>l</varname> does not equal the &array;'s values.</entry>
</row>
<row>
! <entry><literal>Array<bool> NE (const Array<T1>& A, const T2& r)</literal></entry>
<entry>Returns booleans from determining whether the
&array;'s values are not equal to <varname>r</varname>.</entry>
</row>
*************** std::cout &openopen; A-B &openopen; std:
*** 834,840 ****
two functions. <function>peteCast</function> casts all values in
an &array; to the type specified by its first parameter. The
<function>where</function> function generalizes the trinary
! <operator>?:</operator> operator. Using its first &array;
argument as boolean values, it returns an &array; of just two
values: <parameter>t</parameter> and <parameter>f</parameter>.</para>
--- 834,840 ----
two functions. <function>peteCast</function> casts all values in
an &array; to the type specified by its first parameter. The
<function>where</function> function generalizes the trinary
! <literal>?:</literal> operator. Using its first &array;
argument as boolean values, it returns an &array; of just two
values: <parameter>t</parameter> and <parameter>f</parameter>.</para>
*************** std::cout &openopen; A-B &openopen; std:
*** 851,862 ****
</thead>
<tbody valign="top">
<row>
! <entry><statement>Array<T> peteCast (const T1&, const Array<T>& A)</statement></entry>
<entry>Returns the casting of the &array;'s values to type <type>T1</type>.</entry>
</row>
<row>
! <entry><statement>Array<T> where (const Array<T1>& A, const T2& t, const T3& f)</statement></entry>
! <entry>Generalizes the <operator>?:</operator> operator,
returning an &array; of <varname>t</varname> and
<varname>f</varname> values depending on whether
<varname>A</varname>'s values are true or false,
--- 851,862 ----
</thead>
<tbody valign="top">
<row>
! <entry><literal>Array<T> peteCast (const T1&, const Array<T>& A)</literal></entry>
<entry>Returns the casting of the &array;'s values to type <type>T1</type>.</entry>
</row>
<row>
! <entry><literal>Array<T> where (const Array<T1>& A, const T2& t, const T3& f)</literal></entry>
! <entry>Generalizes the <literal>?:</literal> operator,
returning an &array; of <varname>t</varname> and
<varname>f</varname> values depending on whether
<varname>A</varname>'s values are true or false,
*************** B = 2.0;
*** 926,932 ****
A += -A + 2*B;
std::cout &openopen; A &openopen; std::endl;
</programlisting> Our goal is to transform the data-parallel
! statement <statement>A += -A + 2*B</statement> into a single
loop, preferably without using intermediary containers. To
simplify notation, let <type>Ar</type> abbreviate the type
<type>Array<1, double, Brick></type>.</para>
--- 926,932 ----
A += -A + 2*B;
std::cout &openopen; A &openopen; std::endl;
</programlisting> Our goal is to transform the data-parallel
! statement <literal>A += -A + 2*B</literal> into a single
loop, preferably without using intermediary containers. To
simplify notation, let <type>Ar</type> abbreviate the type
<type>Array<1, double, Brick></type>.</para>
*************** std::cout &openopen; A &openopen; std::e
*** 934,945 ****
<para>Using overloaded arithmetic operators would require using
intermediate containers to evaluate the statement. For example,
<!-- FIXME: What is the proper tag for an inline function
! prototype? --> the sum's left operand <statement>-A</statement>
! would be computed by the overloaded unary operator <statement>Ar
! operator-(const Ar&)</statement>, which would produce an
! intermediate &array;. <statement>Ar operator*(double,
! const Ar&)</statement> would produce another intermediate
! &array; holding <statement>2*B</statement>. Yet another
intermediate container would hold their sum, all before
performing the assignment. Thus, three intermediate containers
would be created and destroyed. Below, we show these are
--- 934,945 ----
<para>Using overloaded arithmetic operators would require using
intermediate containers to evaluate the statement. For example,
<!-- FIXME: What is the proper tag for an inline function
! prototype? --> the sum's left operand <literal>-A</literal>
! would be computed by the overloaded unary operator <literal>Ar
! operator-(const Ar&)</literal>, which would produce an
! intermediate &array;. <literal>Ar operator*(double,
! const Ar&)</literal> would produce another intermediate
! &array; holding <literal>2*B</literal>. Yet another
intermediate container would hold their sum, all before
performing the assignment. Thus, three intermediate containers
would be created and destroyed. Below, we show these are
*************** std::cout &openopen; A &openopen; std::e
*** 965,976 ****
intermediate loops or temporary values are needed.</para>
<para>Before explaining the implementation, let us illustrate
! using our example statement <statement>A += -A + 2*B</statement>.
Evaluating the right-hand side creates a parse tree similar to
the one in <xref
linkend="data_parallel-implementation-pete-tree_figure"></xref>.
For example, the overloaded unary minus operator yields a tree
! node representing <statement>-A</statement>, having a unary-minus
function object, and having type
<programlisting>
Expression<UnaryNode<OpMinus,Ar&closeclose;
--- 965,976 ----
intermediate loops or temporary values are needed.</para>
<para>Before explaining the implementation, let us illustrate
! using our example statement <literal>A += -A + 2*B</literal>.
Evaluating the right-hand side creates a parse tree similar to
the one in <xref
linkend="data_parallel-implementation-pete-tree_figure"></xref>.
For example, the overloaded unary minus operator yields a tree
! node representing <literal>-A</literal>, having a unary-minus
function object, and having type
<programlisting>
Expression<UnaryNode<OpMinus,Ar&closeclose;
*************** Expression<BinaryNode<OpAdd,
*** 984,990 ****
representing <varname>A</varname>.</para>
<figure float="1" id="data_parallel-implementation-pete-tree_figure">
! <title>Annotated Parse Tree for <statement>-A + 2*B</statement></title>
<mediaobject>
<imageobject>
<imagedata fileref="figures/data-parallel.101" format="EPS" align="center"></imagedata>
--- 984,990 ----
representing <varname>A</varname>.</para>
<figure float="1" id="data_parallel-implementation-pete-tree_figure">
! <title>Annotated Parse Tree for <literal>-A + 2*B</literal></title>
<mediaobject>
<imageobject>
<imagedata fileref="figures/data-parallel.101" format="EPS" align="center"></imagedata>
*************** Expression<BinaryNode<OpAdd,
*** 996,1009 ****
<phrase>A parse tree for the statement is produced.</phrase>
</textobject>
<caption>
! <para>The parse tree for <statement>-A + 2*B</statement> with
type annotations. The complete type of a node equals the
concatenation of the preorder traversal of annotated types.</para>
</caption>
</mediaobject>
</figure>
! <para>Finally, the assignment operator <statement>+=</statement>
calls the <function>evaluate</function> function corresponding to
the left-hand side's type. At compile time, it produces the code
for the computation. Since this templated function is
--- 996,1009 ----
<phrase>A parse tree for the statement is produced.</phrase>
</textobject>
<caption>
! <para>The parse tree for <literal>-A + 2*B</literal> with
type annotations. The complete type of a node equals the
concatenation of the preorder traversal of annotated types.</para>
</caption>
</mediaobject>
</figure>
! <para>Finally, the assignment operator <literal>+=</literal>
calls the <function>evaluate</function> function corresponding to
the left-hand side's type. At compile time, it produces the code
for the computation. Since this templated function is
*************** Expression<BinaryNode<OpAdd,
*** 1033,1039 ****
the three things it must store:
<variablelist>
<varlistentry>
! <term><statement>Op</statement></term>
<listitem>
<para>the type of the node's operation. For example, the
<type>OpAdd</type> type represents adding two operands
--- 1033,1039 ----
the three things it must store:
<variablelist>
<varlistentry>
! <term><literal>Op</literal></term>
<listitem>
<para>the type of the node's operation. For example, the
<type>OpAdd</type> type represents adding two operands
*************** Expression<BinaryNode<OpAdd,
*** 1041,1053 ****
</listitem>
</varlistentry>
<varlistentry>
! <term><statement>Left</statement></term>
<listitem>
<para>the type of the left child.</para>
</listitem>
</varlistentry>
<varlistentry>
! <term><statement>Right</statement></term>
<listitem>
<para>the type of the right child.</para>
</listitem>
--- 1041,1053 ----
</listitem>
</varlistentry>
<varlistentry>
! <term><literal>Left</literal></term>
<listitem>
<para>the type of the left child.</para>
</listitem>
</varlistentry>
<varlistentry>
! <term><literal>Right</literal></term>
<listitem>
<para>the type of the right child.</para>
</listitem>
*************** struct CreateLeaf
*** 1096,1102 ****
};
</programlisting> The <type>Scalar</type> class stores the scalar
value. The <type>CreateLeaf</type>'s <type>Leaf_t</type> type
! indicates its type. The <statement>static</statement>
<function>make</function> function is invoked by an overloaded
operator function when creating its children.</para>
--- 1096,1102 ----
};
</programlisting> The <type>Scalar</type> class stores the scalar
value. The <type>CreateLeaf</type>'s <type>Leaf_t</type> type
! indicates its type. The <literal>static</literal>
<function>make</function> function is invoked by an overloaded
operator function when creating its children.</para>
*************** CreateLeaf<Array<D1,T1,E1> >
*** 1149,1155 ****
programmers to store trees in different formats. The &pooma;
implementation stores them as <type>Expression</type>s. The
function's return type is similar to the
! <statement>return</statement> statement except it extracts the
type from <type>Expression</type>'s internal
<type>Expression_t</type> type.</para>
--- 1149,1155 ----
programmers to store trees in different formats. The &pooma;
implementation stores them as <type>Expression</type>s. The
function's return type is similar to the
! <literal>return</literal> statement except it extracts the
type from <type>Expression</type>'s internal
<type>Expression_t</type> type.</para>
*************** classes
*** 1171,1178 ****
Inside the &array; class definition, each such operator just
invokes the <function>assign</function> function with a
corresponding function object. For example,
! <function>operator+=</function> invokes <statement>assign(*this,
! rhs, OpAddAssign())</statement>. <varname>rhs</varname> is the
parse tree object for the right-hand side. Calling this function
invokes <function>evaluate</function>, which begins the
evaluation.</para>
--- 1171,1178 ----
Inside the &array; class definition, each such operator just
invokes the <function>assign</function> function with a
corresponding function object. For example,
! <function>operator+=</function> invokes <literal>assign(*this,
! rhs, OpAddAssign())</literal>. <varname>rhs</varname> is the
parse tree object for the right-hand side. Calling this function
invokes <function>evaluate</function>, which begins the
evaluation.</para>
*************** for (int i = a's domain[0].first(); i <
*** 1204,1210 ****
assignment operation, and <varname>rhs</varname> is the right-hand
side's parse tree.</para>
! <para>Evaluating <statement>rhs.read(i)</statement> inlines into a
call to the <function>forEach</function> function. This function
performs a <emphasis>compile-time</emphasis> post-order parse-tree
traversal. Its general form is
--- 1204,1210 ----
assignment operation, and <varname>rhs</varname> is the right-hand
side's parse tree.</para>
! <para>Evaluating <literal>rhs.read(i)</literal> inlines into a
call to the <function>forEach</function> function. This function
performs a <emphasis>compile-time</emphasis> post-order parse-tree
traversal. Its general form is
*************** struct ForEach<UnaryNode<Op, A>
*** 1249,1255 ****
};
</programlisting> Since this structure is specialized for
<type>UnaryNode</type>s, the first parameter of its
! <statement>static </statement> <function>apply</function> function
is a <type>UnaryNode</type>. After recursively calling its child,
it invokes the combination function indicated by the
<type>Combine1</type> traits class. In our example, the
--- 1249,1255 ----
};
</programlisting> Since this structure is specialized for
<type>UnaryNode</type>s, the first parameter of its
! <literal>static </literal> <function>apply</function> function
is a <type>UnaryNode</type>. After recursively calling its child,
it invokes the combination function indicated by the
<type>Combine1</type> traits class. In our example, the
Index: glossary.xml
===================================================================
RCS file: /home/pooma/Repository/r2/docs/manual/glossary.xml,v
retrieving revision 1.9
diff -c -p -r1.9 glossary.xml
*** glossary.xml 2002/01/25 02:28:26 1.9
--- glossary.xml 2002/01/30 23:47:32
***************
*** 227,233 ****
<glossdef>
<para>describes an expression involving a (non-singleton) subset
of a container's values. For example,
! <statement>sin(&container;)</statement> is an expression
indicating that the <function>sin</function> is applied to each
value in container &container;.</para>
<glossseealso otherterm="glossary-element_wise">element wise</glossseealso>
--- 227,233 ----
<glossdef>
<para>describes an expression involving a (non-singleton) subset
of a container's values. For example,
! <literal>sin(&container;)</literal> is an expression
indicating that the <function>sin</function> is applied to each
value in container &container;.</para>
<glossseealso otherterm="glossary-element_wise">element wise</glossseealso>
***************
*** 305,311 ****
<glossterm>element wise</glossterm>
<glossdef>
<para>describes accesses to individual values within a container.
! For example, <statement>&container(-4,3)</statement> represents one
particular value in the container &container;.</para>
<glossseealso otherterm="glossary-data_parallel">data parallel</glossseealso>
<glossseealso otherterm="glossary-relation">relation</glossseealso>
--- 305,311 ----
<glossterm>element wise</glossterm>
<glossdef>
<para>describes accesses to individual values within a container.
! For example, <literal>&container(-4,3)</literal> represents one
particular value in the container &container;.</para>
<glossseealso otherterm="glossary-data_parallel">data parallel</glossseealso>
<glossseealso otherterm="glossary-relation">relation</glossseealso>
***************
*** 413,419 ****
<glossdef>
<para>object that can behave as a function. The object can store
values that the function uses. If its function is called
! <methodname>operator()</methodname>, the object can be invoked as
a function.</para>
</glossdef>
</glossentry>
--- 413,419 ----
<glossdef>
<para>object that can behave as a function. The object can store
values that the function uses. If its function is called
! <literal>operator()</literal>, the object can be invoked as
a function.</para>
</glossdef>
</glossentry>
*************** guard layer</glossseealso>
*** 602,608 ****
</indexterm>
function defining a function invoked using a &cc; operator. For
example, the <function>operator+</function> function defines the
! result of using the <operator>+</operator>.</para>
</glossdef>
</glossentry>
</glossdiv>
--- 602,608 ----
</indexterm>
function defining a function invoked using a &cc; operator. For
example, the <function>operator+</function> function defines the
! result of using the <literal>+</literal>.</para>
</glossdef>
</glossentry>
</glossdiv>
*************** guard layer</glossseealso>
*** 814,822 ****
<primary>template instantiation</primary>
</indexterm>
applying a template class to template parameter arguments to create a
! type. For example, <statement>foo<double,3></statement>
! instantiates <statement>template <typename T, int n> class
! foo</statement> with the type &double; and the constant
integer 3. Template instantiation is analogous to applying a
function to function arguments.</para>
<glossseealso otherterm="glossary-template">template</glossseealso>
--- 814,822 ----
<primary>template instantiation</primary>
</indexterm>
applying a template class to template parameter arguments to create a
! type. For example, <literal>foo<double,3></literal>
! instantiates <literal>template <typename T, int n> class
! foo</literal> with the type &double; and the constant
integer 3. Template instantiation is analogous to applying a
function to function arguments.</para>
<glossseealso otherterm="glossary-template">template</glossseealso>
Index: introduction.xml
===================================================================
RCS file: /home/pooma/Repository/r2/docs/manual/introduction.xml,v
retrieving revision 1.6
diff -c -p -r1.6 introduction.xml
*** introduction.xml 2002/01/30 23:09:06 1.6
--- introduction.xml 2002/01/30 23:47:32
*************** A += -B + 2 * C;
*** 298,305 ****
</programlisting> where <varname>A</varname> and <varname>C</varname> are
<type>vector<double></type>s and <varname>B</varname> is a
<type>vector<int></type>. &naivecap; evaluation might introduce
! intermediaries for <statement>-B</statement>,
! <statement>2*C</statement>, and their sum. The presence of these
intermediaries in inner loops can measurably slow performance. To
produce a loop without intermediaries, &pete; stores each expression
as a parse tree. Using its templates, the parse tree is
--- 298,305 ----
</programlisting> where <varname>A</varname> and <varname>C</varname> are
<type>vector<double></type>s and <varname>B</varname> is a
<type>vector<int></type>. &naivecap; evaluation might introduce
! intermediaries for <literal>-B</literal>,
! <literal>2*C</literal>, and their sum. The presence of these
intermediaries in inner loops can measurably slow performance. To
produce a loop without intermediaries, &pete; stores each expression
as a parse tree. Using its templates, the parse tree is
Index: manual.xml
===================================================================
RCS file: /home/pooma/Repository/r2/docs/manual/manual.xml,v
retrieving revision 1.12
diff -c -p -r1.12 manual.xml
*** manual.xml 2002/01/30 23:09:06 1.12
--- manual.xml 2002/01/30 23:47:35
***************
*** 108,114 ****
<!-- The "DynamicArray" type. -->
<!ENTITY engine "<type>Engine</type>">
<!-- The "Engine" type. -->
! <!ENTITY false "<statement>false</statement>">
<!-- The false Boolean value. -->
<!-- Modify its tag to the appropriate one. -->
<!ENTITY field "<type>Field</type>">
--- 108,114 ----
<!-- The "DynamicArray" type. -->
<!ENTITY engine "<type>Engine</type>">
<!-- The "Engine" type. -->
! <!ENTITY false "<literal>false</literal>">
<!-- The false Boolean value. -->
<!-- Modify its tag to the appropriate one. -->
<!ENTITY field "<type>Field</type>">
***************
*** 157,163 ****
<!-- The "Stencil" type. -->
<!ENTITY tensor "<type>Tensor</type>">
<!-- The Pooma tensor type. -->
! <!ENTITY true "<statement>true</statement>">
<!-- The true Boolean value. -->
<!-- Modify its tag to the appropriate one. -->
<!ENTITY vector "<type>Vector</type>">
--- 157,163 ----
<!-- The "Stencil" type. -->
<!ENTITY tensor "<type>Tensor</type>">
<!-- The Pooma tensor type. -->
! <!ENTITY true "<literal>true</literal>">
<!-- The true Boolean value. -->
<!-- Modify its tag to the appropriate one. -->
<!ENTITY vector "<type>Vector</type>">
***************
*** 446,454 ****
and accessor functions returning individual elements. The &pooma;
&engine; class and its specializations implement the engine
concept. Given an index within the domain, an &engine;'s
! <methodname>operator()</methodname> function returns the
associated value, which can be used or changed. Its
! <methodname>read</methodname> member function returns the same
value but permitting only use, not modification. The acceptable
indices are determined by each &engine;. Most accept indices
specified using ∫ and <type>Loc<&dim;></type>
--- 446,454 ----
and accessor functions returning individual elements. The &pooma;
&engine; class and its specializations implement the engine
concept. Given an index within the domain, an &engine;'s
! <literal>operator()</literal> function returns the
associated value, which can be used or changed. Its
! <literal>read</literal> member function returns the same
value but permitting only use, not modification. The acceptable
indices are determined by each &engine;. Most accept indices
specified using ∫ and <type>Loc<&dim;></type>
***************
*** 499,505 ****
Thus, copying an &engine; or a container requires little execution
time. If an &engine; has the same data as another &engine; but it
needs its own data to modify, the
! <methodname>makeOwnCopy</methodname> member function creates such
a copy.</para>
<para>&engine;s are rarely explicitly declared. Instead a
--- 499,505 ----
Thus, copying an &engine; or a container requires little execution
time. If an &engine; has the same data as another &engine; but it
needs its own data to modify, the
! <literal>makeOwnCopy</literal> member function creates such
a copy.</para>
<para>&engine;s are rarely explicitly declared. Instead a
***************
*** 517,524 ****
&brick; &engine; tag indicates a &brick; &engine; should be used.
Some &engine;s, such as <type>CompFwd</type>, are rarely declared
even using &engine; tags. Instead the &array;'s
! <methodname>comp</methodname> and
! <methodname>readComp</methodname> member functions return views of
containers using <type>CompFwd</type> &engine;s.</para>
</section>
--- 517,524 ----
&brick; &engine; tag indicates a &brick; &engine; should be used.
Some &engine;s, such as <type>CompFwd</type>, are rarely declared
even using &engine; tags. Instead the &array;'s
! <literal>comp</literal> and
! <literal>readComp</literal> member functions return views of
containers using <type>CompFwd</type> &engine;s.</para>
</section>
***************
*** 569,575 ****
<entry><type>CompFwd</type></entry>
<entry>extracts specified components of an engine's vectors,
tensors, arrays, etc.; usually created using the
! <methodname>comp</methodname> container function.</entry>
</row>
<row>
<entry><type>ConstantFunction</type></entry>
--- 569,575 ----
<entry><type>CompFwd</type></entry>
<entry>extracts specified components of an engine's vectors,
tensors, arrays, etc.; usually created using the
! <literal>comp</literal> container function.</entry>
</row>
<row>
<entry><type>ConstantFunction</type></entry>
***************
*** 644,652 ****
value, not every value. Using less storage space may also permit
more useful values to be stored in cache, improving cache
performance. Reading a value in a compressed &engine; using the
! <methodname>read</methodname> member function is as fast as
reading a value in a &brick; &engine;, but writing a value always
! requires executing an additional <keywordname>if</keywordname>
conditional. Thus, if an &engine; infrequently has multiple
different values during its life time, a &compressiblebrick;
&engine; may be faster than a &brick; &engine;. If an &engine; is
--- 644,652 ----
value, not every value. Using less storage space may also permit
more useful values to be stored in cache, improving cache
performance. Reading a value in a compressed &engine; using the
! <literal>read</literal> member function is as fast as
reading a value in a &brick; &engine;, but writing a value always
! requires executing an additional <literal>if</literal>
conditional. Thus, if an &engine; infrequently has multiple
different values during its life time, a &compressiblebrick;
&engine; may be faster than a &brick; &engine;. If an &engine; is
***************
*** 664,683 ****
distributed computing.</para>
<para>Both &brick; and &compressiblebrick; &engine;s have
! <methodname>read</methodname> and
! <methodname>operator()</methodname> member functions taking ∫
and &loc; parameters. The parameters should match the &array;'s
dimensionality. For example, if &array; <varname>a</varname> has
dimensionality 3, <function>a.read(int, int, int)</function>
and <function>a(int, int, int)</function> should be used. The
former returns a value that cannot be modified, while the latter
! can be changed. Using the <methodname>read</methodname> member
function can lead to faster code. Alternatively, an index can be
specified using a &loc;. For example,
! <statement>a.read(Loc<3>(1,-2,5))</statement> and
! <statement>a(Loc<3>(1,-2,5))</statement> are equivalent to
! <statement>a.read(1,-2,5))</statement> and
! <statement>a(1,-2,5)</statement>.</para>
<para>The &dynamic; &engine; supports changing domain sizes while
a program is executing. It is basically a one-dimensional
--- 664,683 ----
distributed computing.</para>
<para>Both &brick; and &compressiblebrick; &engine;s have
! <literal>read</literal> and
! <literal>operator()</literal> member functions taking ∫
and &loc; parameters. The parameters should match the &array;'s
dimensionality. For example, if &array; <varname>a</varname> has
dimensionality 3, <function>a.read(int, int, int)</function>
and <function>a(int, int, int)</function> should be used. The
former returns a value that cannot be modified, while the latter
! can be changed. Using the <literal>read</literal> member
function can lead to faster code. Alternatively, an index can be
specified using a &loc;. For example,
! <literal>a.read(Loc<3>(1,-2,5))</literal> and
! <literal>a(Loc<3>(1,-2,5))</literal> are equivalent to
! <literal>a.read(1,-2,5))</literal> and
! <literal>a(1,-2,5)</literal>.</para>
<para>The &dynamic; &engine; supports changing domain sizes while
a program is executing. It is basically a one-dimensional
***************
*** 685,695 ****
order of stored values to change. Thus, it supports the same
interface as &brick; except that all member functions are
restricted to their one-dimensional versions. For example,
! <methodname>read</methodname> and
! <methodname>operator()</methodname> take <type>Loc<1></type>
or one ∫ parameter. In addition, the one-dimensional domain
! can be dynamically resized using <methodname>create</methodname>
! and <methodname>destroy</methodname>.
<![%unfinished;[
; see .
--- 685,695 ----
order of stored values to change. Thus, it supports the same
interface as &brick; except that all member functions are
restricted to their one-dimensional versions. For example,
! <literal>read</literal> and
! <literal>operator()</literal> take <type>Loc<1></type>
or one ∫ parameter. In addition, the one-dimensional domain
! can be dynamically resized using <literal>create</literal>
! and <literal>destroy</literal>.
<![%unfinished;[
; see .
*************** a(I,J) = (1.0/9.0) *
*** 809,822 ****
b(I-1,J+1) + b(I-1,J ) + b(I-1,J-1));
</programlisting> The last statement creates ten views. For example,
! <statement>a(I,J)</statement> creates a view of
<varname>a</varname> using the smaller domain specified by
<varname>I</varname> and <varname>J</varname>. This omits the
outermost rows of columns of <varname>a</varname>. The views
of <varname>b</varname> illustrate the use of views in
! data-parallel statements. <statement>b(I-1,J-1)</statement> has a
subset shifted up one row and left one column compared with
! <statement>b(I,J)</statement>.</para>
]]> <!-- end temporary -->
<![%unfinished;[
<para>Be sure to list the various arithmetic operations on domains
--- 809,822 ----
b(I-1,J+1) + b(I-1,J ) + b(I-1,J-1));
</programlisting> The last statement creates ten views. For example,
! <literal>a(I,J)</literal> creates a view of
<varname>a</varname> using the smaller domain specified by
<varname>I</varname> and <varname>J</varname>. This omits the
outermost rows of columns of <varname>a</varname>. The views
of <varname>b</varname> illustrate the use of views in
! data-parallel statements. <literal>b(I-1,J-1)</literal> has a
subset shifted up one row and left one column compared with
! <literal>b(I,J)</literal>.</para>
]]> <!-- end temporary -->
<![%unfinished;[
<para>Be sure to list the various arithmetic operations on domains
*************** UNFINISHED</para>
*** 1601,1607 ****
</programlisting> where <varname>A</varname>, <varname>B</varname> and
<varname>C</varname> are &array;s and <function>foo</function> is
a function taking an &array; as an argument. The expression
! <statement><varname>A</varname>*<varname>B</varname>+<varname>C</varname></statement>
will only be evaluated by the expression engine as needed by
<function>foo</function>.</para>
--- 1601,1607 ----
</programlisting> where <varname>A</varname>, <varname>B</varname> and
<varname>C</varname> are &array;s and <function>foo</function> is
a function taking an &array; as an argument. The expression
! <literal><varname>A</varname>*<varname>B</varname>+<varname>C</varname></literal>
will only be evaluated by the expression engine as needed by
<function>foo</function>.</para>
*************** UNFINISHED</para>
*** 1718,1724 ****
incorrect. To help diagnose if calls to
<function>Pooma::blockAndEvaluate</function> are missing, invoke
a &pooma; executable with the
! <statement>&dashdash;pooma-blocking-expressions</statement> option.
This automatically causes
<function>Pooma::blockAndEvaluate</function> to be called after
each statement. Doing so ensures program correctness, but it
--- 1718,1724 ----
incorrect. To help diagnose if calls to
<function>Pooma::blockAndEvaluate</function> are missing, invoke
a &pooma; executable with the
! <literal>&dashdash;pooma-blocking-expressions</literal> option.
This automatically causes
<function>Pooma::blockAndEvaluate</function> to be called after
each statement. Doing so ensures program correctness, but it
*************** UNFINISHED</para>
*** 1728,1741 ****
important than execution speed.</para>
<para>If using
! <statement>&dashdash;pooma-blocking-expressions</statement> changes a
program's output, it is missing one or more calls to
<function>Pooma::blockAndEvaluate</function>. To narrow the
region with a missing call, surround the region in question with
! calls to <statement>Pooma::blockingExpressions(true)</statement>
! and <statement>Pooma::blockingExpressions(false)</statement>,
but do not use the
! <statement>&dashdash;pooma-blocking-expressions</statement> option.
Within the region, <function>Pooma::blockAndEvaluate</function>
will be invoked after each statement. Repeatedly reducing the
region's size should reveal where calls are missing.</para>
--- 1728,1741 ----
important than execution speed.</para>
<para>If using
! <literal>&dashdash;pooma-blocking-expressions</literal> changes a
program's output, it is missing one or more calls to
<function>Pooma::blockAndEvaluate</function>. To narrow the
region with a missing call, surround the region in question with
! calls to <literal>Pooma::blockingExpressions(true)</literal>
! and <literal>Pooma::blockingExpressions(false)</literal>,
but do not use the
! <literal>&dashdash;pooma-blocking-expressions</literal> option.
Within the region, <function>Pooma::blockAndEvaluate</function>
will be invoked after each statement. Repeatedly reducing the
region's size should reveal where calls are missing.</para>
*************** UNFINISHED</para>
*** 1767,1773 ****
class="libraryfile">.cmpl.cpp</filename>, <filename
class="libraryfile">.mk</filename>, <filename
class="libraryfile">.conf</filename>. Should we also explain use
! of <keywordname>inline</keywordname> even when necessary and the template
model, e.g., including <filename
class="libraryfile">.cpp</filename> files.</para>
--- 1767,1773 ----
class="libraryfile">.cmpl.cpp</filename>, <filename
class="libraryfile">.mk</filename>, <filename
class="libraryfile">.conf</filename>. Should we also explain use
! of <literal>inline</literal> even when necessary and the template
model, e.g., including <filename
class="libraryfile">.cpp</filename> files.</para>
*************** UNFINISHED</para>
*** 2090,2096 ****
<row>
<entry>
<constructorsynopsis>
! <methodname>Array</methodname>
<void></void>
</constructorsynopsis>
</entry>
--- 2090,2096 ----
<row>
<entry>
<constructorsynopsis>
! <literal>Array</literal>
<void></void>
</constructorsynopsis>
</entry>
*************** UNFINISHED</para>
*** 2100,2106 ****
<row>
<entry>
<constructorsynopsis>
! <methodname>Array</methodname>
<methodparam><modifier>const</modifier> <type>Engine_t&</type>
<parameter>engine</parameter></methodparam>
</constructorsynopsis>
--- 2100,2106 ----
<row>
<entry>
<constructorsynopsis>
! <literal>Array</literal>
<methodparam><modifier>const</modifier> <type>Engine_t&</type>
<parameter>engine</parameter></methodparam>
</constructorsynopsis>
*************** UNFINISHED</para>
*** 2114,2120 ****
<row>
<entry>
<constructorsynopsis>
! <methodname>Array</methodname>
<methodparam>
<modifier>const</modifier>
<type> Engine<Dim2, T2, EngineTag2>&</type>
--- 2114,2120 ----
<row>
<entry>
<constructorsynopsis>
! <literal>Array</literal>
<methodparam>
<modifier>const</modifier>
<type> Engine<Dim2, T2, EngineTag2>&</type>
*************** UNFINISHED</para>
*** 2162,2168 ****
<row>
<entry>
<methodsynopsis>
! <type>Element_t</type> <methodname>read</methodname>
<void></void>
</methodsynopsis>
</entry>
--- 2162,2168 ----
<row>
<entry>
<methodsynopsis>
! <type>Element_t</type> <literal>read</literal>
<void></void>
</methodsynopsis>
</entry>
*************** UNFINISHED</para>
*** 2171,2177 ****
<row>
<entry>
<methodsynopsis>
! <type>Element_t</type> <methodname>read</methodname>
<methodparam>
<modifier>const</modifier>
<type>Sub1&</type> <parameter>s1</parameter>
--- 2171,2177 ----
<row>
<entry>
<methodsynopsis>
! <type>Element_t</type> <literal>read</literal>
<methodparam>
<modifier>const</modifier>
<type>Sub1&</type> <parameter>s1</parameter>
*************** UNFINISHED</para>
*** 2189,2195 ****
<row>
<entry>
<methodsynopsis>
! <type>Element_t</type> <methodname>operator()</methodname>
<methodparam>
<modifier>const</modifier>
<type>Sub1&</type> <parameter>s1</parameter>
--- 2189,2195 ----
<row>
<entry>
<methodsynopsis>
! <type>Element_t</type> <literal>operator()</literal>
<methodparam>
<modifier>const</modifier>
<type>Sub1&</type> <parameter>s1</parameter>
*************** UNFINISHED</para>
*** 2200,2207 ****
</methodparam>
</methodsynopsis>
</entry>
! <entry><para>How does this differ from <statement>read(const
! Sub1& s1, const Sub2& s2)</statement>? </para></entry>
</row>
<row>
<entry>ADD ALL <function>read</function>s and
--- 2200,2207 ----
</methodparam>
</methodsynopsis>
</entry>
! <entry><para>How does this differ from <literal>read(const
! Sub1& s1, const Sub2& s2)</literal>? </para></entry>
</row>
<row>
<entry>ADD ALL <function>read</function>s and
*************** UNFINISHED</para>
*** 2218,2231 ****
<para>When an array stores elements having components, e.g., an
array of vectors, tensors, or arrays, the
! <methodname>comp</methodname> returns an array consisting of the
specified components. The original and component array share the
same engine so changing the values in one affects values in the
other.</para>
<para>For example, if &n; × &n; array <varname>a</varname>
consists of three-dimensional real-valued vectors,
! <statement>a.comp(1)</statement> returns a &n; × &n;
real-valued array of all the middle vector components. Assigning
to the component array will also modify the middle components of
the vectors in <varname>a</varname>.</para>
--- 2218,2231 ----
<para>When an array stores elements having components, e.g., an
array of vectors, tensors, or arrays, the
! <literal>comp</literal> returns an array consisting of the
specified components. The original and component array share the
same engine so changing the values in one affects values in the
other.</para>
<para>For example, if &n; × &n; array <varname>a</varname>
consists of three-dimensional real-valued vectors,
! <literal>a.comp(1)</literal> returns a &n; × &n;
real-valued array of all the middle vector components. Assigning
to the component array will also modify the middle components of
the vectors in <varname>a</varname>.</para>
*************** UNFINISHED</para>
*** 2245,2251 ****
<row>
<entry>
<methodsynopsis>
! <type>UNKNOWN compute this</type> <methodname>comp</methodname>
<methodparam>
<modifier>const</modifier>
<type>int&</type>
--- 2245,2251 ----
<row>
<entry>
<methodsynopsis>
! <type>UNKNOWN compute this</type> <literal>comp</literal>
<methodparam>
<modifier>const</modifier>
<type>int&</type>
*************** UNFINISHED</para>
*** 2256,2262 ****
<entry><para>unknown: See line 1989.</para></entry>
</row>
<row>
! <entry>ADD ALL <methodname>comp</methodname>s.</entry>
</row>
</tbody>
</tgroup>
--- 2256,2262 ----
<entry><para>unknown: See line 1989.</para></entry>
</row>
<row>
! <entry>ADD ALL <literal>comp</literal>s.</entry>
</row>
</tbody>
</tgroup>
*************** UNFINISHED</para>
*** 2281,2287 ****
<row>
<entry>
<methodsynopsis>
! <type>int</type> <methodname>first</methodname>
<methodparam>
<type>int</type>
<parameter>d</parameter>
--- 2281,2287 ----
<row>
<entry>
<methodsynopsis>
! <type>int</type> <literal>first</literal>
<methodparam>
<type>int</type>
<parameter>d</parameter>
*************** UNFINISHED</para>
*** 2292,2298 ****
</row>
<row>
<entry>ADD ALL other accessor methods, including
! <methodname>engine</methodname>.</entry>
</row>
</tbody>
</tgroup>
--- 2292,2298 ----
</row>
<row>
<entry>ADD ALL other accessor methods, including
! <literal>engine</literal>.</entry>
</row>
</tbody>
</tgroup>
*************** UNFINISHED</para>
*** 2327,2333 ****
<row>
<entry>
<methodsynopsis>
! <type>void</type> <methodname>makeOwnCopy</methodname>
<void></void>
</methodsynopsis>
</entry>
--- 2327,2333 ----
<row>
<entry>
<methodsynopsis>
! <type>void</type> <literal>makeOwnCopy</literal>
<void></void>
</methodsynopsis>
</entry>
*************** UNFINISHED</para>
*** 2346,2353 ****
<title>Implementation Details</title>
<para>As a container, an &array;'s implementation is quite
! simple. Its <keywordname>private</keywordname>data consists of
! an engine, and it has no <keywordname>private</keywordname>
functions.</para>
<table frame="none" colsep="0" rowsep="0" tocentry="1"
--- 2346,2353 ----
<title>Implementation Details</title>
<para>As a container, an &array;'s implementation is quite
! simple. Its <literal>private</literal>data consists of
! an engine, and it has no <literal>private</literal>
functions.</para>
<table frame="none" colsep="0" rowsep="0" tocentry="1"
*************** UNFINISHED</para>
*** 2406,2413 ****
<title>Implementation Details</title>
<para><type>DynamicArray</type> has no
! <keywordname>protected</keywordname> or
! <keywordname>private</keywordname> members.</para>
</section>
</section>
--- 2406,2413 ----
<title>Implementation Details</title>
<para><type>DynamicArray</type> has no
! <literal>protected</literal> or
! <literal>private</literal> members.</para>
</section>
</section>
*************** UNFINISHED</para>
*** 2456,2462 ****
<para>In &pooma;, expressions may contain entire &array;s. That
is, &array;s are first-class objects with respect to expressions.
For example, given &array;s <varname>a</varname> and
! <varname>b</varname>, the expression <statement>a + b</statement>
is equivalent to an array containing the element-wise sum of the
two arrays.</para>
--- 2456,2462 ----
<para>In &pooma;, expressions may contain entire &array;s. That
is, &array;s are first-class objects with respect to expressions.
For example, given &array;s <varname>a</varname> and
! <varname>b</varname>, the expression <literal>a + b</literal>
is equivalent to an array containing the element-wise sum of the
two arrays.</para>
*************** UNFINISHED</para>
*** 2696,2702 ****
<title>Element Access</title>
<para>ADD: a table ala &array;. Be sure to include
! <methodname>all</methodname>.</para>
</section>
--- 2696,2702 ----
<title>Element Access</title>
<para>ADD: a table ala &array;. Be sure to include
! <literal>all</literal>.</para>
</section>
*************** UNFINISHED</para>
*** 2718,2726 ****
<para>See <filename
class="headerfile">src/Field/Field.h</filename>'s
! <methodname>operator[]</methodname>,
! <methodname>subField</methodname>, …,
! <methodname>material</methodname>.</para>
</section>
--- 2718,2726 ----
<para>See <filename
class="headerfile">src/Field/Field.h</filename>'s
! <literal>operator[]</literal>,
! <literal>subField</literal>, …,
! <literal>material</literal>.</para>
</section>
*************** UNFINISHED</para>
*** 2728,2737 ****
<title>Supporting Relations</title>
<para>ADD: a table with the member functions including
! <methodname>addRelation</methodname>,
! <methodname>removeRelations</methodname>,
! <methodname>applyRelations</methodname>, and
! <methodname>setDirty</methodname>.</para>
</section>
--- 2728,2737 ----
<title>Supporting Relations</title>
<para>ADD: a table with the member functions including
! <literal>addRelation</literal>,
! <literal>removeRelations</literal>,
! <literal>applyRelations</literal>, and
! <literal>setDirty</literal>.</para>
</section>
*************** UNFINISHED</para>
*** 2747,2753 ****
<title>Utility Methods</title>
<para>ADD: a table including
! <methodname>makeOwnCopy</methodname>.</para>
</section>
--- 2747,2753 ----
<title>Utility Methods</title>
<para>ADD: a table including
! <literal>makeOwnCopy</literal>.</para>
</section>
*************** UNFINISHED</para>
*** 2767,2773 ****
<para>Be sure to relate to &array; views. Note only three
dimensions are supported.</para>
! <para>Be sure to describe <statement>f[i]</statement>. Does this
refer to a particular material or a particular value within a
cell? I do not remember. See <type>SubFieldView</type> in
<filename class="headerfile">src/Field/Field.h</filename>.</para>
--- 2767,2773 ----
<para>Be sure to relate to &array; views. Note only three
dimensions are supported.</para>
! <para>Be sure to describe <literal>f[i]</literal>. Does this
refer to a particular material or a particular value within a
cell? I do not remember. See <type>SubFieldView</type> in
<filename class="headerfile">src/Field/Field.h</filename>.</para>
*************** UNFINISHED</para>
*** 3180,3187 ****
<section id="engines_ref-access">
<title>Element Access</title>
! <para>ADD: a table with <methodname>read</methodname> and
! <methodname>operator()</methodname>.</para>
</section>
--- 3180,3187 ----
<section id="engines_ref-access">
<title>Element Access</title>
! <para>ADD: a table with <literal>read</literal> and
! <literal>operator()</literal>.</para>
</section>
*************** UNFINISHED</para>
*** 3204,3213 ****
<title>Utility Methods</title>
<para>ADD: a table including
! <methodname>makeOwnCopy</methodname>.</para>
! <para>QUESTION: What are <methodname>dataObject</methodname>,
! <methodname>isShared</methodname>, and related methods?</para>
</section>
--- 3204,3213 ----
<title>Utility Methods</title>
<para>ADD: a table including
! <literal>makeOwnCopy</literal>.</para>
! <para>QUESTION: What are <literal>dataObject</literal>,
! <literal>isShared</literal>, and related methods?</para>
</section>
*************** UNFINISHED</para>
*** 3226,3232 ****
<para>ADD: description of what a brick means. ADD: whatever
specializations the class has, e.g.,
! <methodname>offset</methodname>.</para>
<para>QUESTION: What does <type>DoubleSliceHelper</type> do?</para>
</section>
--- 3226,3232 ----
<para>ADD: description of what a brick means. ADD: whatever
specializations the class has, e.g.,
! <literal>offset</literal>.</para>
<para>QUESTION: What does <type>DoubleSliceHelper</type> do?</para>
</section>
*************** UNFINISHED</para>
*** 3375,3381 ****
created by <function>Pooma::initialize</function>, storing
run-time configurable values found in <varname>argv</varname>.
Default options are found in
! <methodname>Options::usage</methodname>.</para>
<para>See <filename
class="headerfile">src/Utilities/Options.h</filename> and
--- 3375,3381 ----
created by <function>Pooma::initialize</function>, storing
run-time configurable values found in <varname>argv</varname>.
Default options are found in
! <literal>Options::usage</literal>.</para>
<para>See <filename
class="headerfile">src/Utilities/Options.h</filename> and
*************** UNFINISHED</para>
*** 3593,3599 ****
class="headerfile">src/Utilities/DerefIterator.h</filename>:
<type>DerefIterator<T></type> and
<type>ConstDerefIterator<T></type> automatically
! dereference themselves to maintain <keywordname>const</keywordname>
correctness.</para>
</listitem>
--- 3593,3599 ----
class="headerfile">src/Utilities/DerefIterator.h</filename>:
<type>DerefIterator<T></type> and
<type>ConstDerefIterator<T></type> automatically
! dereference themselves to maintain <literal>const</literal>
correctness.</para>
</listitem>
*************** UNFINISHED</para>
*** 3896,3902 ****
modification. However, if you are using &mm;, ensure
<varname>shmem_default_dir</varname> specifies its location.
For example, the &author; modified the value to
! <statement>"/home/oldham/pooma/mm-1.1.3"</statement>.</para>
</listitem>
<listitem>
<para>Prepare to compile the source code by configuring it
--- 3896,3902 ----
modification. However, if you are using &mm;, ensure
<varname>shmem_default_dir</varname> specifies its location.
For example, the &author; modified the value to
! <literal>"/home/oldham/pooma/mm-1.1.3"</literal>.</para>
</listitem>
<listitem>
<para>Prepare to compile the source code by configuring it
Index: template.xml
===================================================================
RCS file: /home/pooma/Repository/r2/docs/manual/template.xml,v
retrieving revision 1.4
diff -c -p -r1.4 template.xml
*** template.xml 2002/01/30 23:09:06 1.4
--- template.xml 2002/01/30 23:47:36
***************
*** 95,101 ****
its dimension, the type of its values, and its &engine; type. To
use this, a programmer specifies values for the template
parameters:
! <statement><type>Array<2,double,Brick></type></statement>
specifies a dimension of 2, a value type of &double;, and the
&brick; &engine; type. At compile time, the compiler creates a
type definition by substituting the values for the template
--- 95,101 ----
its dimension, the type of its values, and its &engine; type. To
use this, a programmer specifies values for the template
parameters:
! <literal><type>Array<2,double,Brick></type></literal>
specifies a dimension of 2, a value type of &double;, and the
&brick; &engine; type. At compile time, the compiler creates a
type definition by substituting the values for the template
***************
*** 195,201 ****
these concrete types with a template
parameter <varname>T</varname>. We
<emphasis>precede</emphasis>, not follow, the class definition
! with <statement>template <typename T></statement>. The
constructor's parameters' types are changed
to <varname>T</varname>, as are the data members'
types.</para>
--- 195,201 ----
these concrete types with a template
parameter <varname>T</varname>. We
<emphasis>precede</emphasis>, not follow, the class definition
! with <literal>template <typename T></literal>. The
constructor's parameters' types are changed
to <varname>T</varname>, as are the data members'
types.</para>
***************
*** 223,236 ****
arearefs="template_programming-template_use-templated_pair_program-use">
<para>To use a templated class, specify the template
parameter's argument after the class's name and surrounded by
! angle brackets (<statement><></statement>).</para>
</callout>
</calloutlist>
</example>
<para>To use a template class definition, template arguments
follow the class name surrounded by angle
! brackets (<statement><></statement>). For example,
<type>pair<int></type> <glossterm
linkend="glossary-template_instantiation"><firstterm>instantiates</firstterm></glossterm>
<indexterm>
--- 223,236 ----
arearefs="template_programming-template_use-templated_pair_program-use">
<para>To use a templated class, specify the template
parameter's argument after the class's name and surrounded by
! angle brackets (<literal><></literal>).</para>
</callout>
</calloutlist>
</example>
<para>To use a template class definition, template arguments
follow the class name surrounded by angle
! brackets (<literal><></literal>). For example,
<type>pair<int></type> <glossterm
linkend="glossary-template_instantiation"><firstterm>instantiates</firstterm></glossterm>
<indexterm>
***************
*** 242,249 ****
creates a definition for <type>pair<int></type> by copying
<classname>pair</classname>'s template definition and substituting
∫ for each occurrence of <varname>T</varname>. The copy
! omits the template parameter declaration <statement>template
! <typename T></statement> at the beginning of its definition.
The result is a definition exactly the same as
<classname>pairOfInts</classname>.</para>
--- 242,249 ----
creates a definition for <type>pair<int></type> by copying
<classname>pair</classname>'s template definition and substituting
∫ for each occurrence of <varname>T</varname>. The copy
! omits the template parameter declaration <literal>template
! <typename T></literal> at the beginning of its definition.
The result is a definition exactly the same as
<classname>pairOfInts</classname>.</para>
***************
*** 273,279 ****
compile-time operations use these types. For both run-time and
compile-time programming, &cc; defines default sets of values that
all conforming compilers must support. For example,
! <statement>3</statement> and <statement>6.022e+23</statement> are
run-time values that any &cc; compiler must accept. It must also
accept the ∫, &bool;, and <type>int*</type> types.</para>
--- 273,279 ----
compile-time operations use these types. For both run-time and
compile-time programming, &cc; defines default sets of values that
all conforming compilers must support. For example,
! <literal>3</literal> and <literal>6.022e+23</literal> are
run-time values that any &cc; compiler must accept. It must also
accept the ∫, &bool;, and <type>int*</type> types.</para>
*************** maxOut(0, 3);
*** 422,450 ****
with the templated class in <xref
linkend="template_programming-template_use-templated_pair_example"></xref>.
Note the notation for the template class parameters.
! <statement>template <typename T></statement>
<emphasis>precedes</emphasis> the class definition. The keyword
! <keywordname>typename</keywordname>
<indexterm>
! <primary><keywordname>typename</keywordname></primary>
</indexterm>
indicates the template
parameter is a type. <varname>T</varname> is the template
parameter's name. (We could have used any other identifier such
as <varname>pairElementType</varname> or <varname>foo</varname>.)
! Note that using <keywordname>class</keywordname>
<indexterm>
! <primary><keywordname>class</keywordname></primary>
</indexterm>
is equivalent to
! using <keywordname>typename</keywordname> so <statement>template
! <class T></statement> is equivalent to <statement>template
! <typename T></statement>. While declaring a template class
requires prefix notation, using a templated class requires postfix
notation. The class's name precedes angle
brackets (<>) surrounding specific values, i.e., types,
for its parameters. As we showed above,
! <statement>pair<int></statement> <glossterm
linkend="glossary-template_instantiation">instantiates</glossterm>
<indexterm>
<primary>template</primary>
--- 422,450 ----
with the templated class in <xref
linkend="template_programming-template_use-templated_pair_example"></xref>.
Note the notation for the template class parameters.
! <literal>template <typename T></literal>
<emphasis>precedes</emphasis> the class definition. The keyword
! <literal>typename</literal>
<indexterm>
! <primary><literal>typename</literal></primary>
</indexterm>
indicates the template
parameter is a type. <varname>T</varname> is the template
parameter's name. (We could have used any other identifier such
as <varname>pairElementType</varname> or <varname>foo</varname>.)
! Note that using <literal>class</literal>
<indexterm>
! <primary><literal>class</literal></primary>
</indexterm>
is equivalent to
! using <literal>typename</literal> so <literal>template
! <class T></literal> is equivalent to <literal>template
! <typename T></literal>. While declaring a template class
requires prefix notation, using a templated class requires postfix
notation. The class's name precedes angle
brackets (<>) surrounding specific values, i.e., types,
for its parameters. As we showed above,
! <literal>pair<int></literal> <glossterm
linkend="glossary-template_instantiation">instantiates</glossterm>
<indexterm>
<primary>template</primary>
*************** maxOut(0, 3);
*** 471,479 ****
domain:
<programlisting>
typedef typename Engine_t::Domain_t Domain_t;
! </programlisting> This <keywordname>typedef</keywordname>,
<indexterm>
! <primary><keywordname>typedef</keywordname></primary>
<see>type, definition.</see>
</indexterm>
<indexterm>
--- 471,479 ----
domain:
<programlisting>
typedef typename Engine_t::Domain_t Domain_t;
! </programlisting> This <literal>typedef</literal>,
<indexterm>
! <primary><literal>typedef</literal></primary>
<see>type, definition.</see>
</indexterm>
<indexterm>
*************** typedef typename Engine_t::Domain_t Doma
*** 483,491 ****
i.e., type
definition, defines the type <type>Domain_t</type> as equivalent
to <type>Engine_t::Domain_t</type>. The
! <operator>::</operator> operator
<indexterm>
! <primary><operator>::</operator> operator</primary>
</indexterm>
selects the <type>Domain_t</type> nested type from inside the
<type>Engine_t</type> type. This illustrates how to access
--- 483,491 ----
i.e., type
definition, defines the type <type>Domain_t</type> as equivalent
to <type>Engine_t::Domain_t</type>. The
! <literal>::</literal> operator
<indexterm>
! <primary><literal>::</literal> operator</primary>
</indexterm>
selects the <type>Domain_t</type> nested type from inside the
<type>Engine_t</type> type. This illustrates how to access
*************** typedef typename Engine_t::Domain_t Doma
*** 544,557 ****
</row>
<row>
<entry>operations on values</entry>
! <entry>Integral values support <operator>+</operator>,
! <operator>-</operator>, <operator>></operator>,
! <operator>==</operator>, …. String values support
! <operator>[]</operator>, <operator>==</operator>, ….</entry>
<entry>Types may be declared and used. Constant integral and
! enumeration values can be combined using <operator>+</operator>,
! <operator>-</operator>, <operator>></operator>,
! <operator>==</operator>, …. There are no permitted
operations on code.</entry>
</row>
<row>
--- 544,557 ----
</row>
<row>
<entry>operations on values</entry>
! <entry>Integral values support <literal>+</literal>,
! <literal>-</literal>, <literal>></literal>,
! <literal>==</literal>, …. String values support
! <literal>[]</literal>, <literal>==</literal>, ….</entry>
<entry>Types may be declared and used. Constant integral and
! enumeration values can be combined using <literal>+</literal>,
! <literal>-</literal>, <literal>></literal>,
! <literal>==</literal>, …. There are no permitted
operations on code.</entry>
</row>
<row>
*************** typedef typename Engine_t::Domain_t Doma
*** 572,586 ****
<row>
<entry>extracting values from collections</entry>
<entry>An object's named values are extracted using the
! <operator>.</operator> operator.
<indexterm>
! <primary><operator>.</operator> operator</primary>
</indexterm>
</entry>
<entry>A class's nested types and classes are extracted using
! the <operator>::</operator> operator.
<indexterm>
! <primary><operator>::</operator> operator</primary>
</indexterm>
</entry>
</row>
--- 572,586 ----
<row>
<entry>extracting values from collections</entry>
<entry>An object's named values are extracted using the
! <literal>.</literal> operator.
<indexterm>
! <primary><literal>.</literal> operator</primary>
</indexterm>
</entry>
<entry>A class's nested types and classes are extracted using
! the <literal>::</literal> operator.
<indexterm>
! <primary><literal>::</literal> operator</primary>
</indexterm>
</entry>
</row>
*************** typedef typename Engine_t::Domain_t Doma
*** 590,596 ****
<primary>control flow</primary>
</indexterm>
to choose among operations</entry>
! <entry><keywordname>if</keywordname>, <keywordname>while</keywordname>, <keywordname>goto</keywordname>, …</entry>
<entry>template class specializations with pattern matching</entry>
</row>
</tbody>
--- 590,596 ----
<primary>control flow</primary>
</indexterm>
to choose among operations</entry>
! <entry><literal>if</literal>, <literal>while</literal>, <literal>goto</literal>, …</entry>
<entry>template class specializations with pattern matching</entry>
</row>
</tbody>
*************** typedef typename Engine_t::Domain_t Doma
*** 609,615 ****
</indexterm>
The only compile-time values described in the previous
section were types, but any compile-time constant can also be used.
! Integral literals, <keywordname>const</keywordname> variables, and
other constructs can be used, but the main use is enumerations.
An <glossterm
linkend="glossary-enumeration"><firstterm>enumeration</firstterm></glossterm>
--- 609,615 ----
</indexterm>
The only compile-time values described in the previous
section were types, but any compile-time constant can also be used.
! Integral literals, <literal>const</literal> variables, and
other constructs can be used, but the main use is enumerations.
An <glossterm
linkend="glossary-enumeration"><firstterm>enumeration</firstterm></glossterm>
*************** struct usuallySimpleClass {
*** 741,747 ****
should be true only if the constructor must perform some very
complicated, time-expensive computation. When instantiated with
&false;, the compiler substitutes this value into the template
! class definition. Since the <keywordname>if</keywordname>
statement's conditional is false, the compiler optimizer can
eliminate the statement, yielding internal code similar to
<programlisting>
--- 741,747 ----
should be true only if the constructor must perform some very
complicated, time-expensive computation. When instantiated with
&false;, the compiler substitutes this value into the template
! class definition. Since the <literal>if</literal>
statement's conditional is false, the compiler optimizer can
eliminate the statement, yielding internal code similar to
<programlisting>
*************** struct usuallySimpleClass<false> {
*** 774,791 ****
<para>Each category<firstterm></firstterm> of values supports a
distinct set of operations. For example, the run-time category of
! integer values supports combination using <operator>+</operator>
! and <operator>-</operator> and comparison using
! <operator>></operator> and <operator>==</operator>. At run
time, the category of strings can be compared using
! <operator>==</operator> and characters can be extracted using
! subscripts with the <operator>[]</operator> operator. Compile-time
operations are more limited. Types may be declared and used. The
! <keywordname>sizeof</keywordname> operator yields the number of
bytes to represent an object of the specified type. Enumerations,
! constant integers, <keywordname>sizeof</keywordname> expressions,
and simple arithmetic and comparison operators such as
! <operator>+</operator> and <operator>==</operator> can form
constant expressions that can be used at compile time. These
values can initialize enumerations and integer constants and be
used as template arguments. At compile time, pointers and
--- 774,791 ----
<para>Each category<firstterm></firstterm> of values supports a
distinct set of operations. For example, the run-time category of
! integer values supports combination using <literal>+</literal>
! and <literal>-</literal> and comparison using
! <literal>></literal> and <literal>==</literal>. At run
time, the category of strings can be compared using
! <literal>==</literal> and characters can be extracted using
! subscripts with the <literal>[]</literal> operator. Compile-time
operations are more limited. Types may be declared and used. The
! <literal>sizeof</literal> operator yields the number of
bytes to represent an object of the specified type. Enumerations,
! constant integers, <literal>sizeof</literal> expressions,
and simple arithmetic and comparison operators such as
! <literal>+</literal> and <literal>==</literal> can form
constant expressions that can be used at compile time. These
values can initialize enumerations and integer constants and be
used as template arguments. At compile time, pointers and
*************** struct usuallySimpleClass<false> {
*** 809,822 ****
can store multiple values, each
having its own name. For example, a <type>pair<int></type>
object <varname>p</varname> stores two ∫s named
! <methodname>left_</methodname> and
! <methodname>right_</methodname>. The <operator>.</operator>
operator
<indexterm>
! <primary><operator>.</operator> operator</primary>
</indexterm>
extracts a named member from an object:
! <statement>p.left_</statement>. At compile time, a class can
store multiple values, each having its own name. These are
sometimes called <glossterm
linkend="glossary-traits_class"><firstterm>traits
--- 809,822 ----
can store multiple values, each
having its own name. For example, a <type>pair<int></type>
object <varname>p</varname> stores two ∫s named
! <literal>left_</literal> and
! <literal>right_</literal>. The <literal>.</literal>
operator
<indexterm>
! <primary><literal>.</literal> operator</primary>
</indexterm>
extracts a named member from an object:
! <literal>p.left_</literal>. At compile time, a class can
store multiple values, each having its own name. These are
sometimes called <glossterm
linkend="glossary-traits_class"><firstterm>traits
*************** struct ExpressionTraits<BinaryNode<
*** 848,863 ****
<para id="template_programming-pooma_implementation-double_colon_operator">
<indexterm zone="template_programming-pooma_implementation-double_colon_operator">
! <primary><operator>::</operator> operator</primary>
</indexterm>
! The example also illustrates using the <operator>::</operator>
operator to extract a member of a traits class. The type
<type>ExpressionTraits<Left></type> contains an internal
type definition of <type>Type_t</type>. Using the
! <operator>::</operator> operator extracts it:
! <statement>ExpressionTraits<Left>::Type_t</statement>.
Enumerations and other values can also be extracted. For example,
! <statement>Array<2, int, Brick>::dimensions</statement>
yields the dimension of the array's domain.</para>
<para id="template_programming-pooma_implementation-template_specialization">
--- 848,863 ----
<para id="template_programming-pooma_implementation-double_colon_operator">
<indexterm zone="template_programming-pooma_implementation-double_colon_operator">
! <primary><literal>::</literal> operator</primary>
</indexterm>
! The example also illustrates using the <literal>::</literal>
operator to extract a member of a traits class. The type
<type>ExpressionTraits<Left></type> contains an internal
type definition of <type>Type_t</type>. Using the
! <literal>::</literal> operator extracts it:
! <literal>ExpressionTraits<Left>::Type_t</literal>.
Enumerations and other values can also be extracted. For example,
! <literal>Array<2, int, Brick>::dimensions</literal>
yields the dimension of the array's domain.</para>
<para id="template_programming-pooma_implementation-template_specialization">
*************** struct ExpressionTraits<BinaryNode<
*** 869,877 ****
<primary>control flow</primary>
</indexterm>
Control flow determines which code is used. At run time,
! control-flow statements such as <keywordname>if</keywordname>,
! <keywordname>while</keywordname>, and
! <keywordname>goto</keywordname> determine which statements to
execute. Template programming uses two mechanisms: template class
specializations and pattern matching. These are similar to
control flow in functional programming languages. A <glossterm
--- 869,877 ----
<primary>control flow</primary>
</indexterm>
Control flow determines which code is used. At run time,
! control-flow statements such as <literal>if</literal>,
! <literal>while</literal>, and
! <literal>goto</literal> determine which statements to
execute. Template programming uses two mechanisms: template class
specializations and pattern matching. These are similar to
control flow in functional programming languages. A <glossterm
*************** struct CreateLeaf<Expression<T&clo
*** 932,943 ****
<type>Expression<int></type>.</para>
<para>Control flow using template specializations and pattern
! matching is similar to <keywordname>switch</keywordname>
statements.
<indexterm>
! <primary><keywordname>switch</keywordname></primary>
</indexterm>
! A <keywordname>switch</keywordname> statement has a
condition and one or more pairs of case labels and associated
code. The code associated with the the case label whose value
matches the condition is executed. If no case label matches the
--- 932,943 ----
<type>Expression<int></type>.</para>
<para>Control flow using template specializations and pattern
! matching is similar to <literal>switch</literal>
statements.
<indexterm>
! <primary><literal>switch</literal></primary>
</indexterm>
! A <literal>switch</literal> statement has a
condition and one or more pairs of case labels and associated
code. The code associated with the the case label whose value
matches the condition is executed. If no case label matches the
*************** CreateLeaf<Expression<int&closeclo
*** 949,959 ****
the condition. The set of template parameters for the indicated
template class, e.g., <type>CreateLeaf</type>, are analogous to
the case labels, and each has an associated definition. In our
! example, the set of template parameters are <statement><class
! T></statement> and <statement><Expression<class
! T&closeclose;</statement>. The <quote>best match</quote>, if any,
indicates the matching code that will be used. In our example,
! the <statement><class T></statement> parameter serves as the
default label since it matches any arguments. If no set of
template parameters match (which is impossible for our example) or
if more than one set are best matches, the code is
--- 949,959 ----
the condition. The set of template parameters for the indicated
template class, e.g., <type>CreateLeaf</type>, are analogous to
the case labels, and each has an associated definition. In our
! example, the set of template parameters are <literal><class
! T></literal> and <literal><Expression<class
! T&closeclose;</literal>. The <quote>best match</quote>, if any,
indicates the matching code that will be used. In our example,
! the <literal><class T></literal> parameter serves as the
default label since it matches any arguments. If no set of
template parameters match (which is impossible for our example) or
if more than one set are best matches, the code is
*************** class F {
*** 1012,1018 ****
</programlisting> Both the templated class and the templated function
take the same template arguments, but the class uses a static
member function. Thus, the notation to invoke it is slightly more
! verbose: <statement>F<T>::f(t)</statement>.</para>
<para id="template_programming-pooma_implementation-function_template-overloaded">
<indexterm zone="template_programming-pooma_implementation-function_template-overloaded">
--- 1012,1018 ----
</programlisting> Both the templated class and the templated function
take the same template arguments, but the class uses a static
member function. Thus, the notation to invoke it is slightly more
! verbose: <literal>F<T>::f(t)</literal>.</para>
<para id="template_programming-pooma_implementation-function_template-overloaded">
<indexterm zone="template_programming-pooma_implementation-function_template-overloaded">
*************** class F {
*** 1025,1031 ****
</indexterm>
The advantage of a function template is that it can be overloaded,
particularly operator functions. For example, the
! <operator>+</operator> operator is overloaded to add two &array;s,
which require template parameters to specify:
<programlisting>
template <int D1,class T1,class E1,
--- 1025,1031 ----
</indexterm>
The advantage of a function template is that it can be overloaded,
particularly operator functions. For example, the
! <literal>+</literal> operator is overloaded to add two &array;s,
which require template parameters to specify:
<programlisting>
template <int D1,class T1,class E1,
*************** template <int D1,class T1,class E1,
*** 1034,1041 ****
operator+(const Array<D1,T1,E1> & l,
const Array<D2,T2,E2> & r);
</programlisting> Without using function templates, it would not be
! possible to write expressions such as <statement>a1 +
! a2</statement>. Member functions can also be templated. This
permits, for example, overloading of assignment operators defined
within templated classes.
<indexterm class="endofrange" startref="template_programming-pooma_implementation-function_template">
--- 1034,1041 ----
operator+(const Array<D1,T1,E1> & l,
const Array<D2,T2,E2> & r);
</programlisting> Without using function templates, it would not be
! possible to write expressions such as <literal>a1 +
! a2</literal>. Member functions can also be templated. This
permits, for example, overloading of assignment operators defined
within templated classes.
<indexterm class="endofrange" startref="template_programming-pooma_implementation-function_template">
Index: tutorial.xml
===================================================================
RCS file: /home/pooma/Repository/r2/docs/manual/tutorial.xml,v
retrieving revision 1.9
diff -c -p -r1.9 tutorial.xml
*** tutorial.xml 2002/01/30 23:09:06 1.9
--- tutorial.xml 2002/01/30 23:47:37
***************
*** 215,221 ****
value is assigned the average of its corresponding value in
<varname>b</varname> and the latter's neighbors. Values in the
two-dimensional grids are accessed using two sets of brackets, e.g.,
! <statement>a[i][j]</statement>. After assigning values to
<varname>a</varname>, a second averaging reads values in
<varname>a</varname>, writing values in <varname>b</varname>.</para>
--- 215,221 ----
value is assigned the average of its corresponding value in
<varname>b</varname> and the latter's neighbors. Values in the
two-dimensional grids are accessed using two sets of brackets, e.g.,
! <literal>a[i][j]</literal>. After assigning values to
<varname>a</varname>, a second averaging reads values in
<varname>a</varname>, writing values in <varname>b</varname>.</para>
***************
*** 250,256 ****
<para>Initially, all grid values are zero except for the one
nonzero value at the center of the second array. Array
positions are indicated using two brackets, e.g.,
! <statement>a[i][j]</statement>. A better implementation might
initialize only the outermost values of the
<varname>a</varname> array.</para>
</callout>
--- 250,256 ----
<para>Initially, all grid values are zero except for the one
nonzero value at the center of the second array. Array
positions are indicated using two brackets, e.g.,
! <literal>a[i][j]</literal>. A better implementation might
initialize only the outermost values of the
<varname>a</varname> array.</para>
</callout>
***************
*** 335,342 ****
its value type, and how the values will be stored or computed.
The &brick; &engine; type indicates values will be directly
stored. It is responsible for allocating and deallocating
! storage so <statement>new</statement> and
! <statement>delete</statement> statements are not necessary.
The <varname>vertDomain</varname> specifies the array index
domain.</para>
</callout>
--- 335,342 ----
its value type, and how the values will be stored or computed.
The &brick; &engine; type indicates values will be directly
stored. It is responsible for allocating and deallocating
! storage so <literal>new</literal> and
! <literal>delete</literal> statements are not necessary.
The <varname>vertDomain</varname> specifies the array index
domain.</para>
</callout>
***************
*** 345,351 ****
same scalar value. The second statement
illustrates assigning one &array; value. Indices, separated by
commas, are surrounded by parentheses rather than surrounded by
! square brackets (<statement>[]</statement>).</para>
</callout>
<callout arearefs="tutorial-array_elementwise-doof2d-first_write">
<para>&array; element access uses parentheses, rather than
--- 345,351 ----
same scalar value. The second statement
illustrates assigning one &array; value. Indices, separated by
commas, are surrounded by parentheses rather than surrounded by
! square brackets (<literal>[]</literal>).</para>
</callout>
<callout arearefs="tutorial-array_elementwise-doof2d-first_write">
<para>&array; element access uses parentheses, rather than
***************
*** 394,413 ****
<para>&array;s support both element-wise access and scalar
assignment. Element-wise access uses parentheses, not square
! brackets. For example, <statement>b(n/2,n/2)</statement>
! specifies the central element. The scalar assignment <statement>b
! = 0.0</statement> assigns the same 0.0 value to all array
elements. This is possible because the array knows the extent of
its domain. We illustrate these data-parallel statements in the
next section.</para>
<para>Any program using the &poomatoolkit; must initialize the
&toolkit;'s data structures using
! <statement>Pooma::initialize(argc,argv)</statement>. This extracts
&pooma;-specific command-line options from the program's
command-line arguments and initializes the interprocessor
communication and other data structures. When finished,
! <statement>Pooma::finalize()</statement> ensures all computation and
communication has finished and the data structures are
destructed.</para>
</section>
--- 394,413 ----
<para>&array;s support both element-wise access and scalar
assignment. Element-wise access uses parentheses, not square
! brackets. For example, <literal>b(n/2,n/2)</literal>
! specifies the central element. The scalar assignment <literal>b
! = 0.0</literal> assigns the same 0.0 value to all array
elements. This is possible because the array knows the extent of
its domain. We illustrate these data-parallel statements in the
next section.</para>
<para>Any program using the &poomatoolkit; must initialize the
&toolkit;'s data structures using
! <literal>Pooma::initialize(argc,argv)</literal>. This extracts
&pooma;-specific command-line options from the program's
command-line arguments and initializes the interprocessor
communication and other data structures. When finished,
! <literal>Pooma::finalize()</literal> ensures all computation and
communication has finished and the data structures are
destructed.</para>
</section>
***************
*** 443,449 ****
</callout>
<callout arearefs="tutorial-array_parallel-doof2d-first_write">
<para>Data-parallel expressions replace nested loops and array
! element accesses. For example, <statement>a(I,J)</statement>
represents the subset of the <varname>a</varname> array having
a domain equal to the Cartesian product of <varname>I</varname>
and <varname>J</varname>. Intervals can shifted by an additive
--- 443,449 ----
</callout>
<callout arearefs="tutorial-array_parallel-doof2d-first_write">
<para>Data-parallel expressions replace nested loops and array
! element accesses. For example, <literal>a(I,J)</literal>
represents the subset of the <varname>a</varname> array having
a domain equal to the Cartesian product of <varname>I</varname>
and <varname>J</varname>. Intervals can shifted by an additive
***************
*** 454,483 ****
<para>Data-parallel expressions use containers and domain objects to
indicate a set of parallel expressions. For example, in the program
! listed above, <statement>a(I,J)</statement> specifies the subset of
<varname>a</varname> array omitting the outermost elements. The
array's <varname>vertDomain</varname> domain consists of the
Cartesian product of {0, 1, 2, …, n-1} with itself, while
<varname>I</varname> and <varname>J</varname> each specify {1, 2,
! …, n-2}. Thus, <statement>a(I,J)</statement> is the subset
with a domain of the Cartesian product of {1, 2, …, n-2} with
itself. It is called a <firstterm>view</firstterm> of an array. It
is itself an &array;, with a domain and supporting element access, but
its storage is the same as <varname>a</varname>'s. Changing a value
! in <statement>a(I,J)</statement> also changes the same value in
<varname>a</varname>. Changing a value in the latter also changes
the former if the value is not one of <varname>a</varname>'s
outermost elements. The expression
! <statement>b(I+1,J+1)</statement> indicates the subset of
<varname>b</varname> with a domain consisting of the Cartesian
product of {2, 3, …, n-1}, i.e., the same domain as
! <statement>a(I,J)</statement> but shifted up one unit and to the
right one unit. Only an &interval;'s value, not its name, is
important so all uses of <varname>J</varname> in this program
could be replaced by <varname>I</varname> without changing the
semantics.</para>
! <para>The statement assigning to <statement>a(I,J)</statement>
illustrates that &array;s may participate in expressions. Each
addend is a view of an array, which is itself an array. The views'
indices are zero-based so their sum can be formed by adding
--- 454,483 ----
<para>Data-parallel expressions use containers and domain objects to
indicate a set of parallel expressions. For example, in the program
! listed above, <literal>a(I,J)</literal> specifies the subset of
<varname>a</varname> array omitting the outermost elements. The
array's <varname>vertDomain</varname> domain consists of the
Cartesian product of {0, 1, 2, …, n-1} with itself, while
<varname>I</varname> and <varname>J</varname> each specify {1, 2,
! …, n-2}. Thus, <literal>a(I,J)</literal> is the subset
with a domain of the Cartesian product of {1, 2, …, n-2} with
itself. It is called a <firstterm>view</firstterm> of an array. It
is itself an &array;, with a domain and supporting element access, but
its storage is the same as <varname>a</varname>'s. Changing a value
! in <literal>a(I,J)</literal> also changes the same value in
<varname>a</varname>. Changing a value in the latter also changes
the former if the value is not one of <varname>a</varname>'s
outermost elements. The expression
! <literal>b(I+1,J+1)</literal> indicates the subset of
<varname>b</varname> with a domain consisting of the Cartesian
product of {2, 3, …, n-1}, i.e., the same domain as
! <literal>a(I,J)</literal> but shifted up one unit and to the
right one unit. Only an &interval;'s value, not its name, is
important so all uses of <varname>J</varname> in this program
could be replaced by <varname>I</varname> without changing the
semantics.</para>
! <para>The statement assigning to <literal>a(I,J)</literal>
illustrates that &array;s may participate in expressions. Each
addend is a view of an array, which is itself an array. The views'
indices are zero-based so their sum can be formed by adding
***************
*** 581,587 ****
Applying the stencil's function call <function>operator()</function>
yields the computed value. To compute multiple &array; values,
apply a stencil to the array and a domain object:
! <statement>stencil(b, interiorDomain)</statement>. This applies the
stencil to each position in the domain. The user must ensure that
applying the stencil does not access nonexistent &array;
values.</para>
--- 581,587 ----
Applying the stencil's function call <function>operator()</function>
yields the computed value. To compute multiple &array; values,
apply a stencil to the array and a domain object:
! <literal>stencil(b, interiorDomain)</literal>. This applies the
stencil to each position in the domain. The user must ensure that
applying the stencil does not access nonexistent &array;
values.</para>
***************
*** 611,632 ****
<para>To create a stencil object, apply the &stencil; type to a
function object class. For example,
! <statement>Stencil<DoofNinePt> stencil</statement> declares
the <varname>stencil</varname> object. The function object class
must define a function call <function>operator()</function> with a
container parameter and index parameters. The number of index
parameters, indicating the stencil's center, must equal the
container's dimension. For example, <type>DoofNinePt</type> defines
! <methodname>operator()(const C& c, int i, int j)</methodname>. We
templated the container type <varname>C</varname> although this is
not strictly necessary. The two index parameters
<varname>i</varname> and <varname>j</varname> ensure the stencil
works with two-dimensional containers. The
! <methodname>lowerExtent</methodname> function indicates how far to
the left (or below) the stencil extends beyond its center. Its
parameter indicates a particular dimension. Index parameters
<varname>i</varname> and <varname>j</varname> are in dimension 0
! and 1. <methodname>upperExtent</methodname> serves an
analogous purpose. The &poomatoolkit; uses these functions when
distributing computation among various processors, but it does not
use these functions to ensure nonexistent &array; values are not
--- 611,632 ----
<para>To create a stencil object, apply the &stencil; type to a
function object class. For example,
! <literal>Stencil<DoofNinePt> stencil</literal> declares
the <varname>stencil</varname> object. The function object class
must define a function call <function>operator()</function> with a
container parameter and index parameters. The number of index
parameters, indicating the stencil's center, must equal the
container's dimension. For example, <type>DoofNinePt</type> defines
! <literal>operator()(const C& c, int i, int j)</literal>. We
templated the container type <varname>C</varname> although this is
not strictly necessary. The two index parameters
<varname>i</varname> and <varname>j</varname> ensure the stencil
works with two-dimensional containers. The
! <literal>lowerExtent</literal> function indicates how far to
the left (or below) the stencil extends beyond its center. Its
parameter indicates a particular dimension. Index parameters
<varname>i</varname> and <varname>j</varname> are in dimension 0
! and 1. <literal>upperExtent</literal> serves an
analogous purpose. The &poomatoolkit; uses these functions when
distributing computation among various processors, but it does not
use these functions to ensure nonexistent &array; values are not
More information about the pooma-dev
mailing list