Consider the following program:
#define DIMENSION 96
#define ITERATIONS 1e4
__constant__ float cmatrix[DIMENSION*DIMENSION];
__global__ void kernel_constant() {
__shared__ float vin[DIMENSION];
int tid = threadIdx.x;
int iter, i, row;
float temp;
row = tid * DIMENSION;
for(iter=0; iter < ITERATIONS; iter++) {
temp = 0;
for (i=0; i < DIMENSION; i++) {
temp += vin[i] * cmatrix[row + i];
}
__syncthreads();
}
}
int main( void ) {
kernel_constant<<<1, DIMENSION, 0, 0>>>();
}
when compiling it, nvcc complains:
$ nvcc constant.cu -o constant
ptxas /tmp/tmpxft_00000425_00000000-2_constant.ptx, line 61; warning : Double is not supported. Demoting to float
But there is no double anywhere to be seen. What am I doing wrong?