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

SCM Repository

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

Annotation of /web/htdocs/index.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 452 - (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 :     <li><a href="http://cs.uchicago.edu/~glk/">Gordon Kindlmann</a></li>
30 :     <li><a href="http://cs.uchicago.edu/~jhr/">John Reppy</a></li>
31 :     <li><a href="http://www.cs.uchicago.edu/people/lamonts">Lamont Samuels</a></li>
32 : jhr 389 <li><a href="http://www.cs.uchicago.edu/people/nseltzer">Nicholas Seltzer</a></li>
33 : jhr 376 </ul>
34 :    
35 : jhr 375 <h3>Language overview</h3>
36 :     <p>
37 :     The following is an overview of our current preliminary design for Diderot.
38 :     We are building a compiler for this design and expect that the design will
39 :     evolve as we get experience with the implementation.
40 :     Also, the design is conservative, in that it does not provide all of the features that
41 :     we plan to provide (<i>e.g.</i>, actor-actor interactions).
42 :     </p>
43 :    
44 :     <h4>Types</h4>
45 :     <p>
46 :     The main type of computational value in Diderot is a <em>tensor</em>, which includes
47 :     reals (0-order tensors), vectors, and matrices.
48 :     In addition, Diderot provides booleans, integers, and strings.
49 :     Diderot also has three <em>abstract</em> types:
50 :     </p>
51 :     <dl>
52 :     <dt>images</dt>
53 :     <dd>are used to represent the data being analyzed, as well as other array data, such as transfer
54 :     functions.
55 :     </dd>
56 :     <dt>kernels</dt>
57 :     <dd>are separable convolution kernels</dd>
58 :     <dt>fields</dt>
59 :     <dd>are an abstraction of functions from 1D, 2D, or 3D space to some tensor type.
60 :     A field is defined by convolving an image with a kernel.
61 :     </dd>
62 :     </dl>
63 :    
64 :     <h4>Program structure</h4>
65 :     <p>A Diderot program is organized into three logical sections:</p>
66 :     <ol>
67 :     <li>Global declarations define global values, such as fields, as well as the inputs to the program.</li>
68 :     <li>Actor definitions define the computational agents that implement the program</li>
69 :     <li>Initialization defines the initial set of actors and their structure</li>
70 :     </ol>
71 :    
72 :     <h4>Actors</h4>
73 :     <p>
74 :     An <em>actor</em> represents a mostly autonomous computation with local state, which includes
75 :     their <em>position</em> in world space.
76 :     An actor definition consists of declared state variables and methods.
77 :     All actors must have an <em>update</em> method and may optionally have a <em>stabilize</em>
78 :     method.
79 :     </p>
80 :    
81 :     <h4>Execution model</h4>
82 :     <p>The Diderot execution model is <em>bulk synchronous</em>.
83 :     At each iteration, the update methods of all active actors are invoked, resulting in a new
84 :     configuration.
85 :     </p>
86 :    
87 : jhr 390 <h4>An example: A simple volume renderer in Diderot</h4>
88 :     <p>
89 :     The following code is a simple diffuse-only volume rendering with head-light
90 :     written in Diderot.
91 :     It uses an opacity function that varies linearly between two values.
92 :     This example illustrates the use of probing both a field and its gradient.
93 :     </p>
94 :     <p class="warning">
95 :     This example uses Unicode characters for convolution (code point <tt>\u229B</tt>)
96 :     and differentiation (code point <tt>\u2207</tt>).
97 :     If your browser has trouble with displaying these characters, an
98 :     ASCII-only version can be found <a href="vr-lite-ascii.html">here</a>.
99 :     </p>
100 :    
101 :     <div align="center">
102 :     <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>
103 :     <span class="code-type">input</span> <span class="code-type">real</span> stepSz = 0.1; <span class="code-comment">// size of steps</span>
104 :     <span class="code-type">input</span> <span class="code-type">vec3</span> eye; <span class="code-comment">// location of eye point</span>
105 :     <span class="code-type">input</span> <span class="code-type">vec3</span> orig; <span class="code-comment">// location of pixel (0,0)</span>
106 :     <span class="code-type">input</span> <span class="code-type">vec3</span> cVec; <span class="code-comment">// vector between pixels horizontally</span>
107 :     <span class="code-type">input</span> <span class="code-type">vec3</span> rVec; <span class="code-comment">// vector between pixels vertically</span>
108 :     <span class="code-type">input</span> <span class="code-type">real</span> valOpacMin; <span class="code-comment">// highest value with opacity 0.0</span>
109 :     <span class="code-type">input</span> <span class="code-type">real</span> valOpacMax; <span class="code-comment">// lowest value with opacity 1.0 </span>
110 :    
111 :     <span class="code-type">image(3)[]</span> img = load (dataFile);
112 :     <span class="code-type">field#1(3)[]</span> F = img ⊛ bspln3;
113 :    
114 :     <span class="code-kw">actor</span> RayCast (<span class="code-type">int</span> row, <span class="code-type">int</span> col)
115 :     {
116 :     <span class="code-type">vec3</span> pos = orig + <span class="code-type">real</span>(row)*rVec + <span class="code-type">real</span>(col)*cVec;
117 :     <span class="code-type">vec3</span> dir = (pos - eye)/|pos - eye|;
118 :     <span class="code-type">real</span> t = 0.0;
119 :     <span class="code-type">real</span> transp = 1.0;
120 :     <span class="code-type">real</span> gray = 0.0;
121 :     <span class="code-type">output</span> <span class="code-type">vec4</span> rgba = [0.0, 0.0, 0.0, 0.0];
122 :    
123 :     <span class="code-kw">update</span> {
124 :     pos = pos + stepSz*dir;
125 :     <span class="code-kw">if</span> (inside (pos,F)) {
126 :     <span class="code-type">real</span> val = F@pos;
127 :     <span class="code-type">vec3</span> grad = ∇F@pos;
128 :     <span class="code-type">vec3</span> norm = -grad / |grad|;
129 :     <span class="code-kw">if</span> (val > valOpacMin) { <span class="code-comment">// we have some opacity </span>
130 :     <span class="code-type">real</span> opac =
131 :     1.0 <span class="code-kw">if</span> (val > valOpacMax)
132 :     <span class="code-kw">else</span> (val - valOpacMin)/(valOpacMax - valOpacMin);
133 :     gray = gray + transp*opac*max(0.0, dot(-dir,norm));
134 :     transp = transp*(1.0 - opac);
135 :     }
136 :     }
137 :     <span class="code-kw">if</span> (transp < 0.01) { <span class="code-comment">// early ray termination</span>
138 :     transp = 0.0;
139 :     <span class="code-kw">stabilize</span>;
140 :     }
141 :     <span class="code-kw">if</span> (t > 40.0) {
142 :     <span class="code-kw">stabilize</span>;
143 :     }
144 :     t = t + stepSz;
145 :     }
146 :    
147 :     <span class="code-kw">stabilize</span> {
148 :     rgba = [gray, gray, gray, 1.0-transp];
149 :     }
150 :    
151 :     }
152 :    
153 :     <span class="code-kw">initially</span> [ RayCast(r, c) | r in 0..199, c in 0..199 ];
154 :     </div>
155 :     </div>
156 :    
157 : jhr 366 <h3>Status</h3>
158 :     <p>
159 :     We have a prototype language design that can handle simple examples, such as volume
160 :     rendering, and we are working on a baseline compiler for the design.
161 :     This compiler will generate CUDA or OpenCL code for running on GPUs.
162 :     </p>
163 :    
164 : jhr 376 <h3>Further information</h3>
165 :     <p>
166 :     We have not published any papers on Diderot yet, but here are some unpublished documents that provide
167 :     additional details about the project.
168 :     </p>
169 :     <ul>
170 :     <li><a href="papers/msrc-talk-20100906.pdf"><em>Diderot: A parallel domain-specific language for image analysis</em></a>, talk
171 :     given at Microsoft Research --- Cambridge, September 6, 2010.
172 :     </li>
173 :     </ul>
174 :    
175 : jhr 366 <hr />
176 : jhr 390 Last modified: October 13, 2010.
177 : jhr 366 <hr />
178 :    
179 :     </body>
180 :     </html>

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