Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Does omp_set_num_threads() works globally?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 Misery   Members   

354
Like
0Likes
Like

Posted 29 March 2013 - 10:17 AM

Hi there,

 

I am writing a code that cosists of many different functions using OpenMP. I wonder if there is a good way to set number of used threads once.

Can O do this using omp_set_num_threads()? Or I need to call it in every function that uses OpenMP?

 

Thanks in advance,

Misery



#2 Álvaro   Members   

20903
Like
2Likes
Like

Posted 29 March 2013 - 07:39 PM

I believe it's global, but this kind of thing is trivial to test...

#3 Misery   Members   

354
Like
0Likes
Like

Posted 30 March 2013 - 12:25 AM

I believe it's global, but this kind of thing is trivial to test...

 

I did test it and it seems global. But since the documentation is (gently speaking) - a bit unsufficient, I thought I'd ask, to avoid stepping on a mine after writing next 10k lines of code :]

 

Thanks!






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.