[pooma-dev] RFA: More Minor Changes to Tutorials
Jeffrey Oldham
oldham at codesourcery.com
Mon Mar 26 21:46:45 UTC 2001
Would someone be willing to review these trivial tutorial
changes or tell me if I lost an email reply? Thanks to Julian for
reviewing the tut-09.html changes.
Thanks,
Jeffrey D. Oldham
oldham at codesourcery.com
On Wed, Mar 21, 2001 at 03:25:39PM -0800, Jeffrey Oldham wrote:
> Here are changes to tutorials starting with tut-11.html. OK to
> commit?
>
> Wed Mar 21 15:05:19 2001 Jeffrey D. Oldham <oldham at codesourcery.com>
> * tut-11.html: Remove second of two contiguous periods.
> (PrintArray Class): Change "print" to typewriter font. Fix
> typos. Add a space between a type and a variable.
> (dbprint): s/;/,/
> s/dB*/db*/
> Change type's and function's names to typewriter fonts.
> * tut-12.html (Object Serialization): s/principle/principal/
> (Using POOMA I/O): Add a comma and change "type" to typewriter
> font.
>
> Thanks,
> Jeffrey D. Oldham
> oldham at codesourcery.com
-------------- next part --------------
Index: tut-11.html
===================================================================
RCS file: /home/pooma/Repository/r2/docs/tut-11.html,v
retrieving revision 1.1
diff -c -p -r1.1 tut-11.html
*** tut-11.html 2001/03/19 16:11:14 1.1
--- tut-11.html 2001/03/26 21:46:24
*************** special "off" setting, by calling <tt>se
*** 147,153 ****
<p>When running with multiple threads in a context, only one thread does the
output, either for standard C++ stream output, or for <tt>Inform</tt>
! output.. This is the "control" thread, which manages task assignment to the
others. It is important to note that any output to an <tt>Inform</tt> which
reads data from a multi-patch container is independent of whether other
threads might be currently modifying those values. To avoid this, insert a
--- 147,153 ----
<p>When running with multiple threads in a context, only one thread does the
output, either for standard C++ stream output, or for <tt>Inform</tt>
! output. This is the "control" thread, which manages task assignment to the
others. It is important to note that any output to an <tt>Inform</tt> which
reads data from a multi-patch container is independent of whether other
threads might be currently modifying those values. To avoid this, insert a
*************** containers.</p>
*** 218,224 ****
<h3><a NAME="PrintArray"></a>The <tt>PrintArray</tt> Class</h3>
<p>The typical way to use <tt>PrintArray</tt> is to construct a
! <tt>PrintArray</tt> object, then use its print() methods for sending formatted
ASCII output of POOMA container data to a stream such as <tt>cout</tt> or an
<tt>Inform</tt> object. The constructor accepts values for six formatting
parameters, which are maintained as member data in the object.
--- 218,224 ----
<h3><a NAME="PrintArray"></a>The <tt>PrintArray</tt> Class</h3>
<p>The typical way to use <tt>PrintArray</tt> is to construct a
! <tt>PrintArray</tt> object, then use its <tt>print()</tt> methods for sending formatted
ASCII output of POOMA container data to a stream such as <tt>cout</tt> or an
<tt>Inform</tt> object. The constructor accepts values for six formatting
parameters, which are maintained as member data in the object.
*************** the total number of significant digits.<
*** 261,267 ****
<tt>setCarReturn(), carReturn() </tt>:</dt>
<dd>
! If less than 0, print all values in a row (first array index) one one like
of output. If greater than 0, specifies the number of values to print before
breaking the output with a carriage return.</dd>
--- 261,267 ----
<tt>setCarReturn(), carReturn() </tt>:</dt>
<dd>
! If less than 0, print all values in a row (first array index) on one line
of output. If greater than 0, specifies the number of values to print before
breaking the output with a carriage return.</dd>
*************** attributes from <tt>Particles</tt>), but
*** 302,308 ****
restrictions are that the container must export an <tt>enum</tt> value
<tt>dimensions</tt>, such as <tt>Array::dimensions</tt>, and must have an
array-indexing capability such that
! <tt>operator()(int io, int i1, ..., int iN)</tt>
returns a contained data value. (Here, <tt>N=dimensions-1</tt>.)</p>
<p>If you pass in a view of an <tt>Array</tt>, for example, to the first
--- 302,308 ----
restrictions are that the container must export an <tt>enum</tt> value
<tt>dimensions</tt>, such as <tt>Array::dimensions</tt>, and must have an
array-indexing capability such that
! <tt>operator()(int i0, int i1, ..., int iN)</tt>
returns a contained data value. (Here, <tt>N=dimensions-1</tt>.)</p>
<p>If you pass in a view of an <tt>Array</tt>, for example, to the first
*************** These code snips illustrate the differen
*** 314,320 ****
like for a 3D <tt>Array</tt>:
<blockquote><pre>
! Range<3>r(Range<1>(2,10,2),Range<1>(1,3,1),Range<1>(3));
Array<3> a(20,20,20); <i>// ... assign values to a ...</i>
Inform pout; <i>// An output stream</i>
--- 314,320 ----
like for a 3D <tt>Array</tt>:
<blockquote><pre>
! Range<3> r(Range<1>(2,10,2),Range<1>(1,3,1),Range<1>(3));
Array<3> a(20,20,20); <i>// ... assign values to a ...</i>
Inform pout; <i>// An output stream</i>
*************** prints
*** 389,395 ****
<p>Many debuggers have a command prompt or expression-evaluation window and
allow interactive calling of functions with simple arguments. Few, if any, of
these debuggers have a convenient means to invoke template functions even when
! the templates have been instantiated in the executable code; and none allow
interactive construction of objects or invocation of objects' member
functions, whether the associated class and/or member functions are templated
or not.</p>
--- 389,395 ----
<p>Many debuggers have a command prompt or expression-evaluation window and
allow interactive calling of functions with simple arguments. Few, if any, of
these debuggers have a convenient means to invoke template functions even when
! the templates have been instantiated in the executable code, and none allow
interactive construction of objects or invocation of objects' member
functions, whether the associated class and/or member functions are templated
or not.</p>
*************** or <tt>s(s.physicalDomain())</tt>, to ex
*** 739,745 ****
not possible interactively.</p>
<p>The <tt>dbSetCarReturn()</tt> invocations illustrate more of the POOMA
! <tt>dB*()</tt> function family. These invoke the corresponding
<tt>PrintArray</tt> functions on a global <tt>PrintArray</tt> object
maintained internally by POOMA. This sets a format state that persists from
one interactive function call to the next. Here is the set of these
--- 739,745 ----
not possible interactively.</p>
<p>The <tt>dbSetCarReturn()</tt> invocations illustrate more of the POOMA
! <tt>db*()</tt> function family. These invoke the corresponding
<tt>PrintArray</tt> functions on a global <tt>PrintArray</tt> object
maintained internally by POOMA. This sets a format state that persists from
one interactive function call to the next. Here is the set of these
*************** int dbSpacing();
*** 761,768 ****
void dbSetSpacing(int val);
</pre></blockquote>
! <p>Two additional functions allow toggling between the default Inform object
! used by dbprint() and one or more user-defined Inform objects:
<dl>
<dt>
--- 761,768 ----
void dbSetSpacing(int val);
</pre></blockquote>
! <p>Two additional functions allow toggling between the default <tt>Inform</tt> object
! used by <tt>dbprint()</tt> and one or more user-defined <tt>Inform</tt> objects:
<dl>
<dt>
Index: tut-12.html
===================================================================
RCS file: /home/pooma/Repository/r2/docs/tut-12.html,v
retrieving revision 1.1
diff -c -p -r1.1 tut-12.html
*** tut-12.html 2001/03/19 16:11:14 1.1
--- tut-12.html 2001/03/26 21:46:25
*************** but not as good for multi-application co
*** 93,99 ****
other hand, there are many situations when one would just as soon not have
the overhead of an object-oriented database no matter how streamlined.
<p>Object-oriented applications benefit enormously from object-oriented
! data management. After all, the principle reason many programmers prefer
object-oriented languages is so that they can create and exploit new data
types. Object storage systems provide a way to store and retrieve user-defined
types as easily as intrinsic types.
--- 93,99 ----
other hand, there are many situations when one would just as soon not have
the overhead of an object-oriented database no matter how streamlined.
<p>Object-oriented applications benefit enormously from object-oriented
! data management. After all, the principal reason many programmers prefer
object-oriented languages is so that they can create and exploit new data
types. Object storage systems provide a way to store and retrieve user-defined
types as easily as intrinsic types.
*************** may be summarized as follows:
*** 234,240 ****
Report the number of distinct types in the object set.</li>
<li>
! Report the name of a type given its index <i>k</i>, where <i>k = 0, ...
(number of types -1)</i>.</li>
<li>
--- 234,240 ----
Report the number of distinct types in the object set.</li>
<li>
! Report the name of a type given its index <i>k</i>, where <i>k = 0, ...,
(number of types -1)</i>.</li>
<li>
*************** instances.</li>
*** 245,251 ****
For a given type indicated by type name or index <i>k</i>, report the name
of object <i>j</i> where<i> j = 0 , ..., (number of instances -1)</i>.</li>
</ul>
! The ID of an object is an integer (type <i>long</i>) that by convention
is the position of the object in the list of instances of that type. That
is, if an instance of a given type is second on the list, its ID is 1 (indexed
from zero). The primary key for objects contained in an object set is the
--- 245,251 ----
For a given type indicated by type name or index <i>k</i>, report the name
of object <i>j</i> where<i> j = 0 , ..., (number of instances -1)</i>.</li>
</ul>
! The ID of an object is an integer (type <tt>long</tt>) that by convention
is the position of the object in the list of instances of that type. That
is, if an instance of a given type is second on the list, its ID is 1 (indexed
from zero). The primary key for objects contained in an object set is the
More information about the pooma-dev
mailing list