Steven_Makoviac

Unable to parse Kernel

Discussion created by Steven_Makoviac on Mar 30, 2009
Latest reply on Mar 30, 2009 by Steven_Makoviac

Hi,

i'm trying to compile this kernel but i get the error: Error (syntax error) before 'int' int i = index.y+1;

 

kernel void funk(int array_heigth, float fu, float a[][], out float b[][])
{
 int2 index = instance().xy;

 if(index.x!=9)
 {
      float point1 = a[index.y][index.x];
     float point2 = a[index.y][index.x+1];
     float fr = fu * (point2-point1);
     b[index.y][index.x] = point1+fr;
     b[index.y][index.x+1] = point1-fr;
    }
 int i = index.y+1;
 float pCoor;
 if(index.y==array_heigth)
 {
  i=0;
  pCoor = 2.1f*3.1457f;
 }
  



Outcomes