If you're running through a loop using system and exe, you're single threaded. That means you'll only use one processor.
If you want to use more processor cores, you'll want to use fork or threads. Of course, these will be randomly assigned to a processor core by the OS. It looks like you might be on a *nix platform. If so, you can look up the man page on numactl to see about binding a process to specific core(s).
In reply to Re: loop over to utilize all cpus
by dasgar
in thread loop over to utilize all cpus
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |