Sign in to follow this  
akhin

OpenMP Questions for multiple core s & Xbox 360

Recommended Posts

Hi ,



I have some confusions of execution details of "OpenMp`ed" code or in other words codes parallezied by using OpenMP pragmas.



1. Let`s assume that we have a dual core processor : to myknowledge for PC , what you can do is setting `number of threads` , so it might not be guaranteed that

if you run 2 OpenMp threads , they will run on different cores , unless you set SetAffinity , is this correct ?



2. What about OpenMp`s execution details on Xbox360 Since there are 3 processors , all supports hyperthreading , makes it 6 hardware threads

So what are the options for this case ?

Share this post


Link to post
Share on other sites
[quote name='akhin' timestamp='1302350899' post='4796301']
1. Let`s assume that we have a dual core processor : to myknowledge for PC , what you can do is setting `number of threads` , so it might not be guaranteed that

if you run 2 OpenMp threads , they will run on different cores , unless you set SetAffinity , is this correct ?
[/quote]

You don't even have to set the number of threads: By default OpenMP will create 2 threads if you have 2 cores. The OS will use both cores to run those threads, although the mapping from threads to cores may not remain constant throughout the life of the threads. This is a detail that shouldn't concern you much.

If you want a different number of threads (perhaps hyperthreading makes OpenMP spawn more threads than there are cores, which for some applications doesn't quite work), you can specify it explicitly by calling omp_set_num_threads.

Share this post


Link to post
Share on other sites
[quote name='akhin' timestamp='1302545205' post='4797210']
Any tips from industry people who have used XDK ?
[/quote]

No, because the XDK is pretty heavily NDA'd so there is little to nothing anyone can say about it that isn't out there in the public docs for things like XNA etc.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this