Resource for Win32 multithreading

I'm looking for a quick pointer to some multithreaded resources for C / C ++ on Win32. I am interested in comparing the relative performance of numerical calculations using single and multiple threads. The problems don't have to be real, but they don't have to be so trivial that relative performance is irrelevant. My first attempt was to implement a single-threaded sieve from Eratosthenes and Sieve of Atkin, assuming there would be relatively simple multi-threaded examples of both, but I couldn't find one. I don't want to become an expert on multithreading, but I agree that it will take some effort, I've provided about 30 hours of programming time. I have copies of Windows Internals from Russinovich, Solomon and Windows via C / C ++ from Richter and Nasarre,I am happy to buy additional books, but prefer free resources if they exist.

I would like to avoid any external libraries for example. Keep this example as clean as possible to avoid any dependency problems. I don't want to go anywhere near CLR

In context, I am writing dlls / xlls for Excel, since Microsoft Excel 12 stated that these functions can be multi-threaded, I want to study how this works.

I have been on the stop for a year or two, so please be careful. I had a little hunt around most of the things I found focuses on theoretical rather than implementation

+3


source to share


2 answers


MSDN section on multithreaded calls in WinAPI can help here? Or do you need something more "tutorial"?



For the following example, see the MSDN article "Creating Threads " referenced in the CreateThread documentation .

+1


source


In visual studio, you can enable OpenMP support, and then it is very easy to parallelize loops or regions of code. You can find tutorials easily, for example here .



+1


source







All Articles