Reply to comment

clock() в CUDA

Tagged:  

Подскажите пожалуйста правильное понимание того что возвращает функция clock() в Cuda.
Хотя бы на примере из SDK Cuda.

  1.  clock_t * dtimer = NULL;
  2.  clock_t timer[NUM_BLOCKS * 2];
  3.  timedReduction<<<NUM_BLOCKS, NUM_THREADS, sizeof(float) * 2 * NUM_THREADS>>>(dinput, doutput, dtimer);
  4.     clock_t minStart = timer[0];
  5.     clock_t maxEnd = timer[NUM_BLOCKS];
  6.     for (int i = 1; i < NUM_BLOCKS; i++)
  7.     {
  8.         minStart = timer[i] < minStart ? timer[i] : minStart;
  9.         maxEnd = timer[NUM_BLOCKS+i] > maxEnd ? timer[NUM_BLOCKS+i] : maxEnd;
  10.     }

Допустим, что мне скажет разница между maxEnd и minStart ?
P.S. Хелп я читал, но в английском честно сказать слаб :)

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <i> <table> <td> <tr> <th>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. The supported tag styles are: <foo>, [foo].
  • Images can be added to this post.

More information about formatting options

Copyright © 2008-2011 Alex Tutubalin