Hello All,

I have a code that is written in C and I want to write it in CUDA. But due to dependency I am not able to write in CUDA. My C code is :

```
int fun_2( int *i, int *k, int J, int size, float* Array_1)
{
int k1 = (*j1), k2 = (*j2);
while ( Array_1[k1] < J )
{
k1++;
(*i) = k1;
if ( k1 >= size )
return 10;
}
k2 = k1 - 1;
(*k) = k2;
return 0;
}
void fun_1( float * Array_1, float * Array_2, int size )
{
int i = 1;
int j = 0;
int k = 0;
while ( i < size )
{
Array_2[j] = ( j - Array_1[k] ) / ( Array_1[i] - Array_1[k] );
j++;
fun_2( &i, &k, j, size, Array_1);
}
}
```

If any one has any idea please help.