Important: Please read the Qt Code of Conduct -

[SOLVED] OpenMP in Qt

  • hi I was using OPM.h for my code in c++ not I need to integrate with GUI based -QT- Qt.
    the problem I am facing is that in -QT- Qt I can not get other IDs of thread?
    #pragma omp parallel num_threads(3)

    int ID = omp_get_thread_num();
    if (ID == 0)
    { abc();}

    if (ID == 1)
    { abc1();}

    if (ID == 2)
    { abc2();}
    this is working fine without -QT- Qt platform but not with -QT- Qt

    i have also included this in my .pro file
    QMAKE_LFLAGS += -fopenmp
    QMAKE_CXXFLAGS += -fopenmp
    LIBS += -fopenmp
    im using VS2013

  • QMAKE_CXXFLAGS+= -openmp

Log in to reply