Cuda and array of strings Reading/Writing to Array of Strings

I am new to cuda not new to c programming. I am trying to build an array of strings to send to global memory and have each thread grab a particular string from the array. I would assume you would use cudaMallocPitch to do so. How would one allocate/read/write to such an array if passed to the kernel.

I think you would allocate the memory like this.

[codebox]char** d_data;

unsigned int pitch;

cudaMallocPitch((void**) &d_data, &pitch, sizeof(char)*MAX_STRING_SIZE, NUMBER_OF_STRINGS);[/codebox]

However, how would one work with it in the kernel. I have tried different ways with no luck.

Using cuda 2.3

computability 1.1

Thanks,

Steven