Compiling double precission I can't use pow function...

Hi, I have this problem when I try to compile my cuda source .

lab.cu(132): error: calling a host function from a device/global function is only allowed in device emulation mode

This is the problematic line:
R_nm[threadIdx.x] += pow(polar[Index].x,(n-2s)) pow(-1,s)* (fac_table[n-s]/(fac_table[a-s]*fac_table[s]*fac_table[b-s]));

The problem is in the pow function, the problem only appears if I use it.

I’m using a GeForce GTX 280 device and i have added -arch sm_13 in my common.mk

NVCCFLAGS += $(SMVERSIONFLAGS) -arch sm_13

Sorry for my English >.< .

I have encounter the same matter. :(

It looks like pow may be invoked as pow(int, int). CUDA only has pow(double, int) and pow(double, double) by default. Cast one or both arguments to double, or roll your own pow(int, int). (the host probably has a pow(int, int) function so pow(int, int) gets resolved to that and not a CUDA function)

Try to use the powf() function instead of the pow() function.