reallocating memory

This is my first question so be gentle & I’m new to cuda and it’s abilities …

I want to reallocate memory on the GPU.

I copy an array [arr] to the GPU memory, lets say it has 5 int cells, each cell contains a number.

I want to increase it by arr[0]+arr[i]+arr[2]+arr[3]+arr[4] (\Sigma{0}{4} for the latex users) cells.

but, the content of the cell is not predefined - I calculate it.

Is it possible ?

thank you …

example of arr (above - cell index, below - cell value)

|0|1|2|3|4| -> |0|1|2|3|4|5|6|
|1|1|3|1|1| -> |1|1|1|1|1|1|1|