Adding Type Casting Functions to VS2012 Project CUDA Toolkit 5.5

Hi! I have a problem during compilation process. I have been receiving next error:
Error 2 error : identifier “__double2float_rn” is undefined
I use VS2012 and CUDA Toolkit 5.5 on Windows 7 32.
There are headers I attached to the project:
#include <stdio.h>
#include <stdlib.h>
#include <cuda.h>
#include <cuda_runtime.h>
#include <device_functions.h>

Everything compiles absolutely normal before I’m trying to add this function to my code.

Thanks for any help.

Sounds like you’re not targeting an architecture greater than sm_12.

Check your Property Pages for your project and make sure this is at least “compute_13,sm_13”:

There is “compute_10,sm_10” value in this string. Could you tell me how this value appears? Is it appears automatically depend on type of videocard?

You should check which model of CUDA capable device do you have. Then figure out which compute capability does it have from this webpage https://developer.nvidia.com/cuda-gpus. The Code Generation values should correspond to the compute capability of your card.

Sorry for not answering. And thanks for your answers. I checked my GPU (GeForce 9800 GT). Actually I have other problem may be depend on the capabilities of my GPU (I’m not sure). The problem is that I have to do a lot of double precision calculations on GPU and then convert them to float values. Sure it is possible because I checked this on the same task for CPU. But when I use GPU an unpredictable behaviour appears.
There is an example of the code (not the actual code, but the same):

float Pf; // float input/output parameter
Formulaf(t); // double precision device function
double Pd = Pf +  Formulaf(t);
Pf = Pd + ...;

Unfortunately, due to the character of the solution and GPU features I can’t do all operations with single or double precision values.
The first thing I had thinking over was the type casting. So I tried to use __double2float_rn function.