Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] OpenMP in Qt
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] OpenMP in Qt

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 8.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    habbas33
    wrote on last edited by
    #1

    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?
    @
    omp_set_dynamic(0);
    omp_set_nested(3);
    #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

    1 Reply Last reply
    0
    • H Offline
      H Offline
      habbas33
      wrote on last edited by
      #2

      QMAKE_CXXFLAGS+= -openmp

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved