I try to do a test. It calls a function to add two arrays. very simple. But if the array is double, it does not work. Only works for float. mine are Quadro FX 5800, 64 win 7, VS 2010
//works
global void addFloat(float *d_a, float *d_b, float *d_c, const size_t n)
{
int tid = blockIdx.x * blockDim.x + threadIdx.x;
if( tid < n){d_c[tid] = d_a[tid]+d_b[tid]; }
};
//not work
global void addDouble(double *d_a, double *d_b, double *d_c, const size_t n)
{
int tid = blockIdx.x * blockDim.x + threadIdx.x;
if( tid < n){d_c[tid] = d_a[tid]+d_b[tid]; }
};
explain? GPU cannot handle double?
Your Quadro FX 5800 is compute capability 1.3, so it should support doubles. Make sure you compile for this architecture (and not 1.0, as is done by default) by specifying compute_13,sm_13. How to do this in Visual Studio is explained here on stackoverflow.
Great, It works. Thanks