force to use physical cores

Sets affinity to physical cores.
Tested in windows. I could compile it in VS 2013 (C++ 11 code).