Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /web/htdocs/old-index.html
ViewVC logotype

View of /web/htdocs/old-index.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1665 - (download) (as text) (annotate)
Tue Nov 29 12:31:32 2011 UTC (7 years, 7 months ago) by jhr
File size: 8657 byte(s)
  Add Charisee to people list.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Diderot project home page</title>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <meta name="keywords" content="domain-specific language, image analysis and visualization, parallelism" />
  <meta name="generator" content="BBEdit 9.5">
  <link rel="stylesheet" href="./diderot.css" type="text/css">
</head>
<body>

<div class="logo"><img src="images/logo2-504x216.png" alt="The Diderot Project" width="504" height="216"></div>

<h3>About</h3>
<p>
The Diderot project is an effort to design and implement a <i>Parallel
Domain-specific Language</i> (PDSL) for image analysis and visualization.
We are particularly interested in a class of algorithms that are programmed
in terms of <em>continuous</em> scalar, vector, and tensor fields that
are reconstructed from the image data.
Our goals are to provide a high-level mathematical programming model for
these algorithms, while also providing high-performance implementations
on a variety of parallel hardware platforms.
</p>

<h3>People</h3>
<ul>
  <li><a href="http://cs.uchicago.edu/people/cchiw/">Charisee Chiw</a></li>
  <li><a href="http://cs.uchicago.edu/~glk/">Gordon Kindlmann</a></li>
  <li><a href="http://cs.uchicago.edu/~jhr/">John Reppy</a></li>
  <li><a href="http://www.cs.uchicago.edu/people/lamonts">Lamont Samuels</a></li>
  <li><a href="http://www.cs.uchicago.edu/people/nseltzer">Nicholas Seltzer</a></li>
</ul>

<h3>Language overview</h3>
<p>
The following is an overview of our current preliminary design for Diderot.
We are building a compiler for this design and expect that the design will
evolve as we get experience with the implementation.
Also, the design is conservative, in that it does not provide all of the features that
we plan to provide (<i>e.g.</i>, interactions between strands).
</p>

<h4>Types</h4>
<p>
The main type of computational value in Diderot is a <em>tensor</em>, which includes
reals (0-order tensors), vectors, and matrices.
In addition, Diderot provides booleans, integers, and strings.
Diderot also has three <em>abstract</em> types:
</p>
<dl>
  <dt>images</dt>
    <dd>are used to represent the data being analyzed, as well as other array data, such as transfer
functions.
    </dd>
  <dt>kernels</dt>
    <dd>are separable convolution kernels</dd>
  <dt>fields</dt>
    <dd>are an abstraction of functions from 1D, 2D, or 3D space to some tensor type.
    A field is defined by convolving an image with a kernel.
    </dd>
</dl>

<h4>Program structure</h4>
<p>A Diderot program is organized into three logical sections:</p>
<ol>
  <li>Global declarations define global values, such as fields, as well as the inputs to the program.</li>
  <li>Strand definitions define the computational agents that implement the program</li>
  <li>Initialization defines the initial set of strands and their structure</li>
</ol>

<h4>Strands</h4>
<p>
A <em>strand</em> represents a mostly autonomous computation with local state, which includes
its <em>position</em> in world space.
A strand definition consists of declared state variables and methods.
All strands must have an <em>update</em> method and may optionally have a <em>stabilize</em>
method.
</p>
<p>
Note that we used use the term <em>actor</em> for the computational entities, but that led to some
confusion with actor-languages, so we have changed the name to strand.
</p>

<h4>Execution model</h4>
<p>The Diderot execution model is <em>bulk synchronous</em>.
At each iteration, the update methods of all active strands are invoked, resulting in a new
configuration.
</p>

<h4>An example: A simple volume renderer in Diderot</h4>
<p>
The following code is a simple diffuse-only volume rendering with head-light
written in Diderot.
It uses an opacity function that varies linearly between two values.
This example illustrates the use of probing both a field and its gradient.
</p>
<p class="warning">
This example uses Unicode characters for convolution (code point <tt>\u229B</tt>)
and differentiation (code point <tt>\u2207</tt>).
If your browser has trouble with displaying these characters, an
ASCII-only version can be found <a href="vr-lite-ascii.html">here</a>.
</p>

