Hi,

I’ve a problem with my CUDA kernel (see below) in which I’ve multiple times the errors:

kernel.cu(): warning: expression has no effect

kernel.cu(): error: expression must have arithmetic or enum type

But, I don’t understand what is the origin (See https://devtalk.nvidia.com/default/topic/512343/error-must-have-arithmetic-type/)

Is someone may help me? Thanks.

My Kernel:

```
mod = SourceModule("""
__global__ void convolve_wavelet(float *histogram,float **morlet_re,float **morlet_im,float **out_re,float **out_im, float **out, int const histogram_len, int const period_len)
{
#include <cmath>
const int index = threadIdx.x + blockIdx.x * blockDim.x;
if (index <= (histogram_len-1)*(period_len-1))
{
out_re[int(index/histogram_len),int(index%(histogram_len))]=0;
out_im[int(index/histogram_len),int(index%(histogram_len))]=0;
for(int k=0;k<histogram_len;k++)
{
out_re[int(index/histogram_len),int(index%(histogram_len))]+=histogram[k]*morlet_re[int(index/histogram_len),k-int(index%(histogram_len))];
out_im[int(index/histogram_len),int(index%(histogram_len))]+=histogram[k]*morlet_im[int(index/histogram_len),k-int(index%(histogram_len))];
}
out[int(index/histogram_len),int(index%(histogram_len))]=sqrt(out_re[int(index/histogram_len),int(index%(histogram_len))]*out_re[int(index/histogram_len),int(index%(histogram_len))]+out_im[int(index/histogram_len),int(index%(histogram_len))]*out_im[int(index/histogram_len),int(index%(histogram_len))]);
}
}
""")
```