This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: implementation of std::thread::hardware_concurrency()
On Oct 31, 2011, at 2:10 PM, niXman wrote:
> This is patch is implement the std::thread::hardware_concurrency().
[ general comment ] Ick, this isn't what I'd call clean. Maybe a porting header inclusion that defines a static inline pthread_num_processors_np when on those system that don't have it. With that then this routine could just use pthread_num_processors_np instead after including that porting header. Having dozens of files with cascades of #if went out of fashion back in the 1990s.