Microsoft
Software
Hardware
Network
Question : Problem: How does one spawn one thread for each core in C++ on Windows?
I'm writing an image processing algorithm to process a bunch of completely separate images. In an ideal world, I would like to query the operating system for how many cores it has available, and then run a thread on each core.
Is there a way in C++ to query for how many cores are on the machine on which I am running?
Can I spawn a thread for a particular core?
Thanks!
Answer : Problem: How does one spawn one thread for each core in C++ on Windows?
http://msdn.microsoft.com/
en-us/libr
ary/aa3943
73(VS.85).
aspx
see NumberOfCores.
Here is an example to get OS info. substitute with "Win32_Processor" at appropriate place(s).
http://msdn.microsoft.com/
en-us/libr
ary/aa3904
23(VS.85).
aspx
Random Solutions
Problem: What DPI to set mouse to?
Problem: KVM switch has delay recognising USB devices
Problem: Creating MS-DOS boot partition.
Problem: Which current HDTVs support 1920x1080 over VGA?
Problem: A DVD-RW recorded on home DVD player not working on PC's
Problem: Free Hard Drive Diagnostic Tools?
Problem: Line conditioner for "dirty" power
Problem: Is there a D-Link WBR1310 bridge mode?
Problem: Why does music suddenly start playing arbitrarily?
Problem: External backup overr 100BaseT network