K
K
kill942015-12-01 16:44:50
C++ / C#
kill94, 2015-12-01 16:44:50

How to measure the running time of a thread?

How to measure the running time of threads in a recursive function?
for example there is a function (sample code)

void function(int i, int j )
{
#pragma omp task
if (i>j) 
    function(i,  j );
#pragma omp task
if (i<j)
  function(j, i );
#pragma omp taskwait
}

//сама функция вызывается 
#pragma omp parallel 
  {
#pragma omp single nowait
    {
      function(i, j );
    }
  }

how to find out the running time of each thread?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question