<h2>Purpose</h2>
<p>Learn the CUDA language.</p>
-</p>Note: Please identify all your work.</p>
+
+<p>Note: Please identify all your work.</p>
<!--TableOfContents:Begin-->
<!--TableOfContents:End-->
logistic map is a map of real line to itself given by</p>
<p class="equation">\[
- x_{i+1} = a − x2_i.
+ x_{i+1} = a - x_i^2.
\]</p>
<p>This mapping is ubiquitous in many problems of practical interest
called a <em>bifurcation diagram</em>.</p>
<p>The reason for this terminology is as follows. The asymptotic
-behavior often varies smoothly with $a$. For example, for some $a$
-$x_0$ may tend to some fixed point $x^∗$ with the value of $x^∗$
-varying smoothly with $a$. However, for another $a$ $x_0$ could end up
-in a period two orbit, oscillating between two values $x_1^∗$ and
-$x_2^∗$. The values of these two points may also vary smoothly with
-$a$, but there is some transition value $\tilde{a}$ where we jump from
-the fixed point to the period two orbit. This non-smooth process is
-called a <em>bifurcation</em>. The bifurcation diagram then shows all
-of these bifurcations on a single plot since we scan over all values
-of $a$.</p>
+behavior often varies smoothly with $a$. For for some $a$, $x_0$ may
+tend to some fixed point $x^{(1)}$ with the value of $x^{(1)}$ varying
+smoothly with $a$. For another $a$, $x_0$ could end up in a period two
+orbit, oscillating between two values $x_1^{(2)}$ and $x_2^{(2)}$. The
+values of these two points may also vary smoothly with $a$, but there
+is some transition value $\tilde{a}$ where we jump from the fixed
+point to the period two orbit. This non-smooth process is called a
+<em>bifurcation</em>. The bifurcation diagram then shows all of these
+bifurcations on a single plot since we scan over all values of
+$a$.</p>
<p>The serial code loops over a and iterates a random initial
condition <code>THRESH</code> number of times. This is to let
transients “die out” and approach the asymptotic behavior. If an
-iterate leaves the interval $[−2, 2]$ during this time it will
+iterate leaves the interval $[-2, 2]$ during this time it will
eventually escape to $\infty$, so the trajectory is thrown out and
another random initial condition is tried. It is known that positive
measure attracting sets exist for the $a$ values in the program so
have been iterated and binned. The bins are then normalized to a
maximum value of one and are then output to the screen. The values in
the bins are essentially the density of iterates around various points
-and plotting them shows the bifurcation structure of the map.</code>
+and plotting them shows the bifurcation structure of the map.</p>
<h3 id="B-assigment">Assignment</h3>
<pre>
gcc -o logistic logistic.c -lm
-./logistic > log.dat
+./logistic > log.dat
gnuplot -persist log.p
</pre>
$\infty$.</p>
<p>Modify the CUDA program using an extra dimension of block/threads
-to assign initial condtions distributed throughout the interval $[−2,
+to assign initial condtions distributed throughout the interval $[-2,
2]$ amongst these threads. Have the various threads bin the bounded
trajectories together. Solutions that escape the interval should not
be binned.</p>
-<p>Test this code on the map $x_{i+1} = a−(a−x_i^2)^2$ and compare
+<p>Test this code on the map $x_{i+1} = a-(a-x_i^2)^2$ and compare
against the original code. Are the results different? Note, this
example is the second iterate of the logistic map, so period two
orbits of the original become distinct period one orbits of the second
<!--#set var="root_directory" value="../../.." --><!--#include virtual="$root_directory/shared/header.shtml"-->
<h1>Assignment #3</h1>
-<p><em>Due Friday, October 16, 2009</p>
+<p><em>Due Friday, October 16, 2009</em></p>
<h2>Purpose</h2>
µ-seconds. The <code>gettimeofday</code> call is described by</p>
<pre>
-#include <time.h>
+#include <time.h>
int gettimeofday(struct timeval *tv, struct timezone *tz);
</pre>
<p>Write a parallel version of the bubble sort code. Use an algorithm
that leaves the task of ordering the sub-lists to processes 1
-to <code>size-1</code> (<code>size<code> being the number of
+to <code>size-1</code> (<code>size</code> being the number of
processes), using process 0 to merge back the ordered sub-lists into
an ordered large one and performing a check (sum of members) on the
sort.</p>