Hello,
I’m trying to compile the following cuda kernel:
__global__ void CudaAdamsPreditor(float *fn, float *yn, float h, float *fold, int *iwork ) {
int bx = blockIdx.x;
int tx = threadIdx.x;
unsigned int stride;
if( bx < iwork[0] && tx < ORDEM ) {
__device__ __shared__ float FOLD[ORDEM];
if( tx < ORDEM - 1 ) {
FOLD[tx] = fold[bx*ORDEM + tx] = fold[bx*ORDEM + tx + 1];
}
FOLD[ORDEM - 1] = fn[bx];
FOLD[tx] = a[tx] * FOLD[tx];
for( stride = blockDim.x; stride > 1; stride >> 1 ) {
__syncthreads();
if( tx + stride < ORDEM ) FOLD[tx] += FOLD[tx + stride];
}
yn[bx] = yn[bx] + h * DIVISOR * FOLD[0];
}
}
and I get the following compiler message:
adams.cu(49): warning: expression has no effect
where the line 49 is: “for( stride = blockDim.x; stride > 1; stride >> 1 ) {”
the compiler seems to be complaining of the use of the operator >>.
I’m using the following command line in a debian system to compile:
nvcc -c adams.cu
Does anybody knows what this warning is about? As far as I know there is no mistake in the line reported, actually this is an sum algorithm I copied from a cuda tutorial.
Thanks in advance