- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
if there is any comman like that in c language please inform me.this is because iam doing automatic parallelisation project using openmp libraries.to do that one first of all i have to check weather it is quad core or dual core . based on that one i have to assign the threads.
please reply me sir
please reply me sir
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not in C language, but you may be interested in sample OpenMP code, e.g.
#ifdef _OPENMP
#include
#endif
..........
#ifdef _OPENMP
int maxt=omp_get_max_threads();
....
If you are trying to distinguish a single CPU 8 core from dual 4 core, you will require vendor-dependent code.
#ifdef _OPENMP
#include
#endif
..........
#ifdef _OPENMP
int maxt=omp_get_max_threads();
....
If you are trying to distinguish a single CPU 8 core from dual 4 core, you will require vendor-dependent code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi sabbinenisunil,
You may start this by recognizing the processor type using IPP functions, each
type has its pre-known features and number of cores.
Please check the following thread:
http://origin-software.intel.com/en-us/forums/showthread.php?t=71133
also, please check the following articles:
1) Is there an IPP function to detect the processor type?
2) IPP Dispatcher Control Functions - ipp*Init*() functions
http://software.intel.com/en-us/articles/ipp-dispatcher-control-functions-ippinit-functions/
3) Understanding CPU Dispatching in the Intel IPP
Regards,
Tamer Assad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
In Java, this is very easy to know.
Below is a snippet for your reference.
public class PerfTest {
public static void main(String[] args) {
int processors = Runtime.getRuntime().availableProcessors();
System.out.println("Available processors : " + processors);
}
}
Regards,
Md. Irfanulla S.
In Java, this is very easy to know.
Below is a snippet for your reference.
public class PerfTest {
public static void main(String[] args) {
int processors = Runtime.getRuntime().availableProcessors();
System.out.println("Available processors : " + processors);
}
}
Regards,
Md. Irfanulla S.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page