CUDA SDK Examples <badptr> double precision

In the main program of the binomial option pricing example (or any of the double precision CUDA SDK examples), precisionChoice is a badptr from creation. persists through cutGetCmdLineArgumentstr, however I can force useDoublePrecision = 1 and it seems to work. Simulation time increases from 40ms to 140ms.

I have tried changing the syntax of the pointer creation based on some windows forums but without success.

I will throw in the disclaimer that I am new to CUDA. The programming guide indicates my hardware should be good for double precision. What I am I missing?

int main(int argc, char **argv){
const unsigned int OPT_N_MAX = 512;
unsigned int useDoublePrecision;

char *precisionChoice;
cutGetCmdLineArgumentstr(argc, (const char **)argv, "type", &precisionChoice);
if(precisionChoice == NULL) {
    useDoublePrecision = 0;
} else {
    if(!strcasecmp( precisionChoice, "double"))
        useDoublePrecision = 1;
        useDoublePrecision = 0;


Windows 7
GTX 280

No doubt it is a conflict between this declaration:

char *precisionChoice;

and this usage

cutGetCmdLineArgumentstr(argc, (const char **)argv, "type", &precisionChoice);

Check the cutil code for sure.

This seems to work for me - specify “-type=double” on the command line, and useDoublePrecision == 1.