Raster Interleaving

We mentioned on the previous page that the polygon extraction is not multithreaded and that we never wish to rasterize two adjacent windows to avoid memory contention collisions. Given these constraints the diagram below shows how a band is processed with 4 raster threads.

raster interleave

The small green boxes with pg in them represent the time required by the polygon extraction. This time is very small - often 1/50th of the raster time. As soon as PG is complete for raster thread 1, it can then start extracting polygons for raster thread 2 and so on until all four raster threads are running.

There is no guarantee which of the 4 threads will finish first because the density of the polygons fed to each raster thread may be different. But our diagram assumes that the density is uniform so one expects thread 1 to finish first and thread 4 to finish last.

Once all 4 threads are complete the process is repeated until all windows in the band have been rasterized. At that point the bitmap for the band is complete; the calling program will do something with the bitmap - most likely compress it and write it to disk so that the memory can be used for the next band.


Latencies

In principal, one could eliminate some latency by not waiting for all 4 raster threads to complete. However we found that to implement that one must make extensive use of locks and such locks introduce their own inefficiency.


Next Dual Buffers Increases Throughput



ARTWORK CONVERSION SOFTWARE, INC.                  Company Profile
417 Ingalls St.,     Santa Cruz, CA 95060         Tel (831) 426-6163     Fax 426-2824               email: info@artwork.com