OpenMP Questions for multiple core s & Xbox 360

Started by
2 comments, last by _the_phantom_ 13 years ago
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 ?
Advertisement
Any tips from industry people who have used XDK ?

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 ?


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.

Any tips from industry people who have used XDK ?


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.

This topic is closed to new replies.

Advertisement