Number of threads and thread numbers in Grand Central Dispatch

Posted by raphgott on Stack Overflow See other posts from Stack Overflow or by raphgott
Published on 2010-03-16T16:13:32Z Indexed on 2010/05/12 15:54 UTC
Read the original article Hit count: 359

I am using C and Grand Central Dispatch to parallelize some heavy computations. How can I get the number of threads used by GCD? Also is it possible to know on which thread a piece of code is currently running on? Basically I'd like to use sprng (parallel random numbers) with multiple streams and for that I need to know what stream id to use (and therefore what thread is being used).

© Stack Overflow or respective owner

Related posts about c

    Related posts about parallel-processing