Author Archive

Counting Processor Cores and Threads

Uncategorized No Comments »

Wafer showing many Intel Nehalem cores
Here’s a little snippet I’d like to share with you since there really isn’t a good example online that shows you how to count the processor cores and threads on Microsoft Windows using the Windows API through C++.

If you have the need to count cores, or if you wish to determine if the system running your program is multicore, this snippet can come in handy.

By “counting threads” I mean counting the logical processors present, since Hyper-Threaded processors may display multiple logical cores per physical core — counting these is the tricky part.
Read the rest of this entry »

First Public Larrabee Demo

Uncategorized No Comments »

Intel demoed Larrabee for the first time to the public at the IDF (Intel Developer Forum), according to PC Pro.

The attached screenshot is a bit underwhelming but maybe we’ll see some impressive examples soon. In any case, if the demo is at the IDF now, the public release couldn’t be far off.

Edit (2010):
In case you haven’t heard — it seems like Larrabee was cancelled for good.

DirectX Developer Blog

Uncategorized No Comments »

Apparently, the DirectX team has had a blog since late April of this year it’s just not very popular I guess.

They’ve posted a shipload of information over the last couple of months, so if you’re like me and had no idea this existed, you’ll have quite some reading to catch up to. It’s mostly about Windows 7 and the new graphics APIs (Direct2D, DirectWrite, etc.) but it’s interesting nonetheless.

August 2009 DirectX SDK

Uncategorized No Comments »

DirectX 10 Logo
Yeah, I don’t have the DX11 logo yet…
Today the August 2009 DirectX SDK was released on MSDN, strangely enough the August SDK was released in September.

This release contains the first official release of Direct3D 11 (RTM), which was previously only a technical preview. According to the release notes, this version of Direct3D 11 will only work on the RTM version of Windows 7, not on the RC and Beta versions. So I guess only vendors and MSDN subscribers will be able to develop software until Windows 7 hits the retail market.

There’s also the issue of pure Direct3D 11 hardware not being sold yet but that should be right around the corner if the SDK is here.

Windows 7: The First 7 Days

Uncategorized No Comments »

Windows 7 Ultimate Box ShotSo today marks the first week of Windows 7 RTM usage and I have to say that I like it. As I said before, Vista’s gaming performance was sub par but it looks like Windows 7 has picked up the slack.

It simply seems like the same system performs better with Windows 7, it’s definitely not simply a Vista update/Service Pack. And I’m happy to report that Fallout 3 (for the players) works OK on Windows 7 although there is the occasional crash and Alt-Tabbing is out of the question it seems.

Another very good thing thing I’ve noticed is the lack of UAC pop-ups, the only ones I’ve seen are when I try to run downloaded software – which is the same as in Windows XP.

Maybe in the long run some quirks will show up but for now I’m a happy camper indeed.

Windows 7

Uncategorized 1 Comment »

Windows 7Windows 7 RTM was released for MSDN subscribers today so I’m taking this chance to upgrade to Windows 7 early on. I’ve been using Vista fulltime a bit over a year now and have been a bit disappointed in the long run with its performance when it comes to gaming and other intense apps.

Although I’ve been disappointed with Vista’s gaming performance, everything else has been smooth sailing. In fact a bunch of features that are apparently introduced in Windows 7 (Start Search), were already available in Vista.

Anyway, I’ll soon find out if the Windows 7 talk is all hype or if there’s some truth to the claims I’ve been hearing.

C++0x delayed, becomes C++1x

Uncategorized No Comments »

bjarne stroustrupThe upcoming C++ revision, C++0x has been delayed and is now scheduled for release somewhere in the 2010′s, thus effectively becoming C++1x.

Here’s a link to an article published in Dr. Dobbs Journal by C++’s creator Bjarne Stroustrup explaining why (page 3).

I don’t think anyone is really surprised with the delay as the new standard would lift C++ up to a more modern level in order compete with contemporary programming languages, thereby implementing much addendum. The list of new features and STL additions is certainly impressive and when C++0x, er, C++1x is released, we’ll probably all need to brush up on our C++ skills.

Don’t use Turbo C, that’d be great yeah..

Uncategorized No Comments »

Turbo C++I don’t know how many times I’ve ran into people that need help with a piece of C code that should run perfectly fine but for some reason it just doesn’t. Of course, after much going back and forward, you find out that the person you’re trying to help is using Borland’s Turbo C compiler version 2.01, released 20 years ago in 1989..

While the compiler is freely download-able from several websites labeled as an “Antique”, it’s really not a great tool to start programming with on modern systems. If you really (really) want to use Turbo C, buy an old 286 and go at it but don’t use your Intel Core i7. Here’s why. PS, this also applies to Turbo C++

1. The compiler is 20 years old, it won’t support the current C99 standard so many things you might have learned, you now have to unlearn in order to get the program working.

2. Turbo C is an MS-DOS compiler, chances are if you are learning C now, you have never used DOS in your life; there’s no reason to go back, nostalgia doesn’t apply to DOS. Furthermore, Windows does not support DOS programs from the 80′s, so you would have to emulate DOS in order to get your programs working properly.

3. There are many free compilers available that are 100% compatible with today’s hardware and not bound by any limitations. Even if your Turbo C compiler is 32 bit compatible, it’s not a great match for your 64 bit CPU and Operating System.

4. You’re stuck on the command line interface with no way out. Even if you make the best command line program for DOS, nobody besides yourself will ever want to use it. Converting your program to Win32 requires a new compiler that will yell at you for using coding practices from 1989 and break your program.

In other words, if the following code compiles without warning, you know you need another compiler.

#include <stdio.h>

main()
{
    printf("Hello, World!");
}