<div align="center">
<div align="left" class="code-display"><span class="code-type">input</span> <span class="code-type">string</span> dataFile;    <span class="code-comment">// name of dataset</span>
<span class="code-type">input</span> <span class="code-type">real</span> stepSz = 0.1;  <span class="code-comment">// size of steps</span>
<span class="code-type">input</span> <span class="code-type">vec3</span> eye;           <span class="code-comment">// location of eye point</span>
<span class="code-type">input</span> <span class="code-type">vec3</span> orig;          <span class="code-comment">// location of pixel (0,0)</span>
<span class="code-type">input</span> <span class="code-type">vec3</span> cVec;          <span class="code-comment">// vector between pixels horizontally</span>
<span class="code-type">input</span> <span class="code-type">vec3</span> rVec;          <span class="code-comment">// vector between pixels vertically</span>
<span class="code-type">input</span> <span class="code-type">real</span> valOpacMin;    <span class="code-comment">// highest value with opacity 0.0</span>
<span class="code-type">input</span> <span class="code-type">real</span> valOpacMax;    <span class="code-comment">// lowest value with opacity 1.0 </span>

<span class="code-type">image(3)[]</span> img = load (dataFile);
<span class="code-type">field#1(3)[]</span> F = img ⊛ bspln3;

<span class="code-kw">strand</span> RayCast (<span class="code-type">int</span> row, <span class="code-type">int</span> col)
{
    <span class="code-type">vec3</span> pos = orig + <span class="code-type">real</span>(row)*rVec + <span class="code-type">real</span>(col)*cVec;
    <span class="code-type">vec3</span> dir = (pos - eye)/|pos - eye|;
    <span class="code-type">real</span> t = 0.0;
    <span class="code-type">real</span> transp = 1.0;
    <span class="code-type">real</span> gray = 0.0;
    <span class="code-type">output</span> <span class="code-type">vec4</span>	rgba = [0.0, 0.0, 0.0, 0.0];

    <span class="code-kw">update</span> {
        pos = pos + stepSz*dir;
        <span class="code-kw">if</span> (inside (pos,F)) {
            <span class="code-type">real</span> val = F(pos);
            <span class="code-type">vec3</span> grad = ∇F(pos);
            <span class="code-type">vec3</span> norm = -grad / |grad|;
            <span class="code-kw">if</span> (val > valOpacMin) {  <span class="code-comment">// we have some opacity </span>
                <span class="code-type">real</span> opac =
			1.0 <span class="code-kw">if</span> (val > valOpacMax)
			<span class="code-kw">else</span> (val - valOpacMin)/(valOpacMax - valOpacMin);
                gray = gray + transp*opac*max(0.0, dot(-dir,norm));
                transp = transp*(1.0 - opac);
            }
        }
        <span class="code-kw">if</span> (transp < 0.01) {  <span class="code-comment">// early ray termination</span>
            transp = 0.0;
            <span class="code-kw">stabilize</span>;
        }
        <span class="code-kw">if</span> (t > 40.0) {
            <span class="code-kw">stabilize</span>;
        }
        t = t + stepSz;
    }

     <span class="code-kw">stabilize</span> {
        rgba = [gray, gray, gray, 1.0-transp];
     }

}

<span class="code-kw">initially</span> [ RayCast(r, c) | r in 0..199, c in 0..199 ];
</div>
</div>

<h3>Status</h3>
<p>
We have a prototype language design that can handle simple examples, such as volume
rendering, and a compiler that currently generates C99 code with GCC vector extensions.
Our runtime supports both single processor and multiprocessor execution.
We are working on an OpenCL backend and plan to also support CUDA.
</p>

<h3>Further information</h3>
<p>
We have not published any papers on Diderot yet, but here are some unpublished documents that provide
additional details about the project.
</p>
<ul>
  <li><a href="papers/msrc-talk-20100906.pdf"><em>Diderot: A parallel domain-specific language for image analysis</em></a>, talk
  given at Microsoft Research --- Cambridge, September 6, 2010.
  </li>
</ul>

<h3>Support</h3>
<p>
We thank <a href="http://research.nvidia.com/content/academic-partnership-program">NVIDIA</a>
for hardware and financial support.
</p>

<hr />
Last modified: May 17, 2011.
<hr />

</body>
</html>

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0