I am writing a multi-platform software. And I want to make configurable value number_of_cores_to_use that will be number from 1 to 4. 1- program will use 1 core,2-2 cores etc.
How can I do that with c++. Some function with option to run thread on specified core?