You can write your own realloc device function for your data type.
Just allocate a new space for the new array, copy the old values to the new one, free up the space of the old array, return the new one with more space.
, :
__device__ MY_TYPE* myrealloc(int oldsize, int newsize, MY_TYPE* old)
{
MY_TYPE* newT = (MY_TYPE*) malloc (newsize*sizeof(MY_TYPE));
int i;
for(i=0; i<oldsize; i++)
{
newT[i] = old[i];
}
free(old);
return newT;
}
, . .