[Insight-developers] Multi-threading strategies
Blezek, Daniel J (GE, Research)
blezek at crd.ge.com
Wed Oct 3 08:44:12 EDT 2007
At long last, I have committed the code used to generate the results
below. The ZThread library and simple project have been imported into
the NAMICSandbox. They can be checked out by:
svn co http://www.na-mic.org/svn/NAMICSandBox/trunk/ZThread ZThread
svn co http://www.na-mic.org/svn/NAMICSandBox/trunk/TheadIT ThreadIT
ZThreads must be built and installed, and CMake configured to find the
library in the ThreadIT project. It would be a simple matter to convert
the ZThreads to a CMake build.
Please have a look and comment.
-dan
________________________________
From: insight-developers-bounces+blezek=crd.ge.com at itk.org
[mailto:insight-developers-bounces+blezek=crd.ge.com at itk.org] On Behalf
Of Blezek, Daniel J (GE, Research)
Sent: Tuesday, September 11, 2007 8:47 AM
To: insight-developers at itk.org
Subject: RE: [Insight-developers] Multi-threading strategies
My take on the status of ZThreads is that the author wrapped up
the API, changed the license to MIT and then when to work for IBM. He
was a student before. I found the API to be well documented using
Doxygen, and extremely well written about in C++ Practical Programming
(http://www.linuxtopia.org/online_books/programming_books/c++_practical_
programming/index.html) in this chapter
(http://www.linuxtopia.org/online_books/programming_books/c++_practical_
programming/c++_practical_programming_260.html)
We can hardly do better. Beyond the thread pool there is a
wealth of other synchronization classes that we could leverage for other
purposes (fast mutexs, latches, etc...).
Here is a further comparison, looking at the overhead of
ZThreads. I created and call update on a median filter ZThread
implementation using an 8 thread pool with varying number of "chunks" of
work. This is on an 8 CPU box. I don't understand why 11, 13 and 14
give such inconsistent results. 7-8 seconds is what I get with the
standard Median filter as a benchmark.
Probe Tag Starts Stops Time
MedianZ 1 Chunk 1 1
28.578938007354736328125
MedianZ 2 Chunk 1 1
14.76609897613525390625
MedianZ 3 Chunk 1 1
11.375431060791015625
MedianZ 4 Chunk 1 1
9.661273956298828125
MedianZ 5 Chunk 1 1
8.6257951259613037109375
MedianZ 6 Chunk 1 1
7.953671932220458984375
MedianZ 7 Chunk 1 1
7.6634509563446044921875
MedianZ 8 Chunk 1 1
7.311050891876220703125
MedianZ 9 Chunk 1 1
6.9653728008270263671875
MedianZ 10 Chunk 1 1
8.026858806610107421875
MedianZ 11 Chunk 1 1
30.3013870716094970703125
MedianZ 12 Chunk 1 1
7.3554909229278564453125
MedianZ 13 Chunk 1 1
30.2663071155548095703125
MedianZ 14 Chunk 1 1
30.4115161895751953125
MedianZ 15 Chunk 1 1
7.146190166473388671875
-dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.itk.org/mailman/private/insight-developers/attachments/20071003/ad00dd69/attachment.htm
More information about the Insight-developers
mailing list