Hi,

```
I have an array "C" and I want to find the minimum between "C[i]+C[j]" for all "i" and "j", but I also want to find the value of the indices that give me the minimum value. I already have a global function that finds the minimum value, but I want to know if it is possible also to find the indices that return the minimum of the atomicMin operation. A pseudocode of the situation:
```

*global* kernel ( C , minimum_cost ){

```
int j = blockIdx.y * blockDim.y + threadIdx.y;
int i = blockIdx.x * blockDim.x + threadIdx.x;
cost= C[i]+C[j];
atomicMin(minimum_cost,cost);
// here I need to find "i" an "j" that give me the minimum_cost
```

}