[][src]Function opencv::core::get_thread_num

pub fn get_thread_num() -> Result<i32>
Deprecated:

Current implementation doesn't corresponding to this documentation.

Returns the index of the currently executed thread within the current parallel region. Always returns 0 if called outside of parallel region.

Deprecated: Current implementation doesn't corresponding to this documentation.

The exact meaning of the return value depends on the threading framework used by OpenCV library:

  • TBB - Unsupported with current 4.1 TBB release. Maybe will be supported in future.
  • OpenMP - The thread number, within the current team, of the calling thread.
  • Concurrency - An ID for the virtual processor that the current context is executing on (0 for master thread and unique number for others, but not necessary 1,2,3,...).
  • GCD - System calling thread's ID. Never returns 0 inside parallel region.
  • C= - The index of the current parallel task.

See also

setNumThreads, getNumThreads