This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/61121] -O2 -ftree-parallelize-loops=0 for maximum not accepted in 4.9.0


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]