<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated on Wed, 23 May 2012 00:36:46 -0700 -->
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <atom:link href="http://software.intel.com/en-us/articles/cpuid-for-x64-platforms-and-microsoft-visual-studio-net-2005/feed/" rel="self" type="application/rss+xml" />
    <title>Intel Software Network Comments Feed</title>
    <link>http://software.intel.com/en-us/articles/cpuid-for-x64-platforms-and-microsoft-visual-studio-net-2005</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>By Heath</title>
      <description><![CDATA[ 
Is it possible to detect the number of physical processors using this technique? The sample works perfectly but I need a method to query the processor(s) directly to get a count of physical processors in the system without using Windows API.
Many thanks.
 ]]></description>
      <link>http://software.intel.com/en-us/articles/cpuid-for-x64-platforms-and-microsoft-visual-studio-net-2005/#comment-83</link>
      <pubDate>Thu, 27 Mar 2008 02:58:31 -0700</pubDate>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/cpuid-for-x64-platforms-and-microsoft-visual-studio-net-2005/#comment-83</guid>
    </item>
    <item>
      <title>By Eric Palmer</title>
      <description><![CDATA[ 
You cannot detect the number of physical processors without some use of OS APIs.  When you issue the CPUID instruction, it runs on the processor on which the OS has scheduled your thread.  The enumeration algorithms in the samples below work by forcing the current thread to each of the processors in the system and then reading the APIC-related fields from the CPUID instruction.  This requires that the OS provide the total number of logical processors and a way to force the current thread to run on each (set affinity).

See http://softwarecommunity.intel.com/articles/eng/2728.htm and/or http://softwarecommunity.intel.com/articles/eng/2728.htm.  The first has the most up-to-date detection code.
 ]]></description>
      <link>http://software.intel.com/en-us/articles/cpuid-for-x64-platforms-and-microsoft-visual-studio-net-2005/#comment-86</link>
      <pubDate>Tue, 01 Apr 2008 12:00:45 -0700</pubDate>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/cpuid-for-x64-platforms-and-microsoft-visual-studio-net-2005/#comment-86</guid>
    </item>
    <item>
      <title>By Eric Palmer</title>
      <description><![CDATA[ 
The 2nd link below should have been http://softwarecommunity.intel.com/articles/eng/1855.htm
 ]]></description>
      <link>http://software.intel.com/en-us/articles/cpuid-for-x64-platforms-and-microsoft-visual-studio-net-2005/#comment-87</link>
      <pubDate>Tue, 01 Apr 2008 12:01:47 -0700</pubDate>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/cpuid-for-x64-platforms-and-microsoft-visual-studio-net-2005/#comment-87</guid>
    </item>
    <item>
      <title>By Cobra El Diablo</title>
      <description><![CDATA[ For CPU count determination use the following snippets, something I found whilst research some asm copy routines for mmx and sse enabled processors.

unsigned int cpuCount( void )
{
  unsigned int count = 1; // Always assume 1.

#if defined( LINUX )
  count = sysconf( _SC_NPROCESSORS_CONF );
#elif defined( WINDOWS )
  SYSTEM_INFO si;
  GetSystemInfo( &si );
  count = si.dwNumberOfProcessors;
#endif
  return( count );
}

Make sure you have the right headers 'windows.h' for Windows (like duh!) and sysconf.h for Linux.

Hope it helps, have fun and may The Source be with you :)

 ]]></description>
      <link>http://software.intel.com/en-us/articles/cpuid-for-x64-platforms-and-microsoft-visual-studio-net-2005/#comment-15847</link>
      <pubDate>Mon, 12 Jan 2009 15:07:20 -0800</pubDate>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/cpuid-for-x64-platforms-and-microsoft-visual-studio-net-2005/#comment-15847</guid>
    </item>
    <item>
      <title>By BreakPoint &amp;raquo; Fixing syntax highlightning</title>
      <description><![CDATA[ n/a ]]></description>
      <link>http://software.intel.com/en-us/articles/cpuid-for-x64-platforms-and-microsoft-visual-studio-net-2005/#comment-27225</link>
      <pubDate>Tue, 07 Jul 2009 04:43:36 -0700</pubDate>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/cpuid-for-x64-platforms-and-microsoft-visual-studio-net-2005/#comment-27225</guid>
    </item>
    <item>
      <title>By BreakPoint &amp;raquo; Collapse/expand syntax highlighted block</title>
      <description><![CDATA[ n/a ]]></description>
      <link>http://software.intel.com/en-us/articles/cpuid-for-x64-platforms-and-microsoft-visual-studio-net-2005/#comment-27247</link>
      <pubDate>Tue, 07 Jul 2009 08:48:17 -0700</pubDate>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/cpuid-for-x64-platforms-and-microsoft-visual-studio-net-2005/#comment-27247</guid>
    </item>
    <item>
      <title>By marccastaneda</title>
      <description><![CDATA[ Hi,

This is a very informative article.  Is a pure-java solution available?  We have a java-based
product and we want to transition to cpu core number licensing.  Although we can use JNI,
we would prefer to avoid that path if possible.

Regards,
Marc

 ]]></description>
      <link>http://software.intel.com/en-us/articles/cpuid-for-x64-platforms-and-microsoft-visual-studio-net-2005/#comment-49392</link>
      <pubDate>Sun, 26 Sep 2010 22:47:01 -0700</pubDate>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/cpuid-for-x64-platforms-and-microsoft-visual-studio-net-2005/#comment-49392</guid>
    </item>
    <item>
      <title>By Thomas</title>
      <description><![CDATA[ This cpuCount() is quite interesting.

I tested on a OpenVZ Server and an i920 CPU.
In both cases, it returned "1" ...

But i found no sysconf.h for linux, maybe this is the problem?

My version:

/*
#include <sysconf.h>
#include <windows.h>
*/

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

unsigned int cpuCount( void )
{
unsigned int count = 1; // Always assume 1.

#if defined( LINUX )
        count = sysconf( _SC_NPROCESSORS_CONF );
#elif defined( WINDOWS )
        SYSTEM_INFO si;
        GetSystemInfo( &si );
        count = si.dwNumberOfProcessors;
#endif
        return( count );
}

unsigned int cpuCount( void );

int main ()
{
        unsigned int d = cpuCount();
        printf("%d", d);
}


Did i do something wrong, then?
:-O ]]></description>
      <link>http://software.intel.com/en-us/articles/cpuid-for-x64-platforms-and-microsoft-visual-studio-net-2005/#comment-50339</link>
      <pubDate>Fri, 15 Oct 2010 10:02:42 -0700</pubDate>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/cpuid-for-x64-platforms-and-microsoft-visual-studio-net-2005/#comment-50339</guid>
    </item>
    <item>
      <title>By dashazi</title>
      <description><![CDATA[ thx  for share it :> ]]></description>
      <link>http://software.intel.com/en-us/articles/cpuid-for-x64-platforms-and-microsoft-visual-studio-net-2005/#comment-64786</link>
      <pubDate>Thu, 22 Sep 2011 23:50:59 -0700</pubDate>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/cpuid-for-x64-platforms-and-microsoft-visual-studio-net-2005/#comment-64786</guid>
    </item>
  </channel></rss>
