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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1665 - (view) (download) (as text)

1 : jhr 390 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 :     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 :     <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 : jhr 366 <head>
5 : jhr 452 <title>Diderot project home page</title>
6 : jhr 390 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7 : jhr 452 <meta name="keywords" content="domain-specific language, image analysis and visualization, parallelism" />
8 : jhr 390 <meta name="generator" content="BBEdit 9.5">
9 : jhr 452 <link rel="stylesheet" href="./diderot.css" type="text/css">
10 : jhr 366 </head>
11 :     <body>
12 :    
13 : jhr 452 <div class="logo"><img src="images/logo2-504x216.png" alt="The Diderot Project" width="504" height="216"></div>
14 : jhr 366
15 :     <h3>About</h3>
16 :     <p>
17 :     The Diderot project is an effort to design and implement a <i>Parallel
18 :     Domain-specific Language</i> (PDSL) for image analysis and visualization.
19 :     We are particularly interested in a class of algorithms that are programmed
20 :     in terms of <em>continuous</em> scalar, vector, and tensor fields that
21 : jhr 375 are reconstructed from the image data.
22 :     Our goals are to provide a high-level mathematical programming model for
23 :     these algorithms, while also providing high-performance implementations
24 :     on a variety of parallel hardware platforms.
25 : jhr 366 </p>
26 :    
27 : jhr 376 <h3>People</h3>
28 :     <ul>
29 : jhr 1665 <li><a href="http://cs.uchicago.edu/people/cchiw/">Charisee Chiw</a></li>
30 : jhr 376 <li><a href="http://cs.uchicago.edu/~glk/">Gordon Kindlmann</a></li>
31 :     <li><a href="http://cs.uchicago.edu/~jhr/">John Reppy</a></li>
32 :     <li><a href="http://www.cs.uchicago.edu/people/lamonts">Lamont Samuels</a></li>
33 : jhr 389 <li><a href="http://www.cs.uchicago.edu/people/nseltzer">Nicholas Seltzer</a></li>
34 : jhr 376 </ul>
35 :    
36 : jhr 375 <h3>Language overview</h3>
37 :     <p>
38 :     The following is an overview of our current preliminary design for Diderot.
39 :     We are building a compiler for this design and expect that the design will
40 :     evolve as we get experience with the implementation.
41 :     Also, the design is conservative, in that it does not provide all of the features that
42 : jhr 485 we plan to provide (<i>e.g.</i>, interactions between strands).
43 : jhr 375 </p>
44 :    
45 :     <h4>Types</h4>
46 :     <p>
47 :     The main type of computational value in Diderot is a <em>tensor</em>, which includes
48 :     reals (0-order tensors), vectors, and matrices.
49 :     In addition, Diderot provides booleans, integers, and strings.
50 :     Diderot also has three <em>abstract</em> types:
51 :     </p>
52 :     <dl>
53 :     <dt>images</dt>
54 :     <dd>are used to represent the data being analyzed, as well as other array data, such as transfer
55 :     functions.
56 :     </dd>
57 :     <dt>kernels</dt>
58 :     <dd>are separable convolution kernels</dd>
59 :     <dt>fields</dt>
60 :     <dd>are an abstraction of functions from 1D, 2D, or 3D space to some tensor type.
61 :     A field is defined by convolving an image with a kernel.
62 :     </dd>
63 :     </dl>
64 :    
65 :     <h4>Program structure</h4>
66 :     <p>A Diderot program is organized into three logical sections:</p>
67 :     <ol>
68 :     <li>Global declarations define global values, such as fields, as well as the inputs to the program.</li>
69 : jhr 485 <li>Strand definitions define the computational agents that implement the program</li>
70 :     <li>Initialization defines the initial set of strands and their structure</li>
71 : jhr 375 </ol>
72 :    
73 : jhr 485 <h4>Strands</h4>
74 : jhr 375 <p>
75 : jhr 485 A <em>strand</em> represents a mostly autonomous computation with local state, which includes
76 :     its <em>position</em> in world space.
77 :     A strand definition consists of declared state variables and methods.
78 :     All strands must have an <em>update</em> method and may optionally have a <em>stabilize</em>
79 : jhr 375 method.
80 :     </p>
81 : jhr 485 <p>
82 :     Note that we used use the term <em>actor</em> for the computational entities, but that led to some
83 :     confusion with actor-languages, so we have changed the name to strand.
84 :     </p>
85 : jhr 375
86 :     <h4>Execution model</h4>
87 :     <p>The Diderot execution model is <em>bulk synchronous</em>.
88 : jhr 485 At each iteration, the update methods of all active strands are invoked, resulting in a new
89 : jhr 375 configuration.
90 :     </p>
91 :    
92 : jhr 390 <h4>An example: A simple volume renderer in Diderot</h4>
93 :     <p>
94 :     The following code is a simple diffuse-only volume rendering with head-light
95 :     written in Diderot.
96 :     It uses an opacity function that varies linearly between two values.
97 :     This example illustrates the use of probing both a field and its gradient.
98 :     </p>
99 :     <p class="warning">
100 :     This example uses Unicode characters for convolution (code point <tt>\u229B</tt>)
101 :     and differentiation (code point <tt>\u2207</tt>).
102 :     If your browser has trouble with displaying these characters, an
103 :     ASCII-only version can be found <a href="vr-lite-ascii.html">here</a>.
104 :     </p>
105 :    
106 :     <div align="center">
107 :     <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>
108 :     <span class="code-type">input</span> <span class="code-type">real</span> stepSz = 0.1; <span class="code-comment">// size of steps</span>
109 :     <span class="code-type">input</span> <span class="code-type">vec3</span> eye; <span class="code-comment">// location of eye point</span>
110 :     <span class="code-type">input</span> <span class="code-type">vec3</span> orig; <span class="code-comment">// location of pixel (0,0)</span>
111 :     <span class="code-type">input</span> <span class="code-type">vec3</span> cVec; <span class="code-comment">// vector between pixels horizontally</span>
112 :     <span class="code-type">input</span> <span class="code-type">vec3</span> rVec; <span class="code-comment">// vector between pixels vertically</span>
113 :     <span class="code-type">input</span> <span class="code-type">real</span> valOpacMin; <span class="code-comment">// highest value with opacity 0.0</span>
114 :     <span class="code-type">input</span> <span class="code-type">real</span> valOpacMax; <span class="code-comment">// lowest value with opacity 1.0 </span>
115 :    
116 :     <span class="code-type">image(3)[]</span> img = load (dataFile);
117 :     <span class="code-type">field#1(3)[]</span> F = img ⊛ bspln3;
118 :    
119 : jhr 485 <span class="code-kw">strand</span> RayCast (<span class="code-type">int</span> row, <span class="code-type">int</span> col)
120 : jhr 390 {
121 :     <span class="code-type">vec3</span> pos = orig + <span class="code-type">real</span>(row)*rVec + <span class="code-type">real</span>(col)*cVec;
122 :     <span class="code-type">vec3</span> dir = (pos - eye)/|pos - eye|;
123 :     <span class="code-type">real</span> t = 0.0;
124 :     <span class="code-type">real</span> transp = 1.0;
125 :     <span class="code-type">real</span> gray = 0.0;
126 :     <span class="code-type">output</span> <span class="code-type">vec4</span> rgba = [0.0, 0.0, 0.0, 0.0];
127 :    
128 :     <span class="code-kw">update</span> {
129 :     pos = pos + stepSz*dir;
130 :     <span class="code-kw">if</span> (inside (pos,F)) {
131 : jhr 1233 <span class="code-type">real</span> val = F(pos);
132 :     <span class="code-type">vec3</span> grad = ∇F(pos);
133 : jhr 390 <span class="code-type">vec3</span> norm = -grad / |grad|;
134 :     <span class="code-kw">if</span> (val > valOpacMin) { <span class="code-comment">// we have some opacity </span>
135 :     <span class="code-type">real</span> opac =
136 :     1.0 <span class="code-kw">if</span> (val > valOpacMax)
137 :     <span class="code-kw">else</span> (val - valOpacMin)/(valOpacMax - valOpacMin);
138 :     gray = gray + transp*opac*max(0.0, dot(-dir,norm));
139 :     transp = transp*(1.0 - opac);
140 :     }
141 :     }
142 :     <span class="code-kw">if</span> (transp < 0.01) { <span class="code-comment">// early ray termination</span>
143 :     transp = 0.0;
144 :     <span class="code-kw">stabilize</span>;
145 :     }
146 :     <span class="code-kw">if</span> (t > 40.0) {
147 :     <span class="code-kw">stabilize</span>;
148 :     }
149 :     t = t + stepSz;
150 :     }
151 :    
152 :     <span class="code-kw">stabilize</span> {
153 :     rgba = [gray, gray, gray, 1.0-transp];
154 :     }
155 :    
156 :     }
157 :    
158 :     <span class="code-kw">initially</span> [ RayCast(r, c) | r in 0..199, c in 0..199 ];
159 :     </div>
160 :     </div>
161 :    
162 : jhr 366 <h3>Status</h3>
163 :     <p>
164 :     We have a prototype language design that can handle simple examples, such as volume
165 : jhr 1233 rendering, and a compiler that currently generates C99 code with GCC vector extensions.
166 :     Our runtime supports both single processor and multiprocessor execution.
167 :     We are working on an OpenCL backend and plan to also support CUDA.
168 : jhr 366 </p>
169 :    
170 : jhr 376 <h3>Further information</h3>
171 :     <p>
172 :     We have not published any papers on Diderot yet, but here are some unpublished documents that provide
173 :     additional details about the project.
174 :     </p>
175 :     <ul>
176 :     <li><a href="papers/msrc-talk-20100906.pdf"><em>Diderot: A parallel domain-specific language for image analysis</em></a>, talk
177 :     given at Microsoft Research --- Cambridge, September 6, 2010.
178 :     </li>
179 :     </ul>
180 :    
181 : jhr 484 <h3>Support</h3>
182 :     <p>
183 : jhr 485 We thank <a href="http://research.nvidia.com/content/academic-partnership-program">NVIDIA</a>
184 :     for hardware and financial support.
185 : jhr 484 </p>
186 :    
187 : jhr 366 <hr />
188 : jhr 1233 Last modified: May 17, 2011.
189 : jhr 366 <hr />
190 :    
191 :     </body>
192 :     </html>

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