@@ -32,7 +32,7 @@ <h1>Intel® ISPC</h1>
3232 < h1 class ="title "> A Simple ispc Example</ h1 >
3333< p > Here is a walkthrough of a simple example of using < tt class ="docutils literal "> ispc</ tt > to
3434 compute an image of the Mandelbrot set. The full source code for this
35- example is in the < tt class ="docutils literal "> examples/mandelbrot</ tt > directory of
35+ example is in the < tt class ="docutils literal "> examples/cpu/ mandelbrot</ tt > directory of
3636 the < tt class ="docutils literal "> ispc</ tt > distribution; below is a lightly modified version of
3737 that example. (For example, we have elided some of the details related
3838 to benchmarking and writing the final output image that are in the
@@ -66,7 +66,7 @@ <h1 class="title">A Simple ispc Example</h1>
6666< p >
6767Here is the start of the definition of the < tt class ="docutils literal "> mandelbrot_ispc()</ tt >
6868function that the < tt class ="docutils literal "> ispc</ tt > compiler compiles. (This function is
69- defined in the < tt class ="docutils literal "> mandelbrot.ispc</ tt > file.) There are a four main
69+ defined in the < tt class ="docutils literal "> mandelbrot.ispc</ tt > file.) There are four main
7070things to notice here.
7171</ p >
7272< ol >
@@ -189,9 +189,8 @@ <h1 class="title">A Simple ispc Example</h1>
189189
190190
191191< p > To compile this example, install the < tt class ="docutils literal "> ispc</ tt > compiler in a
192- directory that is in your < tt class ="docutils literal "> PATH</ tt > , and run < tt class ="docutils literal "> make</ tt > on Mac OS
193- X or Linux, or build using the < tt class ="docutils literal "> mandelbrot.vcxproj</ tt > build file
194- with MSVC 2010. Note that the < tt class ="docutils literal "> ispc</ tt > compiler generates regular
192+ directory that is in your < tt class ="docutils literal "> PATH</ tt > , and run < tt class ="docutils literal "> make</ tt > on macOS
193+ or Linux, or build using CMake on Windows. Note that the < tt class ="docutils literal "> ispc</ tt > compiler generates regular
195194 object files that you can just link with object files compiled with C/C++
196195 compilers. (Here is the < a href ="mandelbrot.txt "> assembly language
197196 output</ a > from compiling the < tt class ="docutils literal "> mandelbrot.ispc</ tt > source file for
@@ -222,7 +221,7 @@ <h1 class="title">A Simple ispc Example</h1>
222221< pre class ="literal-block ">
223222% ./mandelbrot
224223[mandelbrot ispc]: [58.570] million cycles
225- [mandelbrot serial]: [335.005] millon cycles
224+ [mandelbrot serial]: [335.005] million cycles
226225 (5.72x speedup from ISPC)
227226%
228227</ pre >
@@ -238,8 +237,8 @@ <h1 class="title">A Simple ispc Example</h1>
238237< p > Note that all of the exposition up until now has been related to
239238 harvesting the available parallelism from the SIMD unit in a single CPU
240239 core. To fully use the system's computational resources also requires
241- parallelism across the CPU cores—modern CPUs may from two to ten or
242- more processing cores, each of which has a SIMD vector unit.
240+ parallelism across the CPU cores—modern CPUs may have from eight to
241+ dozens of processing cores, each of which has a SIMD vector unit.
243242</ p >
244243
245244< p > Thanks to the fact that < tt class ="docutils literal "> ispc</ tt > cleanly inter-operates with
@@ -257,7 +256,7 @@ <h1 class="title">A Simple ispc Example</h1>
257256 functionality for launching concurrent tasks that < tt class ="docutils literal "> ispc</ tt > offers.
258257 The < tt class ="docutils literal "> ispc</ tt > language provides constructs for launching asynchronous
259258 tasks that can execute concurrently with the rest of the program; see the
260- directory < tt class ="docutils literal "> examples/mandelbrot_tasks</ tt > in the < tt class ="docutils literal "> ispc</ tt >
259+ directory < tt class ="docutils literal "> examples/cpu/ mandelbrot_tasks</ tt > in the < tt class ="docutils literal "> ispc</ tt >
261260 distribution to see how to parallelize across both cores and the SIMD
262261 units.
263262</ p >
0 commit comments