If someone has (say) a quad-core CPU, do the cores have any kind of UID which can be interrogated by a program (i.e. to find out which core a given thread is running on)? Here's why...
I'm working on a cross-platform audio app which can load 3rd party plugins. Audio plugins can be notorious CPU hogs. The current version of our app doesn't have any support for multiple CPUs (except whatever's provided by the OS). So we often end up with multiple plugins (and everything else) all trying to share the first CPU core while the others sit there doing nothing. This can lead to problems such as audible glitching.
Someone's contributed some code which is supposed to overcome these problems by allocating plugins in a round-robin fashion to all the CPU's cores. I'm told that it works fine on Linux and OS-X. But from what I've observed in Windows it doesn't seem to work at all. The only way I could be certain would be if I could somehow print something out which would tell me what core the current thread is running on. I could then identify if the plugins are (or aren't) getting shared around the CPU cores. Anyone know of a way to do that?
I'm working on a cross-platform audio app which can load 3rd party plugins. Audio plugins can be notorious CPU hogs. The current version of our app doesn't have any support for multiple CPUs (except whatever's provided by the OS). So we often end up with multiple plugins (and everything else) all trying to share the first CPU core while the others sit there doing nothing. This can lead to problems such as audible glitching.
Someone's contributed some code which is supposed to overcome these problems by allocating plugins in a round-robin fashion to all the CPU's cores. I'm told that it works fine on Linux and OS-X. But from what I've observed in Windows it doesn't seem to work at all. The only way I could be certain would be if I could somehow print something out which would tell me what core the current thread is running on. I could then identify if the plugins are (or aren't) getting shared around the CPU cores. Anyone know of a way to do that?