Can anyone provide some sample code containing multiple types in a single shared variable.
The manual suggests creating a number of pointers offset at appropriate intervals i.e. pointing to the next memory space adjacent to the previously defined pointer.
I seem to be having a few problems grasping what appears to be a simple subject.
Here’s what I’ve got at the moment within my kernel
extern __shared__ char sharedData; char *sharedSequenceString = sharedData; //character array of length stringLength char *sharedResidue = &sharedSequenceString[stringLength]; //single character int *sharedPosition = (int*)&sharedResidue; //single integer int *sharedIndexedSeqeuence = &sharedPosition; //integer array
Thank you in advance for your help