douglas125

Irreducible ControlFlow Detected

Discussion created by douglas125 on May 16, 2010
Latest reply on Aug 20, 2010 by ryta1203

Hi.

I'm trying to use a simple kernel to sum some values but I keep getting Error: Irreducible ControlFlow Detected with Stream SDK 2.1 on a Radeon 4890 Card. The kernel is attached. Any ideas?

Thanks

 

 

#pragma OPENCL EXTENSION cl_khr_byte_addressable_store : enable #define MAX_GRIDSIZE 21 __kernel void CalcRowSignatures(__global uchar * ImgData, __global int * Region, __global int * DerivData, __global int * GridSize, __global float * Signature, __global int * width, __global float * FinalSignature) { int xfmx0 = Region[2]; int yfmy0 = Region[3]; int x = get_global_id(0); int gSize = GridSize[0]; int gSize2x=gSize*gSize*x; int valMedio = (gSize - 1) / 2; float RowSig[(MAX_GRIDSIZE+1)/2][MAX_GRIDSIZE]; for (int i = 0; i <= valMedio; i++) { for (int j = 0; j < gSize; j++) { RowSig[i][j] = 0; } } for (int y = 0; y < yfmy0 - gSize; y++) { //Assinatura int corCentro = DerivData[x + valMedio + xfmx0 * (y + valMedio)]; for (int i = 0; i <= valMedio; i++) { for (int j = 0; j < gSize; j++) { if (i != valMedio || j != valMedio) { int cor = DerivData[x + j + xfmx0 * (y + i)]; RowSig[i][j] += (float)cor * (float)corCentro; } } } } for (int i = 0; i <= valMedio; i++) { for (int j = 0; j < gSize; j++) { Signature[gSize * i + j + gSize2x] = RowSig[i][j]; } } }

Outcomes