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 485 - (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 : jhr 485 we plan to provide (<i>e.g.</i>, interactions between strands).
42 : jhr 375 </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 : jhr 485 <li>Strand definitions define the computational agents that implement the program</li>
69 :     <li>Initialization defines the initial set of strands and their structure</li>
70 : jhr 375 </ol>
71 :    
72 : jhr 485 <h4>Strands</h4>
73 : jhr 375 <p>
74 : jhr 485 A <em>strand</em> represents a mostly autonomous computation with local state, which includes
75 :     its <em>position</em> in world space.
76 :     A strand definition consists of declared state variables and methods.
77 :     All strands must have an <em>update</em> method and may optionally have a <em>stabilize</em>
78 : jhr 375 method.
79 :     </p>
80 : jhr 485 <p>
81 :     Note that we used use the term <em>actor</em> for the computational entities, but that led to some
82 :     confusion with actor-languages, so we have changed the name to strand.
83 :     </p>
84 : jhr 375
85 :     <h4>Execution model</h4>
86 :     <p>The Diderot execution model is <em>bulk synchronous</em>.
87 : jhr 485 At each iteration, the update methods of all active strands are invoked, resulting in a new
88 : jhr 375 configuration.
89 :     </p>
90 :    
91 : jhr 390 <h4>An example: A simple volume renderer in Diderot</h4>
92 :     <p>
93 :     The following code is a simple diffuse-only volume rendering with head-light
94 :     written in Diderot.
95 :     It uses an opacity function that varies linearly between two values.
96 :     This example illustrates the use of probing both a field and its gradient.
97 :     </p>
98 :     <p class="warning">
99 :     This example uses Unicode characters for convolution (code point <tt>\u229B</tt>)
100 :     and differentiation (code point <tt>\u2207</tt>).
101 :     If your browser has trouble with displaying these characters, an
102 :     ASCII-only version can be found <a href="vr-lite-ascii.html">here</a>.
103 :     </p>
104 :    
105 :     <div align="center">
106 :     <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>
107 :     <span class="code-type">input</span> <span class="code-type">real</span> stepSz = 0.1; <span class="code-comment">// size of steps</span>
108 :     <span class="code-type">input</span> <span class="code-type">vec3</span> eye; <span class="code-comment">// location of eye point</span>
109 :     <span class="code-type">input</span> <span class="code-type">vec3</span> orig; <span class="code-comment">// location of pixel (0,0)</span>
110 :     <span class="code-type">input</span> <span class="code-type">vec3</span> cVec; <span class="code-comment">// vector between pixels horizontally</span>
111 :     <span class="code-type">input</span> <span class="code-type">vec3</span> rVec; <span class="code-comment">// vector between pixels vertically</span>
112 :     <span class="code-type">input</span> <span class="code-type">real</span> valOpacMin; <span class="code-comment">// highest value with opacity 0.0</span>
113 :     <span class="code-type">input</span> <span class="code-type">real</span> valOpacMax; <span class="code-comment">// lowest value with opacity 1.0 </span>
114 :    
115 :     <span class="code-type">image(3)[]</span> img = load (dataFile);
116 :     <span class="code-type">field#1(3)[]</span> F = img ⊛ bspln3;
117 :    
118 : jhr 485 <span class="code-kw">strand</span> RayCast (<span class="code-type">int</span> row, <span class="code-type">int</span> col)
119 : jhr 390 {
120 :     <span class="code-type">vec3</span> pos = orig + <span class="code-type">real</span>(row)*rVec + <span class="code-type">real</span>(col)*cVec;
121 :     <span class="code-type">vec3</span> dir = (pos - eye)/|pos - eye|;
122 :     <span class="code-type">real</span> t = 0.0;
123 :     <span class="code-type">real</span> transp = 1.0;
124 :     <span class="code-type">real</span> gray = 0.0;
125 :     <span class="code-type">output</span> <span class="code-type">vec4</span> rgba = [0.0, 0.0, 0.0, 0.0];
126 :    
127 :     <span class="code-kw">update</span> {
128 :     pos = pos + stepSz*dir;
129 :     <span class="code-kw">if</span> (inside (pos,F)) {
130 :     <span class="code-type">real</span> val = F@pos;
131 :     <span class="code-type">vec3</span> grad = ∇F@pos;
132 :     <span class="code-type">vec3</span> norm = -grad / |grad|;
133 :     <span class="code-kw">if</span> (val > valOpacMin) { <span class="code-comment">// we have some opacity </span>
134 :     <span class="code-type">real</span> opac =
135 :     1.0 <span class="code-kw">if</span> (val > valOpacMax)
136 :     <span class="code-kw">else</span> (val - valOpacMin)/(valOpacMax - valOpacMin);
137 :     gray = gray + transp*opac*max(0.0, dot(-dir,norm));
138 :     transp = transp*(1.0 - opac);
139 :     }
140 :     }
141 :     <span class="code-kw">if</span> (transp < 0.01) { <span class="code-comment">// early ray termination</span>
142 :     transp = 0.0;
143 :     <span class="code-kw">stabilize</span>;
144 :     }
145 :     <span class="code-kw">if</span> (t > 40.0) {
146 :     <span class="code-kw">stabilize</span>;
147 :     }
148 :     t = t + stepSz;
149 :     }
150 :    
151 :     <span class="code-kw">stabilize</span> {
152 :     rgba = [gray, gray, gray, 1.0-transp];
153 :     }
154 :    
155 :     }
156 :    
157 :     <span class="code-kw">initially</span> [ RayCast(r, c) | r in 0..199, c in 0..199 ];
158 :     </div>
159 :     </div>
160 :    
161 : jhr 366 <h3>Status</h3>
162 :     <p>
163 :     We have a prototype language design that can handle simple examples, such as volume
164 :     rendering, and we are working on a baseline compiler for the design.
165 :     This compiler will generate CUDA or OpenCL code for running on GPUs.
166 :     </p>
167 :    
168 : jhr 376 <h3>Further information</h3>
169 :     <p>
170 :     We have not published any papers on Diderot yet, but here are some unpublished documents that provide
171 :     additional details about the project.
172 :     </p>
173 :     <ul>
174 :     <li><a href="papers/msrc-talk-20100906.pdf"><em>Diderot: A parallel domain-specific language for image analysis</em></a>, talk
175 :     given at Microsoft Research --- Cambridge, September 6, 2010.
176 :     </li>
177 :     </ul>
178 :    
179 : jhr 484 <h3>Support</h3>
180 :     <p>
181 : jhr 485 We thank <a href="http://research.nvidia.com/content/academic-partnership-program">NVIDIA</a>
182 :     for hardware and financial support.
183 : jhr 484 </p>
184 :    
185 : jhr 366 <hr />
186 : jhr 485 Last modified: December 10, 2010.
187 : jhr 366 <hr />
188 :    
189 :     </body>
190 :     </html>

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