This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/61121] -O2 -ftree-parallelize-loops=0 for maximum not accepted in 4.9.0
- From: "jmichae3 at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 20 Jun 2014 13:57:12 +0000
- Subject: [Bug c++/61121] -O2 -ftree-parallelize-loops=0 for maximum not accepted in 4.9.0
- Auto-submitted: auto-generated
- References: <bug-61121-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61121
--- Comment #7 from Jim Michaels <jmichae3 at yahoo dot com> ---
http://msdn.microsoft.com/en-us/library/windows/desktop/dd405485%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/ms679351%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/ms680582%28v=vs.85%29.aspx
in windows,
#if defined(_MSC_VER)||defined(__BORLANDC__)||defined(__MINGW32__)
#include <windows.h>
int64_t getmaxthreads(void) {
DWORD numprocs=GetActiveProcessorCount(ALL_PROCESSOR_GROUPS);
if (0==numprocs) {
//ERROR. do something.
DWORD lasterr=GetLastError();
//do something with error
return 0;//failure
}
return numprocs-1;
}
#endif