- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to set the KMP_AFFINITY to NONE for AMD CPU, but don't know how to detect the CPU is INTEL or others.
I have tried somes windows API, seems not works.
Could some provide a code to me ?
Note: I don't want to use the WMI.
Thanks
I have tried somes windows API, seems not works.
Could some provide a code to me ?
Note: I don't want to use the WMI.
Thanks
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting free1006
I want to set the KMP_AFFINITY to NONE for AMD CPU, but don't know how to detect the CPU is INTEL or others.
I have tried somes windows API, seems not works.
Could some provide a code to me?
I have tried somes windows API, seems not works.
Could some provide a code to me?
In case of using a'__cpuid' instruction you could look for a Vendor information:
...
RTint CPUInfo[4] = { -1, -1, -1, -1 };
RTchar CPUVendor[32] = { 0x0 };
RTuint nIds = 0;
...
...
__cpuid( CPUInfo, 0 );
nIds = CPUInfo[0];
CrtMemset( CPUVendor, 0x0, sizeof( CPUVendor ) );
*( ( RTint * )( CPUVendor )) = CPUInfo[1];
*( ( RTint * )( CPUVendor+4 )) = CPUInfo[3];
*( ( RTint * )( CPUVendor+8 )) = CPUInfo[2];
...
CrtPrintfA( "\tCPU Vendor : %s\n", CPUVendor );
...
and output could look like:
...
CPU Vendor : GenuineIntel
...
Best regards,
Sergey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Its not KMP_AFFINITY=NONE but KMP_AFFINITY=DISABLED
I use (Delphi):
if CPUID.CpuType<>CPU_TYPE_INTEL then
SetEnvironmentVariable('KMP_AFFINITY','disabled'); // to disable annoying cmd box on non-Intel systems...
CPUID is a global object from the JCL library (opensource).
I use (Delphi):
if CPUID.CpuType<>CPU_TYPE_INTEL then
SetEnvironmentVariable('KMP_AFFINITY','disabled'); // to disable annoying cmd box on non-Intel systems...
CPUID is a global object from the JCL library (opensource).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I wonder how a call to a'__cpuid'will work on a computer with AMD CPU? Could somebody try it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have tried, the KMP_AFFINITY=DISABLED is not works, the KMP_AFFINITY=NONE works fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, I should be more precise: since IPP 7.0.7, KMP_AFFINITY=DISABLED is the correct way, between 7.0.0 and <=7.0.6 KMP_AFFINITY=NONE is correct.
